Difference between revisions of "Ros"

From ArchWiki
Jump to: navigation, search
m (Setup Notes)
(30 intermediate revisions by 9 users not shown)
Line 1: Line 1:
Originally from the [http://www.ros.org/wiki/cturtle/Installation/Arch ROS wiki].
+
[[Category:Mathematics and science]]
 
[http://www.ros.org ROS] is an open-source, meta-operating system for your robot. It provides the services you would expect from an operating system, including hardware abstraction, low-level device control, implementation of commonly-used functionality, message-passing between processes, and package management.
 
[http://www.ros.org ROS] is an open-source, meta-operating system for your robot. It provides the services you would expect from an operating system, including hardware abstraction, low-level device control, implementation of commonly-used functionality, message-passing between processes, and package management.
  
== Setup ==
+
With the ROS Fuerte release, it is much easier to get ROS running on an Arch system but still takes some effort. Read the notes below and then go to [http://www.ros.org/wiki/fuerte/Installation/Arch the installation page on the ROS website]
Get dependencies, and create alternate python dir to workaround shebang line in scripts that points to python3. Thanks to [http://evorobo.blogspot.com/2011/07/robotics-operating-system.html DavidS].
+
pacman -S python2 cmake wget python-yaml python2-distribute python-yaml pil python-numpy
+
yaourt -S log4cxx
+
mkdir /usr/local/bin/alt 
+
ln -s /usr/bin/python2 /usr/local/bin/alt/python
+
  
== Rosinstall ==
+
== Setup Notes ==
  
The following lines will download the ROS source code using the rosinstall tool, and bootstrap the installation. The installation downloads all ROS stacks in subdirectories inside the ~/ros directory, one subdirectory for each stack in the rosinstall file.
+
With Fuerte, ROS is split into two levels. The core libraries are installed into the system folders ({{ic|/opt/ros/fuerte}}) while the higher-level stacks and packages are installed in the user folders.
  
First install rosinstall:
+
The Arch-specific install page lists the packages (official and AUR) that you will need to install for a full setup.
  
sudo easy_install-2.7 -U rosinstall
+
{{AUR|ros-core}}, available in the [[AUR]], is the package for the core libraries.
  
Then use rosinstall to download your preferred C-Turtle variant:
+
To build the higher level packages you will need to do some work:
  
ROS-only: Includes basic ROS and tutorials.
+
# Install [[AUR]] packages: {{AUR|ros-on-arch}} {{AUR|pcl-ros}} {{AUR|swig-wx}} {{AUR|qhull-ros}}
 
+
# Pull the sources with {{ic|rosinstall}}
rosinstall ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=cturtle&variant=ros_only&overlay=no"
+
# Patch the sources to compile with GCC 4.7 [https://code.ros.org/trac/ros-pkg/attachment/ticket/5417/ros.patch]
 
+
# Resolve dependencies with {{ic|rosdep}}
Base Install: ROS plus robot-generic stacks (e.g. navigation, visualization)
+
# Build with {{ic|rosmake}}
 
+
rosinstall ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=cturtle&variant=base&overlay=no"
+
 
+
PR2 Install: ROS plus PR2-specific stacks, including PR2 simulator.
+
 
+
rosinstall ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=cturtle&variant=pr2&overlay=no"
+
 
+
PR2 All Install: ROS plus PR2 and bleeding edge research/experimental stacks.
+
 
+
rosinstall ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=cturtle&variant=pr2all&overlay=no"
+
 
+
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.
+
 
+
==Environment Setup==
+
 
+
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
+
 
+
For Zsh users, change the last line of ~/ros/setup.zsh to
+
 
+
source $ROS_ROOT/tools/rosbash/roszsh
+
 
+
before running source ~/ros/setup.zsh Similarly, have the setup script called at the start of each new shell session with
+
 
+
echo "source ~/ros/setup.zsh" >> ~/.zshrc
+
. ~/.zshrc
+
 
+
== Tutorials==
+
 
+
Now, to test your installation, please proceed to the [http://www.ros.org/wiki/ROS/Tutorials ROS Tutorials].
+

Revision as of 05:05, 12 October 2012

ROS is an open-source, meta-operating system for your robot. It provides the services you would expect from an operating system, including hardware abstraction, low-level device control, implementation of commonly-used functionality, message-passing between processes, and package management.

With the ROS Fuerte release, it is much easier to get ROS running on an Arch system but still takes some effort. Read the notes below and then go to the installation page on the ROS website

Setup Notes

With Fuerte, ROS is split into two levels. The core libraries are installed into the system folders (/opt/ros/fuerte) while the higher-level stacks and packages are installed in the user folders.

The Arch-specific install page lists the packages (official and AUR) that you will need to install for a full setup.

ros-coreAUR, available in the AUR, is the package for the core libraries.

To build the higher level packages you will need to do some work:

  1. Install AUR packages: ros-on-archAUR pcl-rosAUR swig-wxAUR qhull-rosAUR
  2. Pull the sources with rosinstall
  3. Patch the sources to compile with GCC 4.7 [1]
  4. Resolve dependencies with rosdep
  5. Build with rosmake