Robot Operating System: Difference between revisions

From air
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
ROS (a.k.a Robot Operating System or Robot OS), can be seen as a kind of Robotic Framework. Because it can't be installed directly on robotic Equipment (ROS needs a computer and works above its OS), it can't be considered as a pure operating system. In addition to providing a complete development and execution environment, ROS includes numerous simulation tools. However, it does not guarantee runtime properties, services or event processing in deterministic time spots (ie [http://en.wikipedia.org/wiki/Real-time_computing realtime processing]), though it is possible to integrate ROS with realtime code ([http://opencv.org/ openCV] is supported).<br/> Originally developed in 2007 by the Stanford Artificial Intelligence Laboratory ([http://stair.stanford.edu/ see Stair Project]), ROS is now widely used by the robotic ecosystem thanks to the open source community and [http://www.willowgarage.com/ Willow Garage] ( a robotics research institute/incubator, which produce the famous [http://www.willowgarage.com/pages/pr2/overview PR2] or [http://www.willowgarage.com/turtlebot TurtleBot] and is currently making the main development).<br/> Many robots are supported: [http://www.wifibot.com/ WifiBot], [[Lego Mindstorm NXT]], [[Bras Robotique Handicap| Robotic Arms Lynx Motion]]
ROS (a.k.a Robot Operating System or Robot OS), can be seen as a kind of Robotic Framework. Because it can't be installed directly on robotic Equipment (ROS needs a computer and works above its OS), it can't be considered as a pure operating system. In addition to providing a complete development and execution environment, ROS includes numerous simulation tools. However, it does not guarantee runtime properties, services or event processing in deterministic time spots (ie [http://en.wikipedia.org/wiki/Real-time_computing realtime processing]), though it is possible to integrate ROS with realtime code ([http://opencv.org/ openCV] is supported).<br/> Originally developed in 2007 by the Stanford Artificial Intelligence Laboratory ([http://stair.stanford.edu/ see Stair Project]), ROS is now widely used by the robotic ecosystem thanks to the open source community and [http://www.willowgarage.com/ Willow Garage] ( a robotics research institute/incubator, which produce the famous [http://www.willowgarage.com/pages/pr2/overview PR2] or [http://www.willowgarage.com/turtlebot TurtleBot] and is currently making the main development).<br/> Many robots are supported: [http://www.wifibot.com/ WifiBot], [[Lego Mindstorm NXT]], [http://personalrobotics.ri.cmu.edu/ HERB].




Line 128: Line 128:
== Others ==
== Others ==


== Polytech' Projects which use ROS ==

[[RobAir 2013]]
[[Armind]]
==API==
==API==
===Javascript===
===Javascript===

Revision as of 14:00, 7 April 2013

ROS (a.k.a Robot Operating System or Robot OS), can be seen as a kind of Robotic Framework. Because it can't be installed directly on robotic Equipment (ROS needs a computer and works above its OS), it can't be considered as a pure operating system. In addition to providing a complete development and execution environment, ROS includes numerous simulation tools. However, it does not guarantee runtime properties, services or event processing in deterministic time spots (ie realtime processing), though it is possible to integrate ROS with realtime code (openCV is supported).
Originally developed in 2007 by the Stanford Artificial Intelligence Laboratory (see Stair Project), ROS is now widely used by the robotic ecosystem thanks to the open source community and Willow Garage ( a robotics research institute/incubator, which produce the famous PR2 or TurtleBot and is currently making the main development).
Many robots are supported: WifiBot, Lego Mindstorm NXT, HERB.


Installation

Setup sources.list

In a terminal, type the following line:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu <distribution> main" > /etc/apt/sources.list.d/ros-latest.list'

where <distribution> is your Ubuntu ditsribution name (e.g. "precise", "quantal", "raring", ...) This will add ROS repositories to your distribution.

Setup your keys

wget http://packages.ros.org/ros.key -O - | sudo apt-key add -

Now, you are able to download the latest updates from ROS.

Installation

Update the Debian packages:

sudo apt-get update

Install the full Groovy configuration:

sudo apt-get install ros-groovy-desktop-full

It will install ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception.

Initialize rosdep:

sudo rosdep init
rosdep update

This tool is used to install system dependencies required by ROS packages.

ROS is now installed but in order to run it, some environment variables must be assigned. This can be automatically done at the launch of the session:

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


Install python tools:

sudo apt-get install python-rosinstall python-rosdep

Finally, execute the script:

~/.bashrc

Configuration

Create a ROS workspace:

rosws init ~/groovy_workspace /opt/ros/groovy
mkdir ~/groovy_workspace/sandbox
rosws set ~/groovy_workspace/sandbox

Every time you modify or add entries in your workspace, re-source ~/groovy_workspace/setup.bash:

source ~/groovy_workspace/setup.bash


Use ROS

Principles

  • Packages

ROS is organized in packages. They include, among other, ROS nodes. They allows developers to easily reuse pieces of software. You can create a package by hand or with the command: roscreate-pkg <package-name>. Actually, a ROS package is nothing but a directory descended from ROS_PACKAGE_PATH that has a manifest.xml file in it. A package may include the following contents:
msg/: message types
srv/: service types
scripts/: executable scripts (Pyhton sources for example)
CMakeLists.txt/: CMake build file (ROS package are build with [CMake], this file describes how to do it)
manifest.xml/: minimal specification about the package: describes metadata and dependancies (see an example)
To build a package, type rosmake <package-name>

  • Nodes
  • Topics
  • Publishers/subscribers

Useful commandline tools

  • roscd [package_name]: change directory directly to a package (indepently from your current directory)
  • rosls [package_name]: list directory contents directly


Troubleshooting

  • Error messages:
    • "No ROS_WORKSPACE set": check if your environment variable ROS_WORKSPACE is assigned (echo $ROS_WORKSPACE). If not, update your .bashrc file (echo "export ROS_WORKSPACE=/home/<username>/groovy_workspace" >> ~/.bashrc).
    • "No ROS_PACKAGE_PATH set": check if your environment variable ROS_PACKAGE_PATH is assigned (echo $ROS_PACKAGE_PATH). If not, update your .bashrc file (echo "export ROS_PACKAGE_PATH=/home/<username>/groovy_workspace/sandbox/" >> ~/.bashrc).
    • "roscd: No such package/stack '<package_name>': check if the package exists and is included in your ROS_PACKAGE_PATH.

Others

Polytech' Projects which use ROS

RobAir 2013 Armind

API

Javascript

rosnodejs Programming robots with Javascript & Node.js

Projets AIR