An openGL kinematic simulator of the robot. More...

An openGL kinematic simulator of the robot.


This is an openGL kinematic simulator. It simulates rotational joint robots with arbitrary geometries. It takes a input an xml file describing the geometry of the robot. It gets the joint angles values through a port and draws the corresponding position of the robot. It can read updated versions of the body schema through a port. It display both the updated version and the original version of the robot, which is useful to visualize the effect of body schema learning. It can also get the position (and orientation) of a target and also draws it. Using the keyboard, one can also move the target and send the resulting position on a port.



The call to this module is done as follows:

./simulator <struct_file> <shape_file> [--nomapping]

Input Data File

The file <struct_file> specifes the kinematic structure This section describes the format of the file <struct_file> specifying the kinematic structure of the manipulator. The robot can be described by a "kinematic tree", having (for example) the torso as root where edges represent rigid connections (translation) and nodes represent joints (rotations). (see my IJHR paper for more details) The file is an xml file with the following structure (see conf/icub_head_right_arm_tree.xml for the file describing the kinematics of the icub right arm and head.)

 <Segment> r_sfe
  <Axis> 1 0 0  </Axis>
   <Range> -90 90 </Range>
   <Position> -100 0 0 </Position>      
     <Segment> r_saa

In the example below r_sfe is the name of the proximal joint. The <Position> tag refers to the position of the joint with resect to the previous joint, when in the zero joint position. Similarly the <Axis> tag refers the the rotation axis, when all previous joints are in the zero position. <Range> provides the joint angle boundaries in degrees, and <Children> announce the next link. The tip of the manipulator is specified as an additional joint, but it has no <Axis> tag, only a <Position> tag

The <shape_file> describe the shapes to be attached to head joint. There are three kinds of possible shape: Capsules, Parallelipipeds and Spheres. Here is an example of shape file:

  <Name> r_sfe </Name>
  <Type> Capsule </Type>
    <Position> 0 0 0 </Position>
    <Radius> 30 </Radius> 
  <Name> r_wrist2 </Name>
  <Type> Parallelipiped </Type>
    <Position> 0 0 -30 </Position> 
    <Size> 10 -100.3 60 </Size>
  <Name> gaze </Name>
  <Type> Sphere </Type>
    <Position> 0 0 60 </Position> 
    <Radius> 20 </Radius> 

Ports Accessed

none directly in the code

Ports Created

Input ports:

Output ports:

Configuration Files

This module does not accept configuration files

Tested OS

linux and in a previous version windows

Example Instantiation of the Module

For reaching to random target with the reaching_module and seeing the result on the simulator

   xterm -T "reaching arm" -e "./reaching_module --file conf/config_reaching_right_arm.ini --name /arm 
   --orientation 1 --simulation" &
   xterm -T "simulator" -e "./simulator conf/icub_head_right_arm_tree.xml conf/icub_head_right_arm_shape.xml" &
  sleep 2
  yarp connect /arm/vc_command:o /simulator/arm:i
  yarp connect  /arm/target:i /simulator/target:i
  yarp connect /simulator/cmd:o arm/cmd:i

where the configuration files are available in the repository

User Interface

You can:

: Micha Hersch CopyPolicy: Released under the terms of the GNU GPL v2.0.

This file can be edited at src/lasaBodySchema/include/KinematicSimulator.h

 All Data Structures Functions Variables

Generated on Wed Sep 22 16:51:26 2010 for Body_Schema_Learning by  doxygen 1.6.1