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

Customizing / extending move_base

asked 2016-03-22 10:54:59 -0500

spmaniato gravatar image

updated 2016-03-22 10:56:23 -0500

Let's say I want to customize or modify the implementation of move_base. For example, I might want to add functionality, such that the one described here and here, or simply tweak the logic of its internal state machine a bit. Let's assume these changes will not end up in a pull request and merged upstream, which gives us more wiggle room. Let's also assume that I want to have access to the original version of move_base.

What would be an elegant way of adding such functionality? Here are some thoughts:

  • "Fork" move_base (i.e., copy its source code), rename everything to custom_move_base or something, and implement the desired functionality / extensions in this new package. This would make it hard to maintain though. An example of this is hector_move_base_navigation
  • Implement a new class that inherits from move_base. This would avoid duplicating simple functions, such as isQuaternionValid, but would allow for overriding the key functionality, such as executeCycle. I have a hunch that this will be more complicated than it sounds.
  • If the extensions / modifications were focused on a specific aspect of move_base, e.g. the state machine logic, then maybe it would make sense to introduce, e.g., "state machine plugins" which would make the internal behavior of move_base configurable. Then the current logic would just be one of many possible options.

Looking forward to your thoughts :-)

PS. Now that we have Discourse, would this question be a better fit for that as opposed to ROS Answers?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-03-22 11:24:34 -0500

David Lu gravatar image

I have done some work on this front, enabling this demo

The work is in this branch, although it breaks a number of existing binaries, so I never worked on merging it. What I should do is something similar to option 1 to enable option 3.

P.S. From the announcement: remains your resource for asking specific technical questions about ROS, while Discourse should be used for more open-ended discussion and community organization.

edit flag offensive delete link more


Very cool. Thanks David. That branch of yours has other useful functionality too, such as the additional MoveBase action feedback :-)

Thanks for answering the meta-question too.

spmaniato gravatar image spmaniato  ( 2016-03-22 11:43:09 -0500 )edit

Question Tools



Asked: 2016-03-22 10:54:59 -0500

Seen: 566 times

Last updated: Mar 22 '16