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

First: don't do what you are trying to do. It is unnecessary to manually edit the ROS_PACKAGE_PATH. It will automatically be updated to include the proper paths whenever you source your target workspace (which in your case I'm guessing is located at ~/dev/rosbook.

Second: if you really want to do this, notice that you are missing a = (equals) between ROS_PACKAGE_PATH and ~/dev/rosbook. That most likely leads bash to interpret the entire line as the name of the environment variable that you are trying to set. It then notices that that name includes some illegal characters (ie: characters that cannot be part of an environment variable's name), and thus it prints that error message.

First: don't do what you are trying to do. It is unnecessary to manually edit the ROS_PACKAGE_PATH. It will automatically be updated to include the proper paths whenever you source your target workspace (which in your case I'm guessing is located at ~/dev/rosbook.

After building your workspace, do a source ~/dev/rosbook/devel/setup.bash. That will setup the correct paths.

Second: if you really want to do this, notice that you are missing a = (equals) between ROS_PACKAGE_PATH and ~/dev/rosbook. That most likely leads bash to interpret the entire line as the name of the environment variable that you are trying to set. It then notices that that name includes some illegal characters (ie: characters that cannot be part of an environment variable's name), and thus it prints that error message.

To fix it: open your .bashrc, locate the line that starts with export ROS_PACKAGE_PATH and insert the =. Save, resource.

But note that I don't recommend manually changing ROS_PACKAGE_PATH.