Exercise 4.1. 2D Goal Pose only draws a line and robot not move

I copy everything as the guidance and execute these commands:

  • Shell #1
    cd ~/ros2_ws
    colcon build --packages-select path_planner_server
    source ~/ros2_ws/install/setup.bash
    ros2 launch path_planner_server pathplanner.launch.py

  • Shell #2
    source ~/ros2_ws/install/setup.bash
    source /home/simulations/ros2_sims_ws/install/setup.bash
    rviz2 -d /home/user/ros2_ws/src/pathplanning_rviz_config.rviz

My terminal:

user:~/ros2_ws$ source ~/ros2_ws/install/setup.bash
user:~/ros2_ws$ ros2 launch path_planner_server pathplanner.launch.py
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2023-04-10-03-12-08-150963-3_xterm-7012
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [map_server-1]: process started with pid [7023]
[INFO] [amcl-2]: process started with pid [7025]
[INFO] [controller_server-3]: process started with pid [7027]
[INFO] [planner_server-4]: process started with pid [7029]
[INFO] [recoveries_server-5]: process started with pid [7041]
[INFO] [bt_navigator-6]: process started with pid [7072]
[INFO] [lifecycle_manager-7]: process started with pid [7075]
[map_server-1] [INFO] [1681096328.878360354] [map_server]:
[map_server-1]  map_server lifecycle node launched.
[map_server-1]  Waiting on external lifecycle transitions to activate
[map_server-1]  See https://design.ros2.org/articles/node_lifecycle.html for more information.
[map_server-1] [INFO] [1681096328.878473599] [map_server]: Creating
[amcl-2] [INFO] [1681096328.877823225] [amcl]:
[amcl-2]        amcl lifecycle node launched.
[amcl-2]        Waiting on external lifecycle transitions to activate
[amcl-2]        See https://design.ros2.org/articles/node_lifecycle.html for more information.
[amcl-2] [INFO] [1681096328.877955159] [amcl]: Creating
[controller_server-3] [INFO] [1681096328.919896493] [controller_server]:
[controller_server-3]   controller_server lifecycle node launched.
[controller_server-3]   Waiting on external lifecycle transitions to activate
[controller_server-3]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[controller_server-3] [INFO] [1681096328.933960340] [controller_server]: Creating controller server
[planner_server-4] [INFO] [1681096328.941028594] [planner_server]:
[planner_server-4]      planner_server lifecycle node launched.
[planner_server-4]      Waiting on external lifecycle transitions to activate
[planner_server-4]      See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-4] [INFO] [1681096328.946538095] [planner_server]: Creating
[recoveries_server-5] [INFO] [1681096328.973713137] [recoveries_server]:
[recoveries_server-5]   recoveries_server lifecycle node launched.
[recoveries_server-5]   Waiting on external lifecycle transitions to activate
[recoveries_server-5]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[controller_server-3] [INFO] [1681096328.984444184] [local_costmap.local_costmap]:
[controller_server-3]   local_costmap lifecycle node launched.
[controller_server-3]   Waiting on external lifecycle transitions to activate
[controller_server-3]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[controller_server-3] [INFO] [1681096328.986530186] [local_costmap.local_costmap]: Creating Costmap
[planner_server-4] [INFO] [1681096329.046467261] [global_costmap.global_costmap]:
[planner_server-4]      global_costmap lifecycle node launched.
[planner_server-4]      Waiting on external lifecycle transitions to activate
[planner_server-4]      See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-4] [INFO] [1681096329.051029159] [global_costmap.global_costmap]: Creating Costmap
[lifecycle_manager-7] [INFO] [1681096329.066760087] [lifecycle_manager]: Creating
[lifecycle_manager-7] [INFO] [1681096329.073815588] [lifecycle_manager]: Creating and initializing lifecycle service clients
[bt_navigator-6] [INFO] [1681096329.090818380] [bt_navigator]:
[bt_navigator-6]        bt_navigator lifecycle node launched.
[bt_navigator-6]        Waiting on external lifecycle transitions to activate
[bt_navigator-6]        See https://design.ros2.org/articles/node_lifecycle.html for more information.
[bt_navigator-6] [INFO] [1681096329.091001521] [bt_navigator]: Creating
[lifecycle_manager-7] [INFO] [1681096329.096786071] [lifecycle_manager]: Starting managed nodes bringup...
[lifecycle_manager-7] [INFO] [1681096329.096867043] [lifecycle_manager]: Configuring map_server
[map_server-1] [INFO] [1681096329.098111231] [map_server]: Configuring
[map_server-1] [INFO] [map_io]: Loading yaml file: /home/user/ros2_ws/install/map_server/share/map_server/config/turtlebot_area.yaml
[map_server-1] [DEBUG] [map_io]: resolution: 0.05
[map_server-1] [DEBUG] [map_io]: origin[0]: -3.61
[map_server-1] [DEBUG] [map_io]: origin[1]: -1.91
[map_server-1] [DEBUG] [map_io]: origin[2]: 0
[map_server-1] [DEBUG] [map_io]: free_thresh: 0.25
[map_server-1] [DEBUG] [map_io]: occupied_thresh: 0.65
[map_server-1] [DEBUG] [map_io]: mode: trinary
[map_server-1] [DEBUG] [map_io]: negate: 0
[map_server-1] [INFO] [map_io]: Loading image_file: /home/user/ros2_ws/install/map_server/share/map_server/config/turtlebot_area.pgm
[map_server-1] [DEBUG] [map_io]: Read map /home/user/ros2_ws/install/map_server/share/map_server/config/turtlebot_area.pgm: 142 X 144 map @ 0.05 m/cell
[lifecycle_manager-7] [INFO] [1681096329.157529158] [lifecycle_manager]: Configuring amcl
[amcl-2] [INFO] [1681096329.157863042] [amcl]: Configuring
[amcl-2] [INFO] [1681096329.157997058] [amcl]: initTransforms
[amcl-2] [INFO] [1681096329.169983045] [amcl]: initPubSub
[amcl-2] [INFO] [1681096329.175490177] [amcl]: Subscribed to map topic.
[lifecycle_manager-7] [INFO] [1681096329.178167267] [lifecycle_manager]: Configuring controller_server
[controller_server-3] [INFO] [1681096329.179076423] [controller_server]: Configuring controller interface
[controller_server-3] [INFO] [1681096329.179330797] [controller_server]: getting goal checker plugins..
[controller_server-3] [INFO] [1681096329.179463155] [controller_server]: Controller frequency set to 10.0000Hz
[controller_server-3] [INFO] [1681096329.179501055] [local_costmap.local_costmap]: Configuring
[controller_server-3] [INFO] [1681096329.183458189] [local_costmap.local_costmap]: Using plugin "static_layer"
[controller_server-3] [INFO] [1681096329.192822994] [local_costmap.local_costmap]: Subscribing to the map topic (/map) with transient local durability
[controller_server-3] [INFO] [1681096329.194346984] [local_costmap.local_costmap]: Initialized plugin "static_layer"
[controller_server-3] [INFO] [1681096329.194387345] [local_costmap.local_costmap]: Using plugin "obstacle_layer"
[controller_server-3] [INFO] [1681096329.198499047] [local_costmap.local_costmap]: Subscribed to Topics:
[controller_server-3] [INFO] [1681096329.198589202] [local_costmap.local_costmap]: Initialized plugin "obstacle_layer"
[controller_server-3] [INFO] [1681096329.198620338] [local_costmap.local_costmap]: Using plugin "inflation_layer"
[controller_server-3] [INFO] [1681096329.202919122] [local_costmap.local_costmap]: Initialized plugin "inflation_layer"
[controller_server-3] [INFO] [1681096329.217831852] [controller_server]: Created progress_checker : progress_checker of type nav2_controller::SimpleProgressChecker
[controller_server-3] [INFO] [1681096329.230944158] [controller_server]: Created goal checker : general_goal_checker of type nav2_controller::SimpleGoalChecker
[controller_server-3] [INFO] [1681096329.238402524] [controller_server]: Controller Server has general_goal_checker  goal checkers available.
[controller_server-3] [INFO] [1681096329.242563098] [controller_server]: Created controller : FollowPath of type dwb_core::DWBLocalPlanner
[controller_server-3] [INFO] [1681096329.248934894] [controller_server]: Setting transform_tolerance to 0.200000
[controller_server-3] [INFO] [1681096329.285151150] [controller_server]: Using critic "RotateToGoal" (dwb_critics::RotateToGoalCritic)
[controller_server-3] [INFO] [1681096329.288529028] [controller_server]: Critic plugin initialized
[controller_server-3] [INFO] [1681096329.289142225] [controller_server]: Using critic "Oscillation" (dwb_critics::OscillationCritic)
[controller_server-3] [INFO] [1681096329.292038871] [controller_server]: Critic plugin initialized
[controller_server-3] [INFO] [1681096329.292755689] [controller_server]: Using critic "BaseObstacle" (dwb_critics::BaseObstacleCritic)
[controller_server-3] [INFO] [1681096329.294250076] [controller_server]: Critic plugin initialized
[controller_server-3] [INFO] [1681096329.295001707] [controller_server]: Using critic "GoalAlign" (dwb_critics::GoalAlignCritic)
[controller_server-3] [INFO] [1681096329.297069833] [controller_server]: Critic plugin initialized
[controller_server-3] [INFO] [1681096329.297907169] [controller_server]: Using critic "PathAlign" (dwb_critics::PathAlignCritic)
[controller_server-3] [INFO] [1681096329.300069272] [controller_server]: Critic plugin initialized
[controller_server-3] [INFO] [1681096329.300840464] [controller_server]: Using critic "PathDist" (dwb_critics::PathDistCritic)
[controller_server-3] [INFO] [1681096329.302253358] [controller_server]: Critic plugin initialized
[controller_server-3] [INFO] [1681096329.302928322] [controller_server]: Using critic "GoalDist" (dwb_critics::GoalDistCritic)
[controller_server-3] [INFO] [1681096329.304171173] [controller_server]: Critic plugin initialized
[controller_server-3] [INFO] [1681096329.304208169] [controller_server]: Controller Server has FollowPath  controllers available.
[lifecycle_manager-7] [INFO] [1681096329.312178838] [lifecycle_manager]: Configuring planner_server
[planner_server-4] [INFO] [1681096329.312475555] [planner_server]: Configuring
[planner_server-4] [INFO] [1681096329.312510490] [global_costmap.global_costmap]: Configuring
[planner_server-4] [INFO] [1681096329.316201833] [global_costmap.global_costmap]: Using plugin "static_layer"
[planner_server-4] [INFO] [1681096329.325437755] [global_costmap.global_costmap]: Subscribing to the map topic (/map) with transient local durability
[planner_server-4] [INFO] [1681096329.326729054] [global_costmap.global_costmap]: Initialized plugin "static_layer"
[planner_server-4] [INFO] [1681096329.326768973] [global_costmap.global_costmap]: Using plugin "obstacle_layer"
[planner_server-4] [INFO] [1681096329.330278351] [global_costmap.global_costmap]: Subscribed to Topics:
[planner_server-4] [INFO] [1681096329.330360238] [global_costmap.global_costmap]: Initialized plugin "obstacle_layer"
[planner_server-4] [INFO] [1681096329.330389780] [global_costmap.global_costmap]: Using plugin "inflation_layer"
[planner_server-4] [INFO] [1681096329.333308970] [global_costmap.global_costmap]: Initialized plugin "inflation_layer"
[planner_server-4] [INFO] [1681096329.342636217] [planner_server]: Created global planner plugin GridBased of type nav2_navfn_planner/NavfnPlanner
[planner_server-4] [INFO] [1681096329.342701572] [planner_server]: Configuring plugin GridBased of type NavfnPlanner
[planner_server-4] [INFO] [1681096329.355049603] [planner_server]: Planner Server has GridBased  planners available.
[lifecycle_manager-7] [INFO] [1681096329.369033338] [lifecycle_manager]: Configuring recoveries_server
[recoveries_server-5] [INFO] [1681096329.369508283] [recoveries_server]: Configuring
[recoveries_server-5] [INFO] [1681096329.374870010] [recoveries_server]: Creating recovery plugin spin of type nav2_recoveries/Spin
[recoveries_server-5] [INFO] [1681096329.376274917] [recoveries_server]: Configuring spin
[recoveries_server-5] [INFO] [1681096329.387281896] [recoveries_server]: Creating recovery plugin backup of type nav2_recoveries/BackUp
[recoveries_server-5] [INFO] [1681096329.388755023] [recoveries_server]: Configuring backup
[recoveries_server-5] [INFO] [1681096329.393352431] [recoveries_server]: Creating recovery plugin wait of type nav2_recoveries/Wait
[recoveries_server-5] [INFO] [1681096329.394616283] [recoveries_server]: Configuring wait
[lifecycle_manager-7] [INFO] [1681096329.403884220] [lifecycle_manager]: Configuring bt_navigator
[bt_navigator-6] [INFO] [1681096329.404213694] [bt_navigator]: Configuring
[lifecycle_manager-7] [INFO] [1681096329.488179160] [lifecycle_manager]: Activating map_server
[map_server-1] [INFO] [1681096329.488583472] [map_server]: Activating
[map_server-1] [INFO] [1681096329.489157460] [map_server]: Creating bond (map_server) to lifecycle manager.
[amcl-2] [INFO] [1681096329.489155394] [amcl]: Received a 142 X 144 map @ 0.050 m/pix
[planner_server-4] [INFO] [1681096329.489227903] [global_costmap.global_costmap]: StaticLayer: Resizing costmap to 142 X 144 at 0.050000 m/pix
[controller_server-3] [INFO] [1681096329.489932235] [local_costmap.local_costmap]: StaticLayer: Resizing costmap to 142 X 144 at 0.050000 m/pix
[lifecycle_manager-7] [INFO] [1681096329.593271943] [lifecycle_manager]: Server map_server connected with bond.
[lifecycle_manager-7] [INFO] [1681096329.593343531] [lifecycle_manager]: Activating amcl
[amcl-2] [INFO] [1681096329.593651295] [amcl]: Activating
[amcl-2] [INFO] [1681096329.593705172] [amcl]: Creating bond (amcl) to lifecycle manager.
[amcl-2] [INFO] [1681096329.643467980] [amcl]: createLaserObject
[lifecycle_manager-7] [INFO] [1681096329.696361233] [lifecycle_manager]: Server amcl connected with bond.
[lifecycle_manager-7] [INFO] [1681096329.696470759] [lifecycle_manager]: Activating controller_server
[controller_server-3] [INFO] [1681096329.696883010] [controller_server]: Activating
[controller_server-3] [INFO] [1681096329.696934350] [local_costmap.local_costmap]: Activating
[controller_server-3] [INFO] [1681096329.696958844] [local_costmap.local_costmap]: Checking transform
[controller_server-3] [INFO] [1681096329.697008991] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096330.197087919] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096330.697080017] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096331.197088786] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[amcl-2] [WARN] [1681096331.292805257] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[controller_server-3] [INFO] [1681096331.697081703] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096332.197081651] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096332.697081199] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096333.197093238] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[amcl-2] [WARN] [1681096333.543751224] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[controller_server-3] [INFO] [1681096333.697113049] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[amcl-2] [WARN] [1681096334.145637109] [amcl]: New subscription discovered on topic '/particle_cloud', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
[controller_server-3] [INFO] [1681096334.197164954] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096334.697091219] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096335.199293852] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[amcl-2] [WARN] [1681096335.628649235] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[controller_server-3] [INFO] [1681096335.697126665] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096336.197103227] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096336.697102056] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096337.197084712] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096337.697246770] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[amcl-2] [WARN] [1681096337.699635644] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[controller_server-3] [INFO] [1681096338.197093617] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096338.697185454] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096339.197146506] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[amcl-2] [INFO] [1681096339.576784142] [amcl]: initialPoseReceived
[amcl-2] [WARN] [1681096339.577044983] [amcl]: Failed to transform initial pose in time (Lookup would require extrapolation into the future.  Requested time 1681096339.576444 but the latest data is at time 254.116000, when looking up transform from frame [odom] to frame [base_footprint])
[amcl-2] [INFO] [1681096339.577096932] [amcl]: Setting pose (254.054000): 0.027 0.054 0.000
[controller_server-3] [INFO] [1681096339.697085151] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[controller_server-3] [INFO] [1681096340.197177480] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Lookup would require extrapolation into the past.  Requested time 254.728000 but the earliest data is at time 255.298000, when looking up transform from frame [base_link] to frame [map]
[controller_server-3] [INFO] [1681096340.699461899] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Lookup would require extrapolation into the past.  Requested time 255.204000 but the earliest data is at time 255.298000, when looking up transform from frame [base_link] to frame [map]
[controller_server-3] [INFO] [1681096341.197426188] [local_costmap.local_costmap]: start
[controller_server-3] [INFO] [1681096341.247615868] [controller_server]: Creating bond (controller_server) to lifecycle manager.
[lifecycle_manager-7] [INFO] [1681096341.352298488] [lifecycle_manager]: Server controller_server connected with bond.
[lifecycle_manager-7] [INFO] [1681096341.352378696] [lifecycle_manager]: Activating planner_server
[planner_server-4] [INFO] [1681096341.353632401] [planner_server]: Activating
[planner_server-4] [INFO] [1681096341.353689018] [global_costmap.global_costmap]: Activating
[planner_server-4] [INFO] [1681096341.353720235] [global_costmap.global_costmap]: Checking transform
[planner_server-4] [INFO] [1681096341.353836523] [global_costmap.global_costmap]: start
[planner_server-4] [INFO] [1681096341.403969158] [planner_server]: Activating plugin GridBased of type NavfnPlanner
[planner_server-4] [INFO] [1681096341.404064961] [planner_server]: Creating bond (planner_server) to lifecycle manager.
[lifecycle_manager-7] [INFO] [1681096341.509435243] [lifecycle_manager]: Server planner_server connected with bond.
[lifecycle_manager-7] [INFO] [1681096341.509502620] [lifecycle_manager]: Activating recoveries_server
[recoveries_server-5] [INFO] [1681096341.509850310] [recoveries_server]: Activating
[recoveries_server-5] [INFO] [1681096341.509903196] [recoveries_server]: Activating spin
[recoveries_server-5] [INFO] [1681096341.509939889] [recoveries_server]: Activating backup
[recoveries_server-5] [INFO] [1681096341.509959527] [recoveries_server]: Activating wait
[recoveries_server-5] [INFO] [1681096341.509980217] [recoveries_server]: Creating bond (recoveries_server) to lifecycle manager.
[lifecycle_manager-7] [INFO] [1681096341.613885077] [lifecycle_manager]: Server recoveries_server connected with bond.
[lifecycle_manager-7] [INFO] [1681096341.613956189] [lifecycle_manager]: Activating bt_navigator
[bt_navigator-6] [INFO] [1681096341.614309770] [bt_navigator]: Activating
[bt_navigator-6] [PublisherZMQ] Publisher quitting.
[bt_navigator-6] [PublisherZMQ] just died. Exeption Context was terminated
[bt_navigator-6] [INFO] [1681096341.703617372] [bt_navigator]: Creating bond (bt_navigator) to lifecycle manager.
[lifecycle_manager-7] [INFO] [1681096341.820190934] [lifecycle_manager]: Server bt_navigator connected with bond.
[lifecycle_manager-7] [INFO] [1681096341.820261021] [lifecycle_manager]: Managed nodes are active
[lifecycle_manager-7] [INFO] [1681096341.820285768] [lifecycle_manager]: Creating bond timer...
[bt_navigator-6] [INFO] [1681096342.779589847] [bt_navigator]: Begin navigating from current location to (-0.92, 1.09)
[controller_server-3] [INFO] [1681096342.804077756] [controller_server]: Received a goal, begin computing control effort.
[controller_server-3] [WARN] [1681096342.804169728] [controller_server]: No goal checker was specified in parameter 'current_goal_checker'. Server will use only plugin loaded general_goal_checker . This warning will appear once.
[ERROR] [controller_server-3]: process has died [pid 7027, exit code -11, cmd '/opt/ros/galactic/lib/nav2_controller/controller_server --ros-args-r __node:=controller_server --params-file /home/user/ros2_ws/install/path_planner_server/share/path_planner_server/config/controller.yaml'].
[bt_navigator-6] [WARN] [1681096343.836909433] [bt_navigatornavigate_to_pose_rclcpp_node]: Timed out while waiting for action server to acknowledge goal request for follow_path
[bt_navigator-6] [WARN] [1681096343.857234694] [bt_navigatornavigate_to_pose_rclcpp_node]: Node timed out while executing service call to local_costmap/clear_entirely_local_costmap.
[bt_navigator-6] [WARN] [1681096343.877981516] [bt_navigatornavigate_to_pose_rclcpp_node]: Node timed out while executing service call to local_costmap/clear_entirely_local_costmap.
[bt_navigator-6] [ERROR] [1681096343.878258906] [bt_navigator]: Goal failed
[bt_navigator-6] [WARN] [1681096343.878295940] [bt_navigator]: [navigate_to_pose] [ActionServer] Aborting handle.
[lifecycle_manager-7] [INFO] [1681096346.820399020] [lifecycle_manager]: Have not received a heartbeat from controller_server.
[lifecycle_manager-7] [ERROR] [1681096346.820484048] [lifecycle_manager]: CRITICAL FAILURE: SERVER controller_server IS DOWN after not receiving a heartbeat for 4000 ms. Shutting down related nodes.
[lifecycle_manager-7] [INFO] [1681096346.820514592] [lifecycle_manager]: Terminating bond timer...
[lifecycle_manager-7] [INFO] [1681096346.820536714] [lifecycle_manager]: Resetting managed nodes...
[lifecycle_manager-7] [INFO] [1681096346.820557229] [lifecycle_manager]: Deactivating bt_navigator
[bt_navigator-6] [INFO] [1681096346.822741607] [bt_navigator]: Deactivating
[bt_navigator-6] [INFO] [1681096346.822832579] [bt_navigator]: Destroying bond (bt_navigator) to lifecycle manager.
[lifecycle_manager-7] [INFO] [1681096347.926981596] [lifecycle_manager]: Deactivating recoveries_server
[recoveries_server-5] [INFO] [1681096347.927672479] [recoveries_server]: Deactivating
[recoveries_server-5] [INFO] [1681096347.927749529] [recoveries_server]: Destroying bond (recoveries_server) to lifecycle manager.
[lifecycle_manager-7] [INFO] [1681096349.035123264] [lifecycle_manager]: Deactivating planner_server
[planner_server-4] [INFO] [1681096349.035948407] [planner_server]: Deactivating
[planner_server-4] [INFO] [1681096349.036010774] [global_costmap.global_costmap]: Deactivating
[planner_server-4] [INFO] [1681096349.154834673] [planner_server]: Deactivating plugin GridBased of type NavfnPlanner
[planner_server-4] [INFO] [1681096349.154912530] [planner_server]: Destroying bond (planner_server) to lifecycle manager.
[lifecycle_manager-7] [INFO] [1681096350.259957565] [lifecycle_manager]: Deactivating controller_server

Hi @PhongNguyen ,

If I am guessing correctly, you are using one lifecycle_manager node for map_server, amcl, planner, controller, recoveries, bt_navigator.
The above will not work properly.

It is better to have a separate lifecycle_manager for map_server and amcl.
And another separate lifecycle_manager for the other 4 nodes of path planning.

Try this and let me know if it worked.

Regards,
Girish

1 Like

Yes, I use only one lifecycle_manager for all.
But I thought we are going to have to use one lifecycle_manager and one launch file anyway according to Exercise 5.5.
Should we avoid it for any reason?
The below code is from Exercise 5.5 solution: navigation.launch.py

import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():

    controller_yaml = os.path.join(get_package_share_directory('path_planner_server'), 'config', 'controller.yaml')
    bt_navigator_yaml = os.path.join(get_package_share_directory('path_planner_server'), 'config', 'bt_navigator.yaml')
    planner_yaml = os.path.join(get_package_share_directory('path_planner_server'), 'config', 'planner_server.yaml')
    recovery_yaml = os.path.join(get_package_share_directory('path_planner_server'), 'config', 'recovery.yaml')
    nav2_yaml = os.path.join(get_package_share_directory('localization_server'), 'config', 'amcl_config.yaml')
    map_file = os.path.join(get_package_share_directory('map_server'), 'config', 'turtlebot_area.yaml')
    
    return LaunchDescription([     
        Node(
            package='nav2_map_server',
            executable='map_server',
            name='map_server',
            output='screen',
            parameters=[{'use_sim_time': True}, 
                        {'yaml_filename':map_file}]
        ),
            
        Node(
            package='nav2_amcl',
            executable='amcl',
            name='amcl',
            output='screen',
            parameters=[nav2_yaml]
        ),
        Node(
            package='nav2_controller',
            executable='controller_server',
            name='controller_server',
            output='screen',
            parameters=[controller_yaml]),

        Node(
            package='nav2_planner',
            executable='planner_server',
            name='planner_server',
            output='screen',
            parameters=[planner_yaml]),
            
        Node(
            package='nav2_recoveries',
            executable='recoveries_server',
            name='recoveries_server',
            parameters=[recovery_yaml],
            output='screen'),

        Node(
            package='nav2_bt_navigator',
            executable='bt_navigator',
            name='bt_navigator',
            output='screen',
            parameters=[bt_navigator_yaml]),

        Node(
            package='nav2_lifecycle_manager',
            executable='lifecycle_manager',
            name='lifecycle_manager',
            output='screen',
            parameters=[{'autostart': True},
                        {'node_names': ['map_server',
                                        'amcl',
                                        'controller_server',
                                        'planner_server',
                                        'recoveries_server',
                                        'bt_navigator']}])
    ])

Hi @PhongNguyen ,

I went though the course and my solution for this exercise, even I have used a single lifecycle_manager for all the nodes. So that should work.

From your error output, you can see CRITICAL FAILURE: SERVER controller_server IS DOWN after not receiving a heartbeat for 4000 ms. Shutting down related nodes.

You must shut down all the nodes that you started and restart your program - this should fix it.

Let me know if you still have issues.

Regards,
Girish

Seems like when I log in again and try the exact commands, the exercise is succeeded.
You mentioned about “shut down all the nodes”.
Should I execute rosnode kill -a before I launch any file? Just to be sure?

Hi @PhongNguyen ,

Great to know that worked!

Sure you can, but that command may not succeed always (it has some drawbacks).
Better option would be to just kill the node you want to kill.
Also you are working with ROS2. There is no ros2 node kill ... command in ROS2!

Regards,
Girish

Do have any command specifically or how to kill a node properly in ROS2 to assure the above Exercise 4.1 is more stable when execute?

Hi @PhongNguyen ,

One way I have tried and found to be working is to find the active ros2 nodes and killing them.

ros2 node list
killall <node_name_from_nodes_list>

But there is another problem with this. You can terminate only single nodes. If you want to terminate a node group, like lifecycle_manager, you will have to kill all the nodes in that node group and then finally kill the node group manager node.

I hope this info helps.

Regards,
Girish

Many thanks @girishkumar.kannan