ROS_ROOT and ROS_PACKAGE_PATH are environment variables, not files. They tell the operating system where to look for all the ROS stuff on your computer. Have a look here for more info. You want ROS_PACKAGE_PATH to include all the directories where your ros code is.
In linux, the echo command prints things out. To print out the values of system variables, you'd use the $
symbol before the variable. So echo $ROS_PACKAGE_PATH
will show you what ROS_PACKAGE_PATH currently is. Type man echo
for more info about echo.
In linux, /
is the root of the filesystem. You probably don't want to put stuff there. Have a look at the FHS wikipedia page for more info about what normally goes in each directory in linux.
When they say 'user', they mean whatever your user name is. /home/<your user name here>
is considered your home directory. Type whoami
to figure out what your user name is, and type cd ~
to go to your home directory.
EDIT
Yes, you'll have to change /another/path
. In fact, any folder that has ros packages that you want to be able to access needs to be on the ROS_PACKAGE_PATH. What folders there are depends on you and your needs.
For example, the default packages are in /opt/ros/fuerte/share/ros
, /opt/ros/fuerte/stacks
and /opt/ros/fuerte/share
. Then the standard ROS_PACKAGE_PATH would be
/opt/ros/fuerte/stacks:/opt/ros/fuerte/share:/opt/ros/fuerte/share/ros
However, lets also say you made two directories in your home folder for holding ros workspaces: dirA and dirB. Then you'd want to add them to the ROS_PACKAGE_PATH, like so:
/home/jay/dirA:/home/jay/dirB:/opt/ros/fuerte/stacks:/opt/ros/fuerte/share:/opt/ros/fuerte/share/ros
In that case, dirA would be searched before dirB. To give preference to dirB packages, you'd use
/home/jay/dirB:/home/jay/dirA:/opt/ros/fuerte/stacks:/opt/ros/fuerte/share:/opt/ros/fuerte/share/ros
EDIT 2:
So for one workspace I do: export
ROS_PACKAGE_PATH=/home/user/ros/ros-pkg//opt/ros/fuerte/stacks:/opt/ros/fuerte/share:/opt/ros/fuerte/share/ros
?
almost. Don't forget the colon between paths. It should be
export ROS_PACKAGE_PATH=/home/jay/ros/ros-pkg:/opt/ros/fuerte/stacks:/opt/ros/fuerte/share:/opt/ros/fuerte/share/ros
And that assumes there is a folder called ros/ros-pkg in your home directory where all your code is.
My intentions are to use the ARDrone
so I assume I have to change the above
eventually? Would you use two
workspaces to work on two different
robots?
That's up to you. Have a look at rosws if you're going to use multiple workspaces, though. Also note that the new build system, catkin, doesn't use ROS_PACKAGE_PATH.
EDIT 3:
Okay I am starting to piece it all together from the tutorial also. The
tutorial makes a 'fuerte_workspace' folder with setup.* folders and a
sandbox folder.
Actually, setup.bash (and the like ... (more)