Geometric Modelling in OpenRAVE: Difference between revisions

From ISRWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 40: Line 40:
# Objects with complex geometries
# Objects with complex geometries


first we will discuss how simple geometries are described in xml files, then, we will show how to build up an object with the  addition of these elemental geometries, and finaly, we will show how to  make use of existing geometric models from CAD files, such as VRML, 3DStudio, Open Inventor and so on.
first we will discuss how simple geometries are described in xml files, then, we will show how to build up an object with the  addition of these elemental geometries, and finally, we will show how to  make use of existing geometric models from CAD files, such as VRML, 3DStudio, Open Inventor and so on.


In this section, the main objective is that you learn how descriptions are done in the xml files. Although you probably will directly use the already available objects in the library, this part of the tutorial will be enough for you to know how to create your own models. Let's get start with the elemental Geomeric shaped objects!!.
In this section, the main objective is that you learn how descriptions are done in the xml files. Although you probably will directly use the already available objects in the library, this part of the tutorial will be enough for you to know how to create your own models. Let's get start with the elemental Geometric shaped objects!!.
 
 
== Elemental Geometric shaped objects ==
 
In OpenRAVE shapes can be edited manually. To do this, the description of objects can be three of the next elemental geometries:
 
* Sphere
* Cylinder
* Cuboid
 
Additionally, we have to describe, for each of these geometries, the next parameters:
 
* Static or dynamic
* Initial position
* Initial orientation
* color
* transparency
 
As static objects, they have, for example, walls, floor, etc. As dynamic objects, you have all the objects that can move & they are subject to gravity,
such as: tables, doors, etc.. Let's see the general structure of an elemental geometry object.
 
<KinBody name="my_object_name">
<!--    these are comments -->
    <Body name="my_body_name" type="dynamic">
    <!--     these are comments -->
        <Geom type="cylinder">
        <!-- these are comments -->
        ........
        </Geom>
    </Body>
</KinBody>

Revision as of 16:54, 11 January 2011

When experimenting with simulations in OpenRAVE, mainly we have the following stages:

  1. Geometric Modelling. Here is where you create your enviroment (scenario), and create the Robots and the objects.
  2. Knowledge base generation. When Rosen Diankov created OpenRAVE, he designed its structure in such a way that there were some modules (plug-ins) that automatically generate some databases in off-line mode. Some examples of these data bases, are the inverse kinematics, the grasping plug-in, reachability and inverse reachability computation, detectability and others. More about the knowledge base generation will be discused in other section.
  3. Scripting. Of course, if we want to run some special simulation, we have to code it. This can be done in Python language, in Matlab Scripts, in Octave Scripts, or ultimately in C++.
  4. Interfacing Simulations. We also want to try our experiments in real Robots, and to do so, we can interface our simulation environment with the Robots. This is done with ROS.

In this section of the tutorial, we will focus on the Geometric Modelling.

Models Classification

In OpenRAVE, geometric models are xml files that describe the geometry, and configuration of objects in the simulations. We distinguish four four kind of models:

  1. Objects. These are the simpler elements of an environment. my_object.kinbody.xml
  2. Mechanisms. These are also objects, but the special characteristic, is that they have relative movements between links, specially if they are open-chain mechanisms. my_mechanism.kinbody.xml
  3. Robots. These are special xml files, and their internal structure is conformed by one or several mechanisms. They also describe which links are active when computing manipulation tasks. my_robot.robot.xml
  4. Environments. These xml files hold the entire description of how the 3D world is structured. They load the objects, and robots that will play a roll in the simulation. my_environment.env.xml

Is very inportant for you to know that, if the model that you want to use already exists in the library, you don't have to model it again, just use the existing one. So, where are the models? ...In OpenRAVE we have three main directories were the models are allocated.

  • /usr/local/share/openrve/data/
  • /usr/local/share/openrve/robots/
  • /usr/local/share/openrve/models/

In the first and in the second directories, you will find mixed models of objects, robots and environments, and in the third, you just will find geometric description files with extension *.wrl (VRML 97) and *.iv (Open Inventor).

If you are using the VisLab Edition, then you will also have the extra directory:

  • /usr/local/share/openrve/Vislab/

There, you will find the models of the typical objects and the robots that are used at the VisLab, like Baltazar, Chico, Wizzy, and some toys.


Objects Modelling

We distinguish three kind of object modelling:

  1. Elemental geometric shaped objects
  2. Composition of simple geometries
  3. Objects with complex geometries

first we will discuss how simple geometries are described in xml files, then, we will show how to build up an object with the addition of these elemental geometries, and finally, we will show how to make use of existing geometric models from CAD files, such as VRML, 3DStudio, Open Inventor and so on.

In this section, the main objective is that you learn how descriptions are done in the xml files. Although you probably will directly use the already available objects in the library, this part of the tutorial will be enough for you to know how to create your own models. Let's get start with the elemental Geometric shaped objects!!.


Elemental Geometric shaped objects

In OpenRAVE shapes can be edited manually. To do this, the description of objects can be three of the next elemental geometries:

  • Sphere
  • Cylinder
  • Cuboid

Additionally, we have to describe, for each of these geometries, the next parameters:

  • Static or dynamic
  • Initial position
  • Initial orientation
  • color
  • transparency

As static objects, they have, for example, walls, floor, etc. As dynamic objects, you have all the objects that can move & they are subject to gravity, such as: tables, doors, etc.. Let's see the general structure of an elemental geometry object.

<KinBody name="my_object_name">
    <Body name="my_body_name" type="dynamic">
    
        <Geom type="cylinder">
        
        ........
        </Geom>
    </Body>
</KinBody>