0
$\begingroup$

Rosanswers logo

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?


Originally posted by spmaniato on ROS Answers with karma: 1788 on 2016-03-22

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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:

answers.ros.org remains your resource for asking specific technical questions about ROS, while Discourse should be used for more open-ended discussion and community organization.


Originally posted by David Lu with karma: 10932 on 2016-03-22

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by spmaniato on 2016-03-22:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.