Size: 6664
Comment:
|
Size: 6680
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
<<TOC(3)>> |
Contents
See also: Downloading source code
Step 1: preinstall (os-specific)
This step brings your machine up to the minimal functionality needed to run the ROS installer: gcc, Python 2.5+, PyYaml, CMake, Subversion, and wget.
Ubuntu 08.04 and newer:
sudo apt-get install build-essential python-yaml cmake subversion
Fedora 11:
sudo yum groupinstall 'Development Tools' sudo yum install wget cmake PyYAML
Arch Linux:
sudo pacman -S python cmake wget yaourt -S python-yaml
Mac OS X 10.5 (experimental):
Install Apple's Developer Tools: http://developer.apple.com/Tools
Install MacPorts http://www.macports.org/install.php
If you have problems, you may find help at ROS/OSX ROS will work with either Python 2.5 ("py25") or Python 2.6 ("py26"). Here are instructions for using Python 2.5:
sudo port -v selfupdate sudo port install wget cmake py25-yaml python_select sudo python_select python25 sudo ln -s /opt/local/Library/Frameworks/Python.framework /Library/Frameworks/
rosboost-cfg cannot generate the correct include/link path of boost library installed by macports. You will need to use this workaround (you may want add into your .bashrc) :
export CPATH=/opt/local/include export LIBRARY_PATH=/opt/local/lib
Step 2: install (os-neutral)
The rosconfig tool can now install a configuration of ROS on your machine. The following lines will download the ROS source code, and bootstrap the installation. The sample configuration used below will place everything in subdirectories inside the ~/ros directory, one subdirectory for each entry in the rosconfig file. This will take a while, but it should be fully automated once the initial system dependencies are installed by the rosdep tool.
wget --no-check-certificate http://ros.org/rosconfig -O ~/rosconfig chmod 755 ~/rosconfig
You now need to rosconfig to install using a config file. We've created two default configs to use: "all" (kitchen sink) and "ros" (just ROS). The rosconfig format is just a list of SVN repositories, so it's easy to create your own.
Kitchen Sink Install: (recommended, includes tutorials and various packages)
~/rosconfig bootstrap -s http://ros.org/rosconfigs/all.rosconfig ~/ros roscpp
ROS-only Install: (does not include tutorials)
~/rosconfig bootstrap -s http://ros.org/rosconfigs/ros.rosconfig ~/ros roscpp
Willow Garage Install: Willow Garage employees should use the wg-all configuration, which pulls ros from the rc tag:
~/rosconfig bootstrap -s http://ros.org/rosconfigs/wg-all.rosconfig ~/ros roscpp
Environment Setup: It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:
~/rosconfig setup ~/ros > ~/.bashrc.ros echo "source ~/.bashrc.ros" >> ~/.bashrc
Then, open a new terminal window, logout/login, or source your ~/.bashrc file.
Step 3 (optional): simple talker/listener test
This requires kitchen sink installation as the ros-only installation does not install tutorials.
First start the ROS core, which includes the ROS Master.
$ roscore
you should see something like
SUMMARY ======== NODES starting new master (master configured for auto start) process[master]: started with pid [18594] ROS_MASTER_URI=http://your-hostname:11311/ setting /run_id to 1234567890-1234-1234-1234-1234567890 process[rosout-1]: started with pid [12345] started core service [/rosout]
Then start the talker/listener demo in the 'rospy_tutorials' package with roslaunch.
$ roslaunch rospy_tutorials talker_listener.launch
It starts a "talker" and a "listener", you should see the outputs of the two programs interleaving:
[INFO] 1259822357.896063: hello world 1259822357.9 [INFO] 1259822357.896482: /listenerI heard hello world 1259822357.9 [INFO] 1259822357.996013: hello world 1259822358.0 [INFO] 1259822357.996540: /listenerI heard hello world 1259822358.0 [INFO] 1259822358.096021: hello world 1259822358.1
Use ctrl-C to stop.
for more information see the ROS Tutorials.
Step 4 (optional): demonstration
WARNING: this demonstration needs to build a GUI program which requires third-party library. Beginners may want to check "Simple" command-line ROS/Tutorials first.
The following steps will build the navigation system, a 2-d robot simulator (Stage), a graphical interface, and their dependencies. Depending on your machine speed, this could take a while to build.
The following steps are quite generic for building ROS packages. In this case we'll be building the move_base_stage package.
First, let rosdep try to satisfy the system dependencies of move_base_stage on your platform:
rosdep install move_base_stage
If that succeeded, or you otherwise know the dependencies are satisfied, use rosmake to recursively build move_base_stage and its dependencies:
rosmake move_base_stage
If that succeeded, you can now run the demo:
roscd move_base_stage roslaunch move_base_fake_localization_2.5cm.launch
A window will pop up with a map on it. Click the "Set Goal" button on the top of the window, then left-click, drag, and release somewhere on the map to specify a navigation goal position and heading. The simulated robot will then plan a path and start driving.
Step 5 (really optional): multiple machines
If you are installing ROS on multiple machines, you'll need to run this routine on all of them. However, if your machines have a shared file system (so the ~ directory is shared), you only need to check out and make one time. However, you'll need to:
sudo apt-get install build-essential python-yaml cmake subversion
On all machines first, and:
rosdep install move_base_stage
on all machines after you built ROS on the first machine. This is because while ROS may be shared, the system dependencies are not.
Additionally, if multiple developers are working on the same machine (e.g., a machine onboard a robot), a shared installation might save space and time. (Note that this is somewhat more complicated than the single-user installation.)
There is an experimental method to install pre-compiled binaries.