Sphererobot3Masses Class Reference

A spherical robot with 3 internal masses, which can slide on their orthogonal axes. More...

#include <sphererobot3masses.h>

Inherits OdeRobot.

Inherited by Barrel2Masses.

Inheritance diagram for Sphererobot3Masses:

Inheritance graph
[legend]
Collaboration diagram for Sphererobot3Masses:

Collaboration graph
[legend]
List of all members.

Public Types

enum  objects {
  Base, Pendular1, Pendular2, Pendular3,
  Last
}
 enum for the objects of the robot More...

Public Member Functions

 Sphererobot3Masses (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const Sphererobot3MassesConf &conf, const std::string &name, double transparency=0.5)
 constructor
virtual ~Sphererobot3Masses ()
virtual void update ()
 update the OSG notes here
virtual void place (const osg::Matrix &pose)
 sets the pose of the vehicle
virtual bool collisionCallback (void *data, dGeomID o1, dGeomID o2)
 This is the collision handling function for sphere robots.
virtual void doInternalStuff (const GlobalData &globalData)
 this function is called in each timestep.
virtual int getSensors (sensor *sensors, int sensornumber)
 Writes the sensor values to an array in the memory.
virtual void setMotors (const motor *motors, int motornumber)
 sets actual motorcommands
virtual int getMotorNumber ()
 Returns the number of motors used by the snake.
virtual int getSensorNumber ()
 Returns the number of sensors used by the robot.
virtual PrimitivegetMainPrimitive () const
 the main object of the robot, which is used for position and speed tracking

Static Public Member Functions

Sphererobot3MassesConf getDefaultConf ()
 default configuration

Protected Member Functions

 Sphererobot3Masses (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const Sphererobot3MassesConf &conf, const std::string &name, const std::string &revision, double transparency)
 constructor
void init ()
 initialises some internal variables
virtual void create (const osg::Matrix &pose)
 creates vehicle at desired position
virtual void destroy ()
 destroys vehicle and space

Protected Attributes

unsigned int numberaxis
Primitiveobject [Last]
SliderServoservo [servono]
SliderJointjoint [servono]
OSGPrimitiveaxis [servono]
Sphererobot3MassesConf conf
RaySensorBank irSensorBank
 a collection of ir sensors
double transparency
bool created

Static Protected Attributes

const int servono = 3

Detailed Description

A spherical robot with 3 internal masses, which can slide on their orthogonal axes.

This robot was inspired by Julius Popp (http://sphericalrobots.com)


Member Enumeration Documentation

enum objects
 

enum for the objects of the robot

Enumeration values:
Base 
Pendular1 
Pendular2 
Pendular3 
Last 


Constructor & Destructor Documentation

Sphererobot3Masses const OdeHandle odeHandle,
const OsgHandle osgHandle,
const Sphererobot3MassesConf conf,
const std::string &  name,
double  transparency = 0.5
 

constructor

Sphererobot3Masses const OdeHandle odeHandle,
const OsgHandle osgHandle,
const Sphererobot3MassesConf conf,
const std::string &  name,
const std::string &  revision,
double  transparency
[protected]
 

constructor

~Sphererobot3Masses  )  [virtual]
 


Member Function Documentation

bool collisionCallback void *  data,
dGeomID  o1,
dGeomID  o2
[virtual]
 

This is the collision handling function for sphere robots.

This overwrides the function collisionCallback of the class robot.

Parameters:
data 
o1 first geometrical object, which has taken part in the collision
o2 second geometrical object, which has taken part in the collision
Returns:
true if the collision was threated by the robot, false if not

Implements OdeRobot.

void create const osg::Matrix pose  )  [protected, virtual]
 

creates vehicle at desired position

Parameters:
pos struct Position with desired position

Reimplemented in Barrel2Masses.

void destroy  )  [protected, virtual]
 

destroys vehicle and space

void doInternalStuff const GlobalData globalData  )  [virtual]
 

this function is called in each timestep.

It should perform robot-internal checks, like space-internal collision detection, sensor resets/update etc.

Parameters:
globalData structure that contains global data from the simulation environment

Implements OdeRobot.

Sphererobot3MassesConf getDefaultConf  )  [inline, static]
 

default configuration

Reimplemented in Barrel2Masses.

virtual Primitive* getMainPrimitive  )  const [inline, virtual]
 

the main object of the robot, which is used for position and speed tracking

Implements OdeRobot.

int getMotorNumber  )  [virtual]
 

Returns the number of motors used by the snake.

Returns:
number of motors

Implements AbstractRobot.

int getSensorNumber  )  [virtual]
 

Returns the number of sensors used by the robot.

Returns:
number of sensors

Implements AbstractRobot.

int getSensors sensor sensors,
int  sensornumber
[virtual]
 

Writes the sensor values to an array in the memory.

Parameters:
sensor* pointer to the array
sensornumber length of the sensor array
Returns:
number of actually written sensors

Implements AbstractRobot.

Reimplemented in Barrel2Masses.

void init  )  [protected]
 

initialises some internal variables

void place const osg::Matrix pose  )  [virtual]
 

sets the pose of the vehicle

Parameters:
pose desired 4x4 pose matrix

Implements OdeRobot.

void setMotors const motor motors,
int  motornumber
[virtual]
 

sets actual motorcommands

Parameters:
motors motors scaled to [-1,1]
motornumber length of the motor array

Implements AbstractRobot.

void update  )  [virtual]
 

update the OSG notes here

Implements OdeRobot.


Member Data Documentation

OSGPrimitive* axis[servono] [protected]
 

Sphererobot3MassesConf conf [protected]
 

bool created [protected]
 

RaySensorBank irSensorBank [protected]
 

a collection of ir sensors

SliderJoint* joint[servono] [protected]
 

unsigned int numberaxis [protected]
 

Primitive* object[Last] [protected]
 

SliderServo* servo[servono] [protected]
 

const int servono = 3 [static, protected]
 

double transparency [protected]
 


The documentation for this class was generated from the following files:
Generated on Tue Jan 16 02:14:55 2007 for Robotsystem of the Robot Group Leipzig by doxygen 1.3.8