[Documentation] [TitleIndex] [WordIndex

rosinstall

The following steps requires two separate installation steps and will compile ROS-related code into two separate places/layers:

  1. Download and install the underlying core ROS libraries and tools into /opt/ros/fuerte.

  2. Download and build some higher-level ROS libraries using rosmake in ~/ros.

The compiled code from (1) is installed into /opt/ros/fuerte. While it is possible to install elsewhere (e.g. /usr), this is not well tested and you will encounter various problems along the way (e.g. having to change rosinstall files, having to manually install system dependencies, etc...). Please see REP 122: Filesystem Hiearchy Layout for more detailed documentation on how the installed files are placed.

The compiled code from (2) is simply built using rosmake, which is familiar to users of previous versions of ROS. The higher-level ROS stacks are download and build in subdirectories inside the ~/ros directory.

First install rosinstall, rospkg and rosdep as described in their instructions:

If you have trouble using rosws/rosinstall, you can manually download the projects by investigating the respective rosinstall file.

Layer 1: Install core libraries

The following instructions will create a system install of the core ROS libraries and tools. The installation is done using standard CMake/make tools, so experts can adjust to their liking.

For people having trouble with rosinstall or catkin on their particular OS: If you have downloaded the source files in a different way, you need to run catkin_init_workspace ~/ros-underlay. This script is part of catkin, which should by now also at least be in your workspace, you can use the script without installing catkin. It should create a suitable global CMakeLists.txt to use in the next step.

If you do not want to use catkin, follow standard cmake procedure for building cmake packages, and install the packages in the dependency order by manually checking the package.xml declarations.

Build and install the underlay into /opt/ros/fuerte:

Now, run cmake. The invocation depends on the platform you are on:

Finally, build + install the code:

Useful TIP: If you encounter problems with the make command due to "Unable to find 'swig.swg'" and "Unable to find 'python.swg'" errors then it probably due to the installation script having placed /swig at the toplevel/root directory.

To get around this problem do the following (and then restart make process as above)

cd /
sudo cp -r /swig /usr/local/share
cd ~/ros-underlay/build

Useful TIP: If you are having trouble with the make install command due to lib64 and lib problems, a work around is

cd /opt/ros/fuerte/
sudo mv lib/* lib64/
sudo rmdir lib
sudo ln -s lib64 lib

This makes the lib and the lib64 directory linked together and the make install command should work now.

Verify the installed environment:

You should see:

You can delete ~/ros-underlay now, if you wish. The ROS core libraries are now installed onto your system.

Layer 2: Higher-level robotics libraries and tools

Now it's time to create the second layer, which contains your main robotics libraries (e.g. navigation) as well as visualization tools like rviz. You will build this layer using rosmake, but it is not installed.

There are many different libraries and tools in ROS. We provided four default configurations to get you started.

NOTE: The rosinstall installation files below assume that you've installed into /opt/ros/fuerte, so you will need to change them manually if you have a different install path.

NOTE: the instructions above download all stacks inside the ~/ros folder. If you prefer a different location, simply change the ~/ros in the commands above.

Please reference REP 113 for description of other available configurations.

Environment Setup

Shell language:   Bash     Zsh    

You'll now need to update your environment. You can do this by typing:

source ~/ros/setup.bash

It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched, which you can do with the command below:

echo "source ~/ros/setup.bash" >> ~/.bashrc
. ~/.bashrc

You'll now need to update your environment. You can do this by typing:

source ~/ros/setup.zsh

It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched, which you can do with the command below:

echo "source ~/ros/setup.zsh" >> ~/.zshrc
. ~/.zshrc

Build Higher-level/tools (Layer 2)

First, initialize your rosdep. ROS Fuerte comes with rosdep 2. If you get a message that your default sources list exists, then don't worry as it means you've done this before.

Now, use rosdep 2 to install system dependencies. Many of the system dependencies will install into /opt/ros/fuerte and will not be usable if you have changed the installation prefix.

Useful TIP: to get rid of constant prompts of being sure with proceeding, you can use -y switch to tell the package manager to default 'Yes' while installing.

Finally, build the ROS stacks using rosmake.


2024-11-23 14:38