ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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.
2 | No.2 Revision |
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
3 | No.3 Revision |
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.
4 | No.4 Revision |
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) are scripts, not folders. These files just call the terminal programs to set up environment variables that tell the system where to find files and folders with ros stuff in them. You can see what commands they run by typing cat setup.bash
. But yes, that's what the tutorial does.
Should /ros/ros-pkg have only setup.* or should I copy my fuerte folder from /opt ?
Again, in the linux world, /
is root, and you probably don't want to put anything there. ~/ros/ros-pkg
(your home directory) is probably what you meant.
Anyway, don't copy everything in your fuerte folder to ~/ros. The scripts in ~/ros source the ones in /opt/ros/ already. The way it's set up, you can use what are called overlays to change workspaces. It's much more flexible that way.
Could anyone clarify what the row/ros-pkg should be?
You're thinking too hard. : ) ros/ros-pkg is just another generalization, kind of like user
. When they say ros
, they mean your workspace or whatever folder you're putting your packages in. There could be a bunch of them and they could have different names. fuerte_workspace
(as is the case in the tutorial), ros_tutorials
, ros_sandbox
, my_ros_packages
, or just plain ros
(as is the case in the environment variables wiki page). It doesn't matter what they're called or where they are or how many of them there are. They just all have to be on the ROS_PACKAGE_PATH.
ros-pkg is another generalization. Substitute whatever the name of your package is for that. In it is the src folder with all the source files, the cfg folder with config files, include with all the includes, the CMakeLists.txt, and all the other stuff that goes in packages.