-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
Required Info:
- Operating System:
- Ubuntu 20.04
- ROS2 Version:
- Galactic binaries
- Version or commit hash:
- DDS implementation:
- Eclipse Cyclone DDS
Steps to reproduce issue
This happened when I launched nav2 bringup while many CPU-expensive nodes were running (Gazebo, data processing, object detection, ...).
Most easily reproducible by adding
std::this_thread::sleep_for(500ms);
at the end of lifecycle manager constructor and launching
ros2 launch nav2_bringup bringup_launch.py
Expected behavior
LifecycleManager starts.
Actual behavior
LifecycleManager crashes in createLifecycleServiceClients() method on shared_from_this() as the shared pointer has not been created yet when init_timer_ fires.
Additional information
Can be fixed by removing callback_group_ from init_timer_ construction, so that the callback is fired from rclcpp::spin(node) after the shared ptr has been created for sure. Cannot say whether this change affects negatively different ways of bringing up the manager (other than ros2 launch nav2_bringup bringup_launch.py )
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working