I am working on the ROS2 Navigation Rosject, Section 3 Path Planning.
After launching my pathplanner.launch.py launch file, I get the following repeated warnings:
[controller_server-5] [WARN] [1674112988.556317739] [LifecyclePublisher]: Trying to publish message on the topic '/local_costmap/clearing_endpoints', but the publisher is not activated
[controller_server-5] [WARN] [1674112988.756970089] [LifecyclePublisher]: Trying to publish message on the topic '/local_costmap/clearing_endpoints', but the publisher is not activated
[controller_server-5] [WARN] [1674112988.957115772] [LifecyclePublisher]: Trying to publish message on the topic '/local_costmap/clearing_endpoints', but the publisher is not activated
[controller_server-5] [WARN] [1674112989.156317801] [LifecyclePublisher]: Trying to publish message on the topic '/local_costmap/clearing_endpoints', but the publisher is not activated
[controller_server-5] [WARN] [1674112989.356843994] [LifecyclePublisher]: Trying to publish message on the topic '/local_costmap/clearing_endpoints', but the publisher is not activated
[controller_server-5] [WARN] [1674112989.558379535] [LifecyclePublisher]: Trying to publish message on the topic '/local_costmap/clearing_endpoints', but the publisher is not activated
[controller_server-5] [WARN] [1674112989.759332438] [LifecyclePublisher]: Trying to publish message on the topic '/local_costmap/clearing_endpoints', but the publisher is not activated
[controller_server-5] [WARN] [1674112989.956379915] [LifecyclePublisher]: Trying to publish message on the topic '/local_costmap/clearing_endpoints', but the publisher is not activated
[controller_server-5] [WARN] [1674112990.156456703] [LifecyclePublisher]: Trying to publish message on the topic '/local_costmap/clearing_endpoints', but the publisher is not activated
[controller_server-5] [WARN] [1674112990.356406889] [LifecyclePublisher]: Trying to publish message on the topic '/local_costmap/clearing_endpoints', but the publisher is not activated
[controller_server-5] [WARN] [1674112990.556508686] [LifecyclePublisher]: Trying to publish message on the topic '/local_costmap/clearing_endpoints', but the publisher is not activated
[controller_server-5] [WARN] [1674112990.756434723] [LifecyclePublisher]: Trying to publish message on the topic '/local_costmap/clearing_endpoints', but the publisher is not activated
Launch file content highlights: map_server, amcl, lifecycle_manager_localization for map_server and amcl planner, controller, recoveries, bt_navigator and lifecycle_manager_pathplanning for the previous 4 nodes.
I have no idea what to do to get rid of this. All I can understand is that /local_costmap/clearing_endpoints should publish something but it is not publishing it, because some process that needs to “activate” the publisher did not happen.
I have not worked on the real robot yet - I am still working on the simulation and getting this error / warning.
I searched Google and found a similar answer. But the problem is, I have no idea where to make this modification. I do not have any cpp files in any of my ros2 package.
I think this must be done in the library files, which again, I have no idea which file to open and modify.
yes, my answer applies in the general case when you create your own managed node so that you know that the publisher gets activated when the node transitions to the activated state. I am pretty sure in Nav2 that is already implemented. So now you can find out what the current state of that node is. From the logger I see that the node name must be controller_server (but you can confirm that with ros2 node list) so the command would be:
ros2 lifecycle get controller_server
And also find out what the possible states for that node are:
ros2 lifecycle list controller_server -a
The next step would be to try to execute a state change and get to the activated state, which should activate the publisher and get rid of that message.
Quick Update: I followed this post and got my path planning to work. When I had this warning, my robot never moved. Now it reaches the goal pose.
But I still keep getting this warning continuously printed.
I do not mind this warning, now that my robot moves to the goal pose. But it keeps spamming my terminal, which annoys me a little.
So this happens because the course shows config files for Nav2 for Galactic, but the rosject runs on Nav2 for Foxy? I see, thanks for reporting!
From your output of ros2 lifecycle get /controller_server I see that the state is already active, in that case it is very strange that you have that warnings printed out… at the moment I am out of ideas, this probably requires deeper research …