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, and Barrel2Masses2nd.

Inheritance diagram for Sphererobot3Masses:

Inheritance graph
[legend]
Collaboration diagram for Sphererobot3Masses:

Collaboration graph
[legend]
List of all members.

Public Types

 Base
 Pendular1
 Pendular2
 Pendular3
 Last
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 void doInternalStuff (GlobalData &globalData)
 this function is called in each timestep after control.
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 number of motors
virtual int getSensorNumber ()
 returns number of sensors
virtual PrimitivegetMainPrimitive () const
 return the primitive of the robot that is used for tracking and camera following

Static Public Member Functions

static 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 and orientation
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

static 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)

Examples:

template_sphererobot/main.cpp.


Member Enumeration Documentation

enum objects

enum for the objects of the robot

Enumerator:
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

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

creates vehicle at desired position and orientation

Reimplemented in Barrel2Masses, and Barrel2Masses2nd.

void destroy (  )  [protected, virtual]

destroys vehicle and space

void doInternalStuff ( GlobalData globalData  )  [virtual]

this function is called in each timestep after control.

It should perform robot-internal checks and actions, like acting and sensing of internal motors/sensors etc.

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

Implements OdeRobot.

static Sphererobot3MassesConf getDefaultConf (  )  [inline, static]

default configuration

Reimplemented in Barrel2Masses, and Barrel2Masses2nd.

virtual Primitive* getMainPrimitive (  )  const [inline, virtual]

return the primitive of the robot that is used for tracking and camera following

Implements OdeRobot.

int getMotorNumber (  )  [virtual]

returns number of motors

Implements AbstractRobot.

int getSensorNumber (  )  [virtual]

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, and Barrel2Masses2nd.

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 Fri Oct 30 16:29:03 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7