How can i call BaseGlobalPlanner::makePlan(...) from my navigation stack

asked 2015-07-23 09:52:54 -0500

Gork gravatar image


since english isn't my first language, I hope I can explain my problem well enough and I am thanking you in advance for slogging through this mess of a text.

I'm kind of new to ROS and was using the navigation stack as a part of my bachelor thesis. I followed this tutorial to send goals to the move_base and it's working out just fine. I'm using v-rep to simulate the robot and rviz to visualize the costmaps and plans. I properly configured all necessary publishers (odom, tf, etc.).

I can record and save a list of points to which I can navigate to, but now I want to get the shortest path from my robot to a defined origin, while driving through a list of checkpoints i recorded earlier. To solve this TSP-like problem I would love to get the distance between two points (for building a graph). I already found out that I can get the length of a path by adding all the distances of a plan (list of points).

The method nav_core::BaseGlobalPlanner::makePlan(const geometry_msgs::PoseStamped &start, const geometry_msgs::PoseStamped &goal, std::vector< geometry_msgs::PoseStamped > &plan)

offers exactly that. I can input two points and a reference to a list, which is filled upon calling the method. But I don't know how I can call it. Is there an already implemented way to call the function like in the tutorial where i used an ActionClient?

Am I on a completly wrong path? Thanks in advance for your answer!

Greetings, Gork

edit retag flag offensive close merge delete