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

Revision history [back]

Just to provide some explanation to the previous answers: changing files in /opt/ros/... is a very bad idea, because first, your changes can be overwritten by APT updates, and second, it becomes very hard to isolate whether there is a bug in ROS, or a bug in your changes or other code. It is much better to copy the package you wish to change somwhere into your home directory (that way you'll have write access to it), and prepend that directory to your ROS_PACKAGE_PATH. So in order to revert to a "clean" ROS installation without your changes, you just have to remove your home dir from your ROS_PACKAGE_PATH. This is not possible if you change files directly.

Just to provide some explanation to the previous answers: changing files in /opt/ros/... is a very bad idea, because first, your changes can be overwritten by APT updates, and second, it becomes very hard to isolate whether there is a bug in ROS, or a bug in your changes or other code. It is much better to copy the package you wish to change somwhere somewhere into your home directory (that way you'll have write access to it), and prepend that directory to your ROS_PACKAGE_PATH. So in order to revert to a "clean" ROS installation without your changes, you just have to remove your home dir from your ROS_PACKAGE_PATH. This is not possible if you change files directly.