Started:OpenRAVE

From OpenRAVE

Jump to: navigation, search

Contents

Introduction

OpenRAVE is cross platform and written in C++ it uses Coin3d, OpenGL, Qt, and ODE libraries for the graphics, GUI, and simulation. It can be used for testing planning algorithms in simulation as well as controlling robots online. Its design is based on a plugin architecture, which makes it very easy to keep the core functionality and a basic set of modules open source while being able to extend functionality privately without interfering with the core code or core executable. The simulator itself will provide the glue and a common format for all plugins to talk to each other. Currently the plugins are arranged in 5 groups:

  • Planners - Responsible for generating trajectories given start and goal conditions
  • Controllers - Responsible for moving the robot inside simulation and in reality. A controller can be setup to talk through the player interfaces so that OpenRAVE controls the robot in realtime.
  • Robots - Can add various types of robots with their own unique characteristics
  • Sensors - Can add various sensors each with their own way of gathering and making sense of sensor data. Sensors usually update the environment.
  • Problems - Manages all components together to form a coherent script that the robot should follow. Problems are an easy way for developers to run and test their own code. Only one problem can be run at a time.

Install directory structure

Installing copies all important files necessary to run it. The user should only be interacting with the installed files rather than the subversion/source directory files. ${INSTALL} is the install path, for Linux by default it is ${OPENRAVE_SVN_DIR}/install, for windows it is C:\Program Files\openrave. The structure is as follows:

bin
   openrave - OpenRAVE executable
   openrave-config - configuration file that helps Linux plugins that need to link with openrave
include
   rave - All public OpenRAVE header files.
lib
  libopenrave.so (.a) - Linux library that all OpenRAVE plugins should link to
  libopenrave-core.so (.a) - Linux library that allows any application to use the OpenRAVE Core internally.
  openrave.dll - Windows dynamic link library
  openrave.lib - Windows static library
share
  openrave
    cppexamples - All C++ examples
    data - Default XML data files
    matlab - All Matlab scripting functions and examples
    models - Default 3D models
    octave - All Octave scripting functions and examples
    plugins - Plugins compiled by the OpenRAVE main distribution
    openravepy - Python bindings for OpenRAVE and all python-based code and examples.
    robots - Robot XML files

Intro Usage

To check out the plugins loaded type

./openrave -listplugins

To load a simple robot into the scene type

./openrave robots/puma.robot.xml

If a plugin declares a ProblemInsance named MyProblem, then to launch the problem at startup type

./openrave -f robots/puma.robot.xml -problem MyProblem 'myarguments' 

Note: All this functionality is available through scripting.

System Conventions

Here are the set of conventions users should keep in mind when using OpenRAVE. Sticking to them will guarantee that a certain party's OpenRAVE code will have less problems inter-operating with other openrave modules.

  1. Internal OpenRAVE matrices are in column-order, row-major format. If this is confusing, check out this guide. This means affine matrix representation is using the standard math way. All OpenRAVE matrices are serialized in column-major format, this is to make it simpler for Octave/Matlab to convert between matrices. Note that python expects row-major matrices, which require transposition when passed around the two interfaces.
  2. Quaternions, the preferred way of representing rotations, are defined with the scalar value as the first component. For example [w x y z] or [cos sin*axis].
  3. A pose is an affine transformation specified as a quaternion and translation. It serializes into 7 values, the first 4 being the quaternion.
  4. Distances between two rotations is:
    \cos^{-1} | q_1 \cdot q_2 |
    where each rotation is represented as a quaternion. For rotations close to each other, this is sometimes approximated as:
    min( | q1q2 | , | q1 + q2 | )
  5. A robot's up direction is on the positive z-axis, forward direction is the positive x-axis.
  6. Mobile manipulation is performed in the XY plane.
  7. The origin of a robot should be defined so that its base perfectly rests on a floor at z=0, and its rotation around the z-axis is the center of rotation when the base makes a natural in-place turn.
  8. All objects/robots of human-environment scale should be specified in meters. There are many default thresholds and parameters that assume this convention, and not following it will result in explosion of computation. A more general convention is that the unit should be chosen so that the arm length of the robot is closest to 1.
  9. Every body added to the environment should have a unique name.
  10. Every link/manipulator/sensor/joint in a robot/kinbody should have a name that will differentiate it from the others.

GUI Interaction

The GUI is very simple, but it still allows you to interactive move the camera and objects. The first thing to note is that there are two modes of control: camera control and object control. Press ESC to toggle between the two. Selecting an object makes it transparent and renders 3 arrows to represent the transformation of the object (red, green, and blue correspond to +X, +Y, and +Z axes respectively, the origin is the point where all axes meet).

Camera Mode

  • Left mouse button - hold to rotate
  • Middle mouse button - pan camera
  • Left+Middle mouse buttons, or scroller - zoom camera
  • Press s and click on any part of the scene to zoom in on it. The camera now centers on that object when rotating.

Object Interaction Mode

  • Left mouse button - Select object. A green wire-frame of a box will pop up. The object can then be moved around a 2D plane using the left mouse button. If the edges of the box are clicked on, the box will rotate instead of translate.

  • Ctrl+Left mouse button (Command+Left mouse button on OS X) - Use to select joints of an object. A green thin cylinder will pop up, click on it to move the joint. Use Ctrl+click (Command+click on OS X) to drag the cylinder in order to make it bigger or smaller. When a joint is selected the effected link will change color.

Personal tools