Generally, I think it's a pretty bad idea to move ros packages that were installed by debian packages (everything in /opt/ros/
). Setting ROS_PACKAGE_PATH will not be enough because the binaries and libraries in ros packages contain RPATH information to not require LD_LIRBARY_PATH set. When you move the packages, the rpaths will become incorrect and you won't be able to run any nodes anymore. A second problem is that every update will re-install ros packages at the old location.
The only thing you can do is creating a symbolic link. You can move /opt/ros and then create the link with:
ln -s /opt/ros <new location of ros>
Originally posted by Lorenz with karma: 22731 on 2012-11-13
This answer was NOT ACCEPTED on the original site
Post score: 2
Original comments
Comment by dornhege on 2012-11-14:
You'd want: ln -s /opt/ros
Comment by Lorenz on 2012-11-14:
Damn. Right. Edited my post. Thanks!