Robotics StackExchange | Archived questions

Nav2 lifecycle nodes don't autostart

I'm having an issue where sometimes nav2 lifecycle manager won't autostart. I've set autostart to true in my configs but sometimes AMCL, map server, and all other nav2 nodes need to be configured and activated manually. I'm running ros2 galactic. Is this an issue with my configuration? Is it a bug? How can I ensure that all nav2 lifecycle nodes start automatically?

I usually get log prints that look like this when it's not working:

[lifecycle_manager-6] [INFO] [1658344101.351749024] [lifecycle_manager_navigation]: Creating
[lifecycle_manager-6] [INFO] [1658344101.497980704] [lifecycle_manager_navigation]: Creating and initializing lifecycle service clients
[controller_server-1] [INFO] [1658344101.514920096] [controller_server]: 
[controller_server-1]   controller_server lifecycle node launched. 
[controller_server-1]   Waiting on external lifecycle transitions to activate
[controller_server-1]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[recoveries_server-3] [INFO] [1658344101.711558496] [recoveries_server]: 
[recoveries_server-3]   recoveries_server lifecycle node launched. 
[recoveries_server-3]   Waiting on external lifecycle transitions to activate
[recoveries_server-3]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-2] [INFO] [1658344101.770539712] [planner_server]: 
[planner_server-2]  planner_server lifecycle node launched. 
[planner_server-2]  Waiting on external lifecycle transitions to activate
[planner_server-2]  See https://design.ros2.org/articles/node_lifecycle.html for more information.
[waypoint_follower-5] [INFO] [1658344102.218010624] [waypoint_follower]: 
[waypoint_follower-5]   waypoint_follower lifecycle node launched. 
[waypoint_follower-5]   Waiting on external lifecycle transitions to activate
[waypoint_follower-5]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-2] [INFO] [1658344102.244492576] [planner_server]: Creating
[controller_server-1] [INFO] [1658344102.296392736] [controller_server]: Creating controller server
[waypoint_follower-5] [INFO] [1658344102.301882944] [waypoint_follower]: Creating
[bt_navigator-4] [INFO] [1658344102.722046752] [bt_navigator]: 
[bt_navigator-4]    bt_navigator lifecycle node launched. 
[bt_navigator-4]    Waiting on external lifecycle transitions to activate
[bt_navigator-4]    See https://design.ros2.org/articles/node_lifecycle.html for more information.
[bt_navigator-4] [INFO] [1658344102.722637472] [bt_navigator]: Creating
[controller_server-1] [INFO] [1658344102.890014496] [local_costmap.local_costmap]: 
[controller_server-1]   local_costmap lifecycle node launched. 
[controller_server-1]   Waiting on external lifecycle transitions to activate
[controller_server-1]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[controller_server-1] [INFO] [1658344102.987349088] [local_costmap.local_costmap]: Creating Costmap
[planner_server-2] [INFO] [1658344103.389853344] [global_costmap.global_costmap]: 
[planner_server-2]  global_costmap lifecycle node launched. 
[planner_server-2]  Waiting on external lifecycle transitions to activate
[planner_server-2]  See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-2] [INFO] [1658344103.429517888] [global_costmap.global_costmap]: Creating Costmap

When it's working, it looks like this:

[lifecycle_manager-6] [INFO] [1658344287.884016512] [lifecycle_manager_navigation]: Creating
[lifecycle_manager-6] [INFO] [1658344288.097230464] [lifecycle_manager_navigation]: Creating and initializing lifecycle service clients
[bt_navigator-4] [INFO] [1658344288.464440832] [bt_navigator]: 
[bt_navigator-4]    bt_navigator lifecycle node launched. 
[bt_navigator-4]    Waiting on external lifecycle transitions to activate
[bt_navigator-4]    See https://design.ros2.org/articles/node_lifecycle.html for more information.
[bt_navigator-4] [INFO] [1658344288.478475360] [bt_navigator]: Creating
[waypoint_follower-5] [INFO] [1658344288.600347776] [waypoint_follower]: 
[waypoint_follower-5]   waypoint_follower lifecycle node launched. 
[waypoint_follower-5]   Waiting on external lifecycle transitions to activate
[waypoint_follower-5]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[controller_server-1] [INFO] [1658344288.817440096] [controller_server]: 
[controller_server-1]   controller_server lifecycle node launched. 
[controller_server-1]   Waiting on external lifecycle transitions to activate
[controller_server-1]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[recoveries_server-3] [INFO] [1658344288.985045056] [recoveries_server]: 
[recoveries_server-3]   recoveries_server lifecycle node launched. 
[recoveries_server-3]   Waiting on external lifecycle transitions to activate
[recoveries_server-3]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[lifecycle_manager-6] [INFO] [1658344288.988454656] [lifecycle_manager_navigation]: Starting managed nodes bringup...
[lifecycle_manager-6] [INFO] [1658344288.988653440] [lifecycle_manager_navigation]: Configuring controller_server
[planner_server-2] [INFO] [1658344289.175903104] [planner_server]: 
[planner_server-2]  planner_server lifecycle node launched. 
[planner_server-2]  Waiting on external lifecycle transitions to activate
[planner_server-2]  See https://design.ros2.org/articles/node_lifecycle.html for more information.
[waypoint_follower-5] [INFO] [1658344290.324028832] [waypoint_follower]: Creating
[planner_server-2] [INFO] [1658344290.411413120] [planner_server]: Creating
[controller_server-1] [INFO] [1658344290.680692032] [controller_server]: Creating controller server
[planner_server-2] [INFO] [1658344290.973564256] [global_costmap.global_costmap]: 
[planner_server-2]  global_costmap lifecycle node launched. 
[planner_server-2]  Waiting on external lifecycle transitions to activate
[planner_server-2]  See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-2] [INFO] [1658344291.054218336] [global_costmap.global_costmap]: Creating Costmap
[controller_server-1] [INFO] [1658344291.260192128] [local_costmap.local_costmap]: 
[controller_server-1]   local_costmap lifecycle node launched. 
[controller_server-1]   Waiting on external lifecycle transitions to activate
[controller_server-1]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[controller_server-1] [INFO] [1658344291.303073024] [local_costmap.local_costmap]: Creating Costmap
[controller_server-1] [INFO] [1658344291.588764832] [controller_server]: Configuring controller interface
[controller_server-1] [INFO] [1658344291.590618560] [controller_server]: getting goal checker plugins..
[controller_server-1] [INFO] [1658344291.591298272] [controller_server]: Controller frequency set to 10.0000Hz
[controller_server-1] [INFO] [1658344291.591470848] [local_costmap.local_costmap]: Configuring
[controller_server-1] [INFO] [1658344291.702213056] [local_costmap.local_costmap]: Using plugin "obstacle_layer"
[controller_server-1] [INFO] [1658344291.778816832] [local_costmap.local_costmap]: Subscribed to Topics: scan
[controller_server-1] [INFO] [1658344291.862804192] [local_costmap.local_costmap]: Initialized plugin "obstacle_layer"
[controller_server-1] [INFO] [1658344291.863039552] [local_costmap.local_costmap]: Using plugin "voxel_layer"
[controller_server-1] [INFO] [1658344291.898040384] [local_costmap.local_costmap]: Subscribed to Topics: scan
[controller_server-1] [INFO] [1658344292.018651392] [local_costmap.local_costmap]: Initialized plugin "voxel_layer"
[controller_server-1] [INFO] [1658344292.018827552] [local_costmap.local_costmap]: Using plugin "inflation_layer"
[controller_server-1] [INFO] [1658344292.049855456] [local_costmap.local_costmap]: Initialized plugin "inflation_layer"
[controller_server-1] [INFO] [1658344292.214317440] [controller_server]: Created progress_checker : progress_checker of type nav2_controller::SimpleProgressChecker
[controller_server-1] [INFO] [1658344292.351693888] [controller_server]: Created goal checker : general_goal_checker of type nav2_controller::SimpleGoalChecker
[controller_server-1] [INFO] [1658344292.471617504] [controller_server]: Controller Server has general_goal_checker  goal checkers available.
[controller_server-1] [INFO] [1658344292.505512608] [controller_server]: Created controller : FollowPath of type nav2_regulated_pure_pursuit_controller::RegulatedPurePursuitController
[controller_server-1] [INFO] [1658344292.537968512] [controller_server]: Controller Server has FollowPath  controllers available.
[lifecycle_manager-6] [INFO] [1658344292.637715072] [lifecycle_manager_navigation]: Configuring planner_server
[planner_server-2] [INFO] [1658344292.640602528] [planner_server]: Configuring
[planner_server-2] [INFO] [1658344292.640941280] [global_costmap.global_costmap]: Configuring
[planner_server-2] [INFO] [1658344292.749970464] [global_costmap.global_costmap]: Using plugin "static_layer"
[planner_server-2] [INFO] [1658344292.783079936] [global_costmap.global_costmap]: Subscribing to the map topic (/map) with transient local durability
[planner_server-2] [INFO] [1658344292.809148128] [global_costmap.global_costmap]: Initialized plugin "static_layer"
[planner_server-2] [INFO] [1658344292.809316384] [global_costmap.global_costmap]: Using plugin "obstacle_layer"
[planner_server-2] [INFO] [1658344292.834182848] [global_costmap.global_costmap]: Subscribed to Topics: scan
[planner_server-2] [INFO] [1658344292.842181728] [global_costmap.global_costmap]: StaticLayer: Resizing costmap to 190 X 179 at 0.050000 m/pix
[planner_server-2] [INFO] [1658344292.914189504] [global_costmap.global_costmap]: Initialized plugin "obstacle_layer"
[planner_server-2] [INFO] [1658344292.914395616] [global_costmap.global_costmap]: Using plugin "voxel_layer"
[planner_server-2] [INFO] [1658344292.928009792] [global_costmap.global_costmap]: Subscribed to Topics: scan
[planner_server-2] [INFO] [1658344293.015573312] [global_costmap.global_costmap]: Initialized plugin "voxel_layer"
[planner_server-2] [INFO] [1658344293.015774208] [global_costmap.global_costmap]: Using plugin "inflation_layer"
[planner_server-2] [INFO] [1658344293.031811008] [global_costmap.global_costmap]: Initialized plugin "inflation_layer"
[planner_server-2] [INFO] [1658344293.158153568] [planner_server]: Created global planner plugin GridBased of type nav2_navfn_planner/NavfnPlanner
[planner_server-2] [INFO] [1658344293.158357760] [planner_server]: Configuring plugin GridBased of type NavfnPlanner
[planner_server-2] [INFO] [1658344293.248148096] [planner_server]: Planner Server has GridBased  planners available.
[lifecycle_manager-6] [INFO] [1658344293.393482400] [lifecycle_manager_navigation]: Configuring recoveries_server
[recoveries_server-3] [INFO] [1658344293.397315488] [recoveries_server]: Configuring
[recoveries_server-3] [INFO] [1658344293.501206304] [recoveries_server]: Creating recovery plugin spin of type nav2_recoveries/Spin
[recoveries_server-3] [INFO] [1658344293.534272704] [recoveries_server]: Configuring spin
[recoveries_server-3] [INFO] [1658344293.595244192] [recoveries_server]: Creating recovery plugin backup of type nav2_recoveries/BackUp
[recoveries_server-3] [INFO] [1658344293.629053184] [recoveries_server]: Configuring backup
[recoveries_server-3] [INFO] [1658344293.688704608] [recoveries_server]: Creating recovery plugin wait of type nav2_recoveries/Wait
[recoveries_server-3] [INFO] [1658344293.723991104] [recoveries_server]: Configuring wait
[lifecycle_manager-6] [INFO] [1658344293.780357888] [lifecycle_manager_navigation]: Configuring bt_navigator
[bt_navigator-4] [INFO] [1658344293.785764896] [bt_navigator]: Configuring
[lifecycle_manager-6] [INFO] [1658344295.067602528] [lifecycle_manager_navigation]: Configuring waypoint_follower
[waypoint_follower-5] [INFO] [1658344295.072787776] [waypoint_follower]: Configuring
[waypoint_follower-5] [INFO] [1658344295.366245536] [waypoint_follower]: Created waypoint_task_executor : wait_at_waypoint of type nav2_waypoint_follower::WaitAtWaypoint
[lifecycle_manager-6] [INFO] [1658344295.390194880] [lifecycle_manager_navigation]: Activating controller_server
[controller_server-1] [INFO] [1658344295.397116576] [controller_server]: Activating
[controller_server-1] [INFO] [1658344295.397281952] [local_costmap.local_costmap]: Activating
[controller_server-1] [INFO] [1658344295.397394304] [local_costmap.local_costmap]: Checking transform
[controller_server-1] [INFO] [1658344295.398161664] [local_costmap.local_costmap]: start
[controller_server-1] [INFO] [1658344295.420337216] [controller_server]: Activating controller: FollowPath of type regulated_pure_pursuit_controller::RegulatedPurePursuitController
[controller_server-1] [INFO] [1658344295.420503232] [controller_server]: Creating bond (controller_server) to lifecycle manager.
[detection_chaser-8] [INFO] [1658344295.565858816] [detection_chaser]: detection_chaser is ready
[lifecycle_manager-6] [INFO] [1658344295.575104608] [lifecycle_manager_navigation]: Server controller_server connected with bond.
[lifecycle_manager-6] [INFO] [1658344295.575298688] [lifecycle_manager_navigation]: Activating planner_server
[planner_server-2] [INFO] [1658344295.580730304] [planner_server]: Activating
[planner_server-2] [INFO] [1658344295.580879584] [global_costmap.global_costmap]: Activating
[planner_server-2] [INFO] [1658344295.580948512] [global_costmap.global_costmap]: Checking transform
[planner_server-2] [INFO] [1658344295.581866336] [global_costmap.global_costmap]: start
[planner_server-2] [INFO] [1658344295.624917984] [planner_server]: Activating plugin GridBased of type NavfnPlanner
[planner_server-2] [INFO] [1658344295.625082720] [planner_server]: Creating bond (planner_server) to lifecycle manager.
[lifecycle_manager-6] [INFO] [1658344295.794762144] [lifecycle_manager_navigation]: Server planner_server connected with bond.
[lifecycle_manager-6] [INFO] [1658344295.796378144] [lifecycle_manager_navigation]: Activating recoveries_server
[recoveries_server-3] [INFO] [1658344295.798460224] [recoveries_server]: Activating
[recoveries_server-3] [INFO] [1658344295.798650784] [recoveries_server]: Activating spin
[recoveries_server-3] [INFO] [1658344295.798715968] [recoveries_server]: Activating backup
[recoveries_server-3] [INFO] [1658344295.798782112] [recoveries_server]: Activating wait
[recoveries_server-3] [INFO] [1658344295.798840032] [recoveries_server]: Creating bond (recoveries_server) to lifecycle manager.
[lifecycle_manager-6] [INFO] [1658344295.965124064] [lifecycle_manager_navigation]: Server recoveries_server connected with bond.
[lifecycle_manager-6] [INFO] [1658344295.965355808] [lifecycle_manager_navigation]: Activating bt_navigator
[bt_navigator-4] [INFO] [1658344295.967951904] [bt_navigator]: Activating
[bt_navigator-4] [INFO] [1658344296.495350592] [bt_navigator]: Creating bond (bt_navigator) to lifecycle manager.
[lifecycle_manager-6] [INFO] [1658344296.635084864] [lifecycle_manager_navigation]: Server bt_navigator connected with bond.
[lifecycle_manager-6] [INFO] [1658344296.637524224] [lifecycle_manager_navigation]: Activating waypoint_follower
[waypoint_follower-5] [INFO] [1658344296.640008448] [waypoint_follower]: Activating
[waypoint_follower-5] [INFO] [1658344296.640195808] [waypoint_follower]: Creating bond (waypoint_follower) to lifecycle manager.
[lifecycle_manager-6] [INFO] [1658344296.833321984] [lifecycle_manager_navigation]: Server waypoint_follower connected with bond.
[lifecycle_manager-6] [INFO] [1658344296.833520288] [lifecycle_manager_navigation]: Managed nodes are active
[lifecycle_manager-6] [INFO] [1658344296.833608288] [lifecycle_manager_navigation]: Creating bond timer...

Asked by Woz on 2022-07-17 16:51:04 UTC

Comments

This seems to be the issue discussion thread: https://github.com/ros-planning/navigation2/issues/3033

Asked by Woz on 2022-07-24 18:27:32 UTC

Setting RMW_IMPLEMENTATION to rmw_cyclonedds_cpp instead of rmw_fastrtps_cpp fixes the issue, though I have a networking device that doesn't have UDP support so I can't use cyclone on that device. Very frustrating.

Asked by Woz on 2022-07-24 20:28:39 UTC

Answers