Custom Global Path
Hello,
I am trying to do some tests evaluating the performances of different local path planners.
In order to do so, I need to create a custom predefined global path that I will run in an empty_world each time with different local planners. The path must be the same between tests to ensure consistency.
Does anyone have any idea on how to achieve a custom global path? I would like to include straight line paths, circular path with predefined radius and sine wave paths.
Thanks in advance!
Aaron
Asked by aarontan on 2018-06-16 09:53:57 UTC
Answers
I've used the move_base_flex package as a replacement for move_base
to do similar testing with local planners on pre-defined global paths. With the default move_base
setup (i.e., what is explained in the basic navigation tutorials), you have access to a single action (MoveBase.action), which consists of your current pose and a desired goal.
In move_base_flex
, additional actions are exposed (namely, GetPath.action, ExePath.action, and Recovery.action). So if you wanted, you could just directly send the move_base_flex
action server an ExePath.action (which would contain an array of poses defining the global path), and the mbf navigation server would use that global path with the local planner you have specified.
Asked by stevejp on 2018-06-16 11:13:35 UTC
Comments
From my limited experience, I would say this is the way to go @aarontan.
Asked by gvdhoorn on 2018-06-16 11:14:29 UTC
thanks for your reply, can you provide me some help with sending exepath.action to the move_base_flex action server?
any documentation in which I could read to try to learn how to do this?
Asked by aarontan on 2018-06-16 11:30:51 UTC
Did you figure out how to send the ExePath.action to the move_base_flex server? I populated an ExePathGoal msg but sendGoal() does not work to put it on the MoveBase Action Server
Asked by curi_ROS on 2019-03-07 08:34:24 UTC
The ExePath action namespace is /move_base_flex/exe_path. /move_base_flex/move_base (of type MoveBase) is a replacement of old move_base action, where you provide just a target pose.
Asked by jorge on 2019-06-06 17:54:58 UTC
Shouldn't it be /mbf_costmap_nav/exe_path
?
Asked by curi_ROS on 2019-06-11 03:30:00 UTC
Yes, well, depends on how you call MBF node
Asked by jorge on 2019-06-12 07:34:34 UTC
Just developing a bit previous answer. If you check ExePath action, the only field you need to fill is:
nav_msgs/Path path
That is, set path.header.frame_id to your poses reference frame and path.poses with a list of geometry_msgs/PoseStamped messages. You can generate the paths with whatever mathematic function you want, just calculating x, y and yaw. Pose can be separated by nearly every distance; DWA local planner is not picky about following sparse paths. I use something in the 10cm order.
UPDATE
This script mentioned by @aarontan looks like a good starting point: changing it to call /move_base_flex/exe_path action server with the generated path should be trivial.
Asked by jorge on 2018-06-27 22:20:54 UTC
Comments
Another possible solution to your problem would be to write your own global planner as a plugin for the move_base
node. There is a tutorial that will walk you through the process here.
I haven't tried either approach yet so I can't say whether this would be easier or harder to do that get move_base_flex working.
Asked by M@t on 2019-06-06 15:38:42 UTC
Comments
hi @m@t did you solve your problem ?
Asked by snrdevs on 2019-10-22 14:48:49 UTC
Kind of. I managed to get a custom global planner working by following that tutorial. I didn't try the move_base_flex package
Asked by M@t on 2019-10-23 02:43:01 UTC
Hi @M@t, may i ask if you have tried to load a nav_msgs/Path msg into the global planner, i.e. by subscribing to the topic?
Asked by Jerome on 2019-10-31 04:34:22 UTC
You mean have my custom planner subscribe to a nav_msgs/Path
topic and then send that path to move_base
? No I didn't try that but I don't see why it wouldn't work.
Asked by M@t on 2019-10-31 16:42:38 UTC
I wrote a subscriber portion into my custom planner plugin but when I ran move_base, there was no subscriber node created. Do you have an example of your code for the customs global planner plugin which subscribed to a topic?
Asked by Jerome on 2019-10-31 21:06:20 UTC
I'm not quite sure what you've done sorry. So I suggest at this point that you create a separate question where you can add more detail, rather than us trying to solve your problem in these comments. Link me to it and I'll take a look. I can certainly provide example code if that helps, but I can't guarantee a solution for you as I'm not very familiar with this part of ROS.
Asked by M@t on 2019-10-31 21:56:08 UTC
Comments
I have tried this, but I am not sure how I can define circular to sinewave like paths using this. Do you have any suggestions?
Asked by aarontan on 2018-06-16 10:50:31 UTC
I have tried this package to publish a path on the nav_msgs/Path topic.
I am using the husky_navigation stack as well and I can see the path shown in rviz but my husky does not move along the path
I feel that I am missing a connection somewhere
Asked by aarontan on 2018-06-16 10:54:41 UTC
@aarontan did you find a solution to this problem? I'm also looking into creating custom paths for the local planner to follow.
Asked by M@t on 2019-06-06 15:43:36 UTC