Nav2 lifecycle nodes don't autostart

asked 2022-07-17 16:51:04 -0600

Woz gravatar image

updated 2022-07-20 14:12:26 -0600

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)
edit retag flag offensive close merge delete

Comments

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

Woz gravatar image Woz  ( 2022-07-24 18:27:32 -0600 )edit

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.

Woz gravatar image Woz  ( 2022-07-24 20:28:39 -0600 )edit