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

Revision history [back]

click to hide/show revision 1
initial version

What files are you concerned about? If you didn't use any hard coded, absolute paths in any of your sources / scripts, then the location of a package should not affect its proper functioning (or building).

As long as everything is (indirectly) on your ROS_PACKAGE_PATH, things should be fine.


As an example, to make use of a file inside my_package in the /home/me/somedir directory, instead of doing:

do_something_with /home/me/somedir/my_package/my_file

do:

do_something_with `rospack find my_package`/my_file

this way it doesn't matter where my_package is, as long as rospack can find it.

What files are you concerned about? If you didn't use any hard coded, absolute paths in any of your sources / scripts, then the location of a package should not affect its proper functioning (or building).

As long as everything is packages are (indirectly) on your ROS_PACKAGE_PATH, things should be fine.fine. ROS will sort out the locations of packages during building and execution, using the information in the manifest.xml file (among other things). rosmake also sets up the include paths for C++ code.


As an example, For bash scripts, use rospack: to make use of a file inside my_package in the /home/me/somedir directory, instead of doing:

do_something_with /home/me/somedir/my_package/my_file

do:

do_something_with `rospack find my_package`/my_file

this way it doesn't matter where my_package is, as long as rospack can find it.

tl;dr: stay away from absolute paths and things should 'just work'.

What files are you concerned about? If you didn't use any hard coded, absolute paths in any of your sources / scripts, then the location of a package should not affect its proper functioning (or building).

As long as packages are (indirectly) on your ROS_PACKAGE_PATH, things should be fine. ROS will sort out the locations of packages during building and execution, using the information in the manifest.xml file (among other things). rosmake also sets up the include paths for C++ code.

For bash scripts, use rospack: to make use of a file inside my_package in the /home/me/somedir directory, instead of doing:

do_something_with /home/me/somedir/my_package/my_file

do:

do_something_with `rospack find my_package`/my_file

this way it doesn't matter where my_package is, as long as rospack can find it.

tl;dr: stay away from absolute paths and things should 'just work'.

PS: a rosmake --pre-clean might be a good thing to do after moving them.