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

Two things: If /opt/ros/hydro/share:/opt/ros/hydro/stacks is already in ROS_PACKAGE_PATH, you don't need to put it in your export line. This command overwrites the variable, and by putting :$ROS_PACKAGE_PATH at the end of your path, you're say add everything that is already in the variable.

Second, I don't know if it matters, but I would try exactly what you have but without the space between the equals sign and the beginning of your path, like this: export ROS_PACKAGE_PATH=/home/user/<name_of-directory_i_want_to_add>:/opt/ros/hydro/share:/opt/ros/hydro/stacks:$ROS_PACKAGE_PATH

Two things: If /opt/ros/hydro/share:/opt/ros/hydro/stacks is already in ROS_PACKAGE_PATH, you don't need to put it in your export line. This command overwrites the variable, and by putting :$ROS_PACKAGE_PATH at the end of your path, you're say add everything that is already in the variable.

Second, I don't know if it matters, but I would try exactly what you have but without the space between the equals sign and the beginning of your path, like this: export ROS_PACKAGE_PATH=/home/user/<name_of-directory_i_want_to_add>:/opt/ros/hydro/share:/opt/ros/hydro/stacks:$ROS_PACKAGE_PATH

Edit: Also, like the comment the other fella made, if you're just typing this into the command prompt, this is only going to be effective for your current terminal. By adding it to your bashrc file, it will take effect on any new terminals in the future.