Discus Class Reference

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

#include <discus.h>

Inherits lpzrobots::OdeRobot.

Collaboration diagram for Discus:
Collaboration graph
[legend]

List of all members.

Public Types

enum  objects {
  Base, Stabilizer, Pendular1, Pendular2,
  Pendular3, Last
}
 

enum for the objects of the robot

More...

Public Member Functions

 Discus (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const DiscusConf &conf, const std::string &name, double transparency=0.5)
 constructor
virtual ~Discus ()
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 simulation timestep (always 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 DiscusConf getDefaultConf ()
 default configuration

Protected Member Functions

 Discus (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const DiscusConf &conf, const std::string &name, const std::string &revision, double transparency)
 constructor for children
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

Primitiveobject [Last]
SliderServoservo [maxservono]
SliderJointjoint [maxservono]
OSGPrimitiveaxis [maxservono]
DiscusConf conf
RaySensorBank irSensorBank
 a collection of ir sensors
double transparency
bool created

Static Protected Attributes

static const int maxservono = 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

Enumerator:
Base 
Stabilizer 
Pendular1 
Pendular2 
Pendular3 
Last 

Reimplemented from OdeRobot.


Constructor & Destructor Documentation

Discus ( const OdeHandle odeHandle,
const OsgHandle osgHandle,
const DiscusConf conf,
const std::string &  name,
double  transparency = 0.5 
)

constructor

Discus ( const OdeHandle odeHandle,
const OsgHandle osgHandle,
const DiscusConf conf,
const std::string &  name,
const std::string &  revision,
double  transparency 
) [protected]

constructor for children

constructor

~Discus (  )  [virtual]

Member Function Documentation

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

creates vehicle at desired position and orientation

void destroy (  )  [protected, virtual]

destroys vehicle and space

void doInternalStuff ( GlobalData globalData  )  [virtual]

this function is called in each simulation timestep (always after control).

It should perform robot-internal checks and actions like resetting certain sensors or implement velocity dependend friction and the like. The attached Motors should act here.

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

Reimplemented from OdeRobot.

static DiscusConf getDefaultConf (  )  [inline, static]

default configuration

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

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

Reimplemented from 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.

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[maxservono] [protected]
DiscusConf conf [protected]
bool created [protected]

a collection of ir sensors

SliderJoint* joint[maxservono] [protected]
const int maxservono = 3 [static, protected]
Primitive* object[Last] [protected]
SliderServo* servo[maxservono] [protected]
double transparency [protected]

The documentation for this class was generated from the following files:
Generated on Thu Jun 28 14:48:55 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3