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

how to stop an ubuntu update overwriting my code changes in ros?

asked 2011-09-27 22:15:19 -0600

harmish gravatar image

updated 2012-02-27 14:04:49 -0600

kwc gravatar image

sometime i need to change a little in some of the ros packages for my use, e.g. in navfn and move_base. then comes the new ubuntu update and it overwrites my changes! what is the best workaround for this problem? (ofcourse, i need a solution other than not updateing ;)

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
3

answered 2011-09-28 11:17:02 -0600

Mac gravatar image

The easiest way is to do a local (in ~/ros, for example) checkout of a the source code for a particular package, and then (as noted above) make sure it appears before /opt/ros/... in your ROS_PACKAGE_PATH.

But this is not going to generalize well, particularly if you want to distribute your code, because then everybody's going to need your patched version of move_base (or whatever).

If you're finding bugs, send them to the maintainers. Otherwise, a formal fork is going to be a better choice.

edit flag offensive delete link more
0

answered 2011-09-27 23:52:42 -0600

The best solution would be to submit your patches to the package maintainer(s) and let them be added to the official sources. Another solution would be to fork the package(s) under a different name, and keep developing them on your own.

You can also make a local copy of the package(s) in the same directory where you keep your own stuff. If this location comes before the /opt/ros/VERSION/stacks path in your ROS_PACKAGE_PATH, all ROS tools will use your edited copy instead of the distributed version.

However, this is essentially a fork where you keep the old name, creating all sorts of compatibility problems. I'd advise against this for anything else than a few added debugging outputs or an emergency fix if you can't wait for an upgraded version.

edit flag offensive delete link more
0

answered 2011-09-28 12:43:33 -0600

hsu gravatar image

Just want to note that if you do an overlay, ideally you want to pull in the stack you are planning on modifying, as well as any stack that depends on your stack. As you can see, this might get out of control quickly, especially if you are modifying a low level stack.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-09-27 22:15:19 -0600

Seen: 948 times

Last updated: Sep 28 '11