ROS2 galactic Version Install:
Ubuntu (Debian) — ROS 2 Documentation: Galactic documentation
Installing navigation dependency packages (Installation)
https://navigation.ros.org/getting_started/index.html
-
- Install the ROS 2 binary packages as described in the official docs Install the Nav2 packages using your operating system’s package manager:
sudo apt install ros-<ros2-distro>-navigation2 sudo apt install ros-<ros2-distro>-nav2-bringup
Install the Turtlebot 3 packages:
sudo apt install ros-<ros2-distro>-turtlebot3*
Running the Example, step 3 reports an error
-
- Start a terminal in your GUI Set key environment variables:
source /opt/ros/<ros2-distro>/setup.bash export TURTLEBOT3_MODEL=waffle export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/<ros2-distro>/share/turtlebot3_gazebo/models
In the same terminal, run
ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False
Important Log:
[controller_server-8] [INFO] [1661054727.822247083] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
Full Log:
konga@ubuntu:~$ ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False
[INFO] [launch]: All log files can be found below /home/konga/.ros/log/2022-08-21-12-05-20-003298-ubuntu-22365
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [gzserver-1]: process started with pid [22367]
[INFO] [gzclient-2]: process started with pid [22369]
[INFO] [robot_state_publisher-3]: process started with pid [22371]
[INFO] [rviz2-4]: process started with pid [22373]
[INFO] [map_server-5]: process started with pid [22375]
[INFO] [amcl-6]: process started with pid [22377]
[INFO] [lifecycle_manager-7]: process started with pid [22379]
[INFO] [controller_server-8]: process started with pid [22382]
[INFO] [planner_server-9]: process started with pid [22402]
[INFO] [recoveries_server-10]: process started with pid [22411]
[INFO] [bt_navigator-11]: process started with pid [22418]
[INFO] [waypoint_follower-12]: process started with pid [22433]
[INFO] [lifecycle_manager-13]: process started with pid [22441]
[robot_state_publisher-3] [WARN] [1661054720.864507459] [robot_state_publisher]: No robot_description parameter, but command-line argument available. Assuming argument is name of URDF file. This backwards compatibility fallback will be removed in the future.
[robot_state_publisher-3] Link base_link had 7 children
[robot_state_publisher-3] Link camera_link had 2 children
[robot_state_publisher-3] Link camera_depth_frame had 1 children
[robot_state_publisher-3] Link camera_depth_optical_frame had 0 children
[robot_state_publisher-3] Link camera_rgb_frame had 1 children
[robot_state_publisher-3] Link camera_rgb_optical_frame had 0 children
[robot_state_publisher-3] Link caster_back_left_link had 0 children
[robot_state_publisher-3] Link caster_back_right_link had 0 children
[robot_state_publisher-3] Link imu_link had 0 children
[robot_state_publisher-3] Link base_scan had 0 children
[robot_state_publisher-3] Link wheel_left_link had 0 children
[robot_state_publisher-3] Link wheel_right_link had 0 children
[robot_state_publisher-3] [INFO] [1661054720.868551659] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-3] [INFO] [1661054720.868647680] [robot_state_publisher]: got segment base_link
[robot_state_publisher-3] [INFO] [1661054720.868663701] [robot_state_publisher]: got segment base_scan
[robot_state_publisher-3] [INFO] [1661054720.868675631] [robot_state_publisher]: got segment camera_depth_frame
[robot_state_publisher-3] [INFO] [1661054720.868686801] [robot_state_publisher]: got segment camera_depth_optical_frame
[robot_state_publisher-3] [INFO] [1661054720.868698399] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-3] [INFO] [1661054720.868709890] [robot_state_publisher]: got segment camera_rgb_frame
[robot_state_publisher-3] [INFO] [1661054720.868721500] [robot_state_publisher]: got segment camera_rgb_optical_frame
[robot_state_publisher-3] [INFO] [1661054720.868733165] [robot_state_publisher]: got segment caster_back_left_link
[robot_state_publisher-3] [INFO] [1661054720.868744453] [robot_state_publisher]: got segment caster_back_right_link
[robot_state_publisher-3] [INFO] [1661054720.868755393] [robot_state_publisher]: got segment imu_link
[robot_state_publisher-3] [INFO] [1661054720.868767032] [robot_state_publisher]: got segment wheel_left_link
[robot_state_publisher-3] [INFO] [1661054720.868778277] [robot_state_publisher]: got segment wheel_right_link
[map_server-5] [INFO] [1661054720.879760221] [map_server]:
[map_server-5] map_server lifecycle node launched.
[map_server-5] Waiting on external lifecycle transitions to activate
[map_server-5] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[map_server-5] [INFO] [1661054720.879888046] [map_server]: Creating
[lifecycle_manager-7] [INFO] [1661054720.868669904] [lifecycle_manager_localization]: Creating
[lifecycle_manager-7] [INFO] [1661054720.870975208] [lifecycle_manager_localization]: Creating and initializing lifecycle service clients
[lifecycle_manager-7] [INFO] [1661054720.876692884] [lifecycle_manager_localization]: Starting managed nodes bringup...
[lifecycle_manager-7] [INFO] [1661054720.876751414] [lifecycle_manager_localization]: Configuring map_server
[controller_server-8] [INFO] [1661054720.892359574] [controller_server]:
[controller_server-8] controller_server lifecycle node launched.
[controller_server-8] Waiting on external lifecycle transitions to activate
[controller_server-8] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[waypoint_follower-12] [INFO] [1661054720.914603306] [waypoint_follower]:
[waypoint_follower-12] waypoint_follower lifecycle node launched.
[waypoint_follower-12] Waiting on external lifecycle transitions to activate
[waypoint_follower-12] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[waypoint_follower-12] [INFO] [1661054720.915478865] [waypoint_follower]: Creating
[planner_server-9] [INFO] [1661054720.920024576] [planner_server]:
[planner_server-9] planner_server lifecycle node launched.
[planner_server-9] Waiting on external lifecycle transitions to activate
[planner_server-9] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-9] [INFO] [1661054720.922368666] [planner_server]: Creating
[controller_server-8] [INFO] [1661054720.935971283] [controller_server]: Creating controller server
[planner_server-9] [INFO] [1661054720.967401338] [global_costmap.global_costmap]:
[planner_server-9] global_costmap lifecycle node launched.
[planner_server-9] Waiting on external lifecycle transitions to activate
[planner_server-9] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-9] [INFO] [1661054720.969067014] [global_costmap.global_costmap]: Creating Costmap
[controller_server-8] [INFO] [1661054720.976103320] [local_costmap.local_costmap]:
[controller_server-8] local_costmap lifecycle node launched.
[controller_server-8] Waiting on external lifecycle transitions to activate
[controller_server-8] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[amcl-6] [INFO] [1661054720.976971743] [amcl]:
[amcl-6] amcl lifecycle node launched.
[amcl-6] Waiting on external lifecycle transitions to activate
[amcl-6] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[amcl-6] [INFO] [1661054720.977346023] [amcl]: Creating
[controller_server-8] [INFO] [1661054720.978236429] [local_costmap.local_costmap]: Creating Costmap
[recoveries_server-10] [INFO] [1661054720.988954148] [recoveries_server]:
[recoveries_server-10] recoveries_server lifecycle node launched.
[recoveries_server-10] Waiting on external lifecycle transitions to activate
[recoveries_server-10] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[lifecycle_manager-13] [INFO] [1661054720.995954504] [lifecycle_manager_navigation]: Creating
[lifecycle_manager-13] [INFO] [1661054721.004679416] [lifecycle_manager_navigation]: Creating and initializing lifecycle service clients
[lifecycle_manager-13] [INFO] [1661054721.013301204] [lifecycle_manager_navigation]: Starting managed nodes bringup...
[lifecycle_manager-13] [INFO] [1661054721.014373901] [lifecycle_manager_navigation]: Configuring controller_server
[controller_server-8] [INFO] [1661054721.015548236] [controller_server]: Configuring controller interface
[controller_server-8] [INFO] [1661054721.016435020] [controller_server]: getting goal checker plugins..
[controller_server-8] [INFO] [1661054721.017726333] [controller_server]: Controller frequency set to 20.0000Hz
[controller_server-8] [INFO] [1661054721.018586559] [local_costmap.local_costmap]: Configuring
[map_server-5] [INFO] [1661054721.023983603] [map_server]: Configuring
[map_server-5] [INFO] [map_io]: Loading yaml file: /opt/ros/galactic/share/nav2_bringup/maps/turtlebot3_world.yaml
[map_server-5] [DEBUG] [map_io]: resolution: 0.05
[map_server-5] [DEBUG] [map_io]: origin[0]: -10
[map_server-5] [DEBUG] [map_io]: origin[1]: -10
[map_server-5] [DEBUG] [map_io]: origin[2]: 0
[map_server-5] [DEBUG] [map_io]: free_thresh: 0.196
[map_server-5] [DEBUG] [map_io]: occupied_thresh: 0.65
[map_server-5] [DEBUG] [map_io]: mode: trinary
[map_server-5] [DEBUG] [map_io]: negate: 0
[map_server-5] [INFO] [map_io]: Loading image_file: /opt/ros/galactic/share/nav2_bringup/maps/turtlebot3_world.pgm
[controller_server-8] [INFO] [1661054721.024988310] [local_costmap.local_costmap]: Using plugin "voxel_layer"
[bt_navigator-11] [INFO] [1661054721.025097688] [bt_navigator]:
[bt_navigator-11] bt_navigator lifecycle node launched.
[bt_navigator-11] Waiting on external lifecycle transitions to activate
[bt_navigator-11] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[bt_navigator-11] [INFO] [1661054721.025219035] [bt_navigator]: Creating
[controller_server-8] [INFO] [1661054721.032150551] [local_costmap.local_costmap]: Subscribed to Topics: scan
[controller_server-8] [INFO] [1661054721.045146498] [local_costmap.local_costmap]: Initialized plugin "voxel_layer"
[controller_server-8] [INFO] [1661054721.045194479] [local_costmap.local_costmap]: Using plugin "inflation_layer"
[controller_server-8] [INFO] [1661054721.047109637] [local_costmap.local_costmap]: Initialized plugin "inflation_layer"
[controller_server-8] [INFO] [1661054721.055104931] [controller_server]: Created progress_checker : progress_checker of type nav2_controller::SimpleProgressChecker
[controller_server-8] [INFO] [1661054721.062998272] [controller_server]: Created goal checker : general_goal_checker of type nav2_controller::SimpleGoalChecker
[map_server-5] [DEBUG] [map_io]: Read map /opt/ros/galactic/share/nav2_bringup/maps/turtlebot3_world.pgm: 384 X 384 map @ 0.05 m/cell
[controller_server-8] [INFO] [1661054721.073954668] [controller_server]: Controller Server has general_goal_checker goal checkers available.
[lifecycle_manager-7] [INFO] [1661054721.075886239] [lifecycle_manager_localization]: Configuring amcl
[amcl-6] [INFO] [1661054721.076157729] [amcl]: Configuring
[amcl-6] [INFO] [1661054721.076279317] [amcl]: initTransforms
[controller_server-8] [INFO] [1661054721.077383454] [controller_server]: Created controller : FollowPath of type dwb_core::DWBLocalPlanner
[controller_server-8] [INFO] [1661054721.080328048] [controller_server]: Setting transform_tolerance to 0.200000
[amcl-6] [INFO] [1661054721.091598625] [amcl]: initPubSub
[amcl-6] [INFO] [1661054721.096152765] [amcl]: Subscribed to map topic.
[lifecycle_manager-7] [INFO] [1661054721.099391920] [lifecycle_manager_localization]: Activating map_server
[map_server-5] [INFO] [1661054721.099721156] [map_server]: Activating
[map_server-5] [INFO] [1661054721.100446634] [map_server]: Creating bond (map_server) to lifecycle manager.
[amcl-6] [INFO] [1661054721.101021846] [amcl]: Received a 384 X 384 map @ 0.050 m/pix
[controller_server-8] [INFO] [1661054721.119541330] [controller_server]: Using critic "RotateToGoal" (dwb_critics::RotateToGoalCritic)
[controller_server-8] [INFO] [1661054721.120883748] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.121345685] [controller_server]: Using critic "Oscillation" (dwb_critics::OscillationCritic)
[controller_server-8] [INFO] [1661054721.123611118] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.124017486] [controller_server]: Using critic "BaseObstacle" (dwb_critics::BaseObstacleCritic)
[controller_server-8] [INFO] [1661054721.126015719] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.126783217] [controller_server]: Using critic "GoalAlign" (dwb_critics::GoalAlignCritic)
[controller_server-8] [INFO] [1661054721.128207439] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.132757063] [controller_server]: Using critic "PathAlign" (dwb_critics::PathAlignCritic)
[controller_server-8] [INFO] [1661054721.134499382] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.135182604] [controller_server]: Using critic "PathDist" (dwb_critics::PathDistCritic)
[controller_server-8] [INFO] [1661054721.136518980] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.137614779] [controller_server]: Using critic "GoalDist" (dwb_critics::GoalDistCritic)
[controller_server-8] [INFO] [1661054721.138719753] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.138767755] [controller_server]: Controller Server has FollowPath controllers available.
[lifecycle_manager-13] [INFO] [1661054721.145224684] [lifecycle_manager_navigation]: Configuring planner_server
[planner_server-9] [INFO] [1661054721.145496085] [planner_server]: Configuring
[planner_server-9] [INFO] [1661054721.145538827] [global_costmap.global_costmap]: Configuring
[planner_server-9] [INFO] [1661054721.149872435] [global_costmap.global_costmap]: Using plugin "static_layer"
[planner_server-9] [INFO] [1661054721.155595142] [global_costmap.global_costmap]: Subscribing to the map topic (/map) with transient local durability
[planner_server-9] [INFO] [1661054721.156732262] [global_costmap.global_costmap]: Initialized plugin "static_layer"
[planner_server-9] [INFO] [1661054721.156787605] [global_costmap.global_costmap]: Using plugin "obstacle_layer"
[planner_server-9] [INFO] [1661054721.159489903] [global_costmap.global_costmap]: Subscribed to Topics: scan
[planner_server-9] [INFO] [1661054721.167073707] [global_costmap.global_costmap]: Initialized plugin "obstacle_layer"
[planner_server-9] [INFO] [1661054721.167122072] [global_costmap.global_costmap]: Using plugin "inflation_layer"
[planner_server-9] [INFO] [1661054721.169217818] [global_costmap.global_costmap]: StaticLayer: Resizing costmap to 384 X 384 at 0.050000 m/pix
[planner_server-9] [INFO] [1661054721.172473382] [global_costmap.global_costmap]: Initialized plugin "inflation_layer"
[planner_server-9] [INFO] [1661054721.183877678] [planner_server]: Created global planner plugin GridBased of type nav2_navfn_planner/NavfnPlanner
[planner_server-9] [INFO] [1661054721.183936392] [planner_server]: Configuring plugin GridBased of type NavfnPlanner
[planner_server-9] [INFO] [1661054721.192503691] [planner_server]: Planner Server has GridBased planners available.
[lifecycle_manager-13] [INFO] [1661054721.200792028] [lifecycle_manager_navigation]: Configuring recoveries_server
[recoveries_server-10] [INFO] [1661054721.201137276] [recoveries_server]: Configuring
[lifecycle_manager-7] [INFO] [1661054721.205102928] [lifecycle_manager_localization]: Server map_server connected with bond.
[lifecycle_manager-7] [INFO] [1661054721.205160447] [lifecycle_manager_localization]: Activating amcl
[amcl-6] [INFO] [1661054721.205830108] [amcl]: Activating
[amcl-6] [INFO] [1661054721.205882135] [amcl]: Creating bond (amcl) to lifecycle manager.
[recoveries_server-10] [INFO] [1661054721.207969391] [recoveries_server]: Creating recovery plugin spin of type nav2_recoveries/Spin
[recoveries_server-10] [INFO] [1661054721.209492908] [recoveries_server]: Configuring spin
[recoveries_server-10] [INFO] [1661054721.214529117] [recoveries_server]: Creating recovery plugin backup of type nav2_recoveries/BackUp
[recoveries_server-10] [INFO] [1661054721.216551826] [recoveries_server]: Configuring backup
[recoveries_server-10] [INFO] [1661054721.224020090] [recoveries_server]: Creating recovery plugin wait of type nav2_recoveries/Wait
[recoveries_server-10] [INFO] [1661054721.225462622] [recoveries_server]: Configuring wait
[lifecycle_manager-13] [INFO] [1661054721.244608250] [lifecycle_manager_navigation]: Configuring bt_navigator
[bt_navigator-11] [INFO] [1661054721.244853696] [bt_navigator]: Configuring
[lifecycle_manager-7] [INFO] [1661054721.308835764] [lifecycle_manager_localization]: Server amcl connected with bond.
[lifecycle_manager-7] [INFO] [1661054721.308954750] [lifecycle_manager_localization]: Managed nodes are active
[lifecycle_manager-7] [INFO] [1661054721.308976164] [lifecycle_manager_localization]: Creating bond timer...
[lifecycle_manager-13] [INFO] [1661054721.311554467] [lifecycle_manager_navigation]: Configuring waypoint_follower
[waypoint_follower-12] [INFO] [1661054721.311858329] [waypoint_follower]: Configuring
[waypoint_follower-12] [INFO] [1661054721.319677799] [waypoint_follower]: Created waypoint_task_executor : wait_at_waypoint of type nav2_waypoint_follower::WaitAtWaypoint
[lifecycle_manager-13] [INFO] [1661054721.321763105] [lifecycle_manager_navigation]: Activating controller_server
[controller_server-8] [INFO] [1661054721.321982128] [controller_server]: Activating
[controller_server-8] [INFO] [1661054721.322014092] [local_costmap.local_costmap]: Activating
[controller_server-8] [INFO] [1661054721.322036107] [local_costmap.local_costmap]: Checking transform
[controller_server-8] [INFO] [1661054721.322074057] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1661054721.479822887] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-4] [INFO] [1661054721.479918995] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-4] [INFO] [1661054721.518112093] [rviz2]: Stereo is NOT SUPPORTED
[amcl-6] [WARN] [1661054721.686275463] [amcl]: New subscription discovered on topic '/particle_cloud', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
[rviz2-4] [INFO] [1661054721.813885816] [rviz2]: Trying to create a map of size 384 x 384 using 1 swatches
[controller_server-8] [INFO] [1661054721.822138451] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [ERROR] [1661054721.827166910] [rviz2]: Vertex Program:rviz/glsl120/indexed_8bit_image.vert Fragment Program:rviz/glsl120/indexed_8bit_image.frag GLSL link result :
[rviz2-4] active samplers with a different type refer to the same texture image unit
[controller_server-8] [INFO] [1661054722.322248884] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054722.822160507] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054723.322205491] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054723.822234683] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054724.322215965] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054724.822211246] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054725.322197725] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054725.822223261] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054726.322220660] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054726.822223380] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054727.322217193] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054727.822247083] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
Solution:
Before running, build the Gazebo environment and execute this script:
source /usr/share/gazebo/setup.bash