ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.52k stars 1.28k forks source link

controller_server crashed with calling /lifecycle_manager/manage_nodes service #3762

Closed AmmarAlbakri closed 1 year ago

AmmarAlbakri commented 1 year ago

Bug report

Steps to reproduce the issue

Expected behavior

The Navigation stack should transition into the active state with no problem

Actual behavior

controller_server crashes with the error: [controller_server-1] terminate called after throwing an instance of 'std::runtime_error' [controller_server-1] what(): Node '/local_costmap/local_costmap' has already been added to an executor.

and the node is dead and must be restarted.

SteveMacenski commented 1 year ago

Can you verify that it works in main and/or if you apply this patch onto Humble that it works?

I believe we have handled this but it just hasn't been released to Humble binaries yet as a relatively recent fix. If that's the only issue, I can re-release Humble sooner to provide it.

AmmarAlbakri commented 1 year ago

main doesn't build, nav2_utils gives error:

navigation2/nav2_util/include/nav2_util/service_client.hpp:49:15: error: cannot convert ‘rclcpp::SystemDefaultsQoS’ to ‘const rmw_qos_profile_t&’ {aka ‘const rmw_qos_profile_s&’} 49 | rclcpp::SystemDefaultsQoS()

along with several more errors I can open a new issue for (maybe humble compatibility issue).

humble also doesn't build, nav2_mppi_controller gives error:

navigation2/nav2_mppi_controller/test/utils_test.cpp:199:29: error: too many arguments to function ‘double mppi::utils::posePointAngle(const Pose&, double, double)’ 199 | EXPECT_NEAR(posePointAngle(pose, point_x, point_y, forward_preference), 0.0, 1e-6);

I removed the nav2_mppi_controller and can confirm with this patch it works on humble.

I couldn't test on main since nav2_planner and nav2_controller now include nav2_core/controller_exceptions.hpp which isn't available in humble.

SteveMacenski commented 1 year ago

But anyhow this is the answer:

I removed the nav2_mppi_controller and can confirm with this patch it works on humble.

That patch is actually already on humble, its just not in the released binaries. If you build humble from source, you're good to go! It will be released into binary format next time there is a release. I ran a release on August 4th and it looks like that release is happening today / tomorrow https://discourse.ros.org/t/preparing-for-humble-sync-2023-08-18/32950 so you should have humble binaries with this fix by the latest end of this week.

SteveMacenski commented 1 year ago

https://discourse.ros.org/t/new-packages-for-humble-hawksbill-2023-08-18/32971

Update now and it should be patched