Ask Your Question

Custom Global Path

asked 2018-06-16 09:53:57 -0600

aarontan gravatar image


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!


edit retag flag offensive close merge delete


You can refer to this link text Write your own program (send different coordinates) To reach the path you want

Liuche gravatar image Liuche  ( 2018-06-16 10:27:07 -0600 )edit

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?

aarontan gravatar image aarontan  ( 2018-06-16 10:50:31 -0600 )edit

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

aarontan gravatar image aarontan  ( 2018-06-16 10:54:41 -0600 )edit

@aarontan did you find a solution to this problem? I'm also looking into creating custom paths for the local planner to follow.

M@t gravatar image M@t  ( 2019-06-06 15:43:36 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2018-06-16 11:13:35 -0600

stevejp gravatar image

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.

edit flag offensive delete link more


From my limited experience, I would say this is the way to go @aarontan.

gvdhoorn gravatar image gvdhoorn  ( 2018-06-16 11:14:29 -0600 )edit

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?

aarontan gravatar image aarontan  ( 2018-06-16 11:30:51 -0600 )edit

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

curi_ROS gravatar image curi_ROS  ( 2019-03-07 07:34:24 -0600 )edit

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.

jorge gravatar image jorge  ( 2019-06-06 17:54:58 -0600 )edit

Shouldn't it be /mbf_costmap_nav/exe_path?

curi_ROS gravatar image curi_ROS  ( 2019-06-11 03:30:00 -0600 )edit

Yes, well, depends on how you call MBF node

jorge gravatar image jorge  ( 2019-06-12 07:34:34 -0600 )edit

answered 2018-06-27 22:20:54 -0600

jorge gravatar image

updated 2019-06-06 18:01:24 -0600

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.


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.

edit flag offensive delete link more

answered 2019-06-06 15:38:42 -0600

M@t gravatar image

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.

edit flag offensive delete link more


hi @M@t did you solve your problem ?

snrdevs gravatar image snrdevs  ( 2019-10-22 14:48:49 -0600 )edit

Kind of. I managed to get a custom global planner working by following that tutorial. I didn't try the move_base_flex package

M@t gravatar image M@t  ( 2019-10-23 02:43:01 -0600 )edit

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?

Jerome gravatar image Jerome  ( 2019-10-31 04:34:22 -0600 )edit

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.

M@t gravatar image M@t  ( 2019-10-31 16:42:38 -0600 )edit

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?

Jerome gravatar image Jerome  ( 2019-10-31 21:06:20 -0600 )edit

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.

M@t gravatar image M@t  ( 2019-10-31 21:56:08 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-06-16 09:53:57 -0600

Seen: 1,628 times

Last updated: Jun 06 '19