ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Catch goal status in custom global planner

asked 2019-12-07 05:29:57 -0500

kiko453 gravatar image

I wrote a global planner following this tutorial http://wiki.ros.org/navigation/Tutori....
In this global planner, I want to know when the goal is reach. When acml is launch it constantly send INFO like "Got new plan", "Goal reached". How can I acess this info in my global planner? I've try to suscribe to "/move_base/status" and wirte a callback that will check the status but since I don't have a main() function I can't call ros::spin() without blocking the execution of my planner (in spin() loop).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-12-09 11:13:09 -0500

I think you mean move_base not amcl who's printing Got new plan and Goal reached. AMCL doesn't know or particularly care about navigation.

The global planners are called to generate a plan from position A to position B. The local planners are the ones that are deciding when the goal is reached. There's no trivial way for the global planner to know this information, check the interface for it [1]. You could in theory create a local planner and a global planner that have a topic they talk over about such things, but nothing out of the box.

What are you trying to accomplish where the global planner needs to know that information? When the controller says its done, the global planner is stopped being called at the replanning rate. I'm not sure what having that information would accomplish if its not being called anymore to make a new plan.

[1] https://github.com/ros-planning/navig...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-12-07 05:29:57 -0500

Seen: 264 times

Last updated: Dec 09 '19