#include <sphererobot3masses.h>
Inherits OdeRobot.
Inherited by Barrel2Masses, and Barrel2Masses2nd.
Inheritance diagram for Sphererobot3Masses:
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 Primitive * | getMainPrimitive () 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 |
Primitive * | object [Last] |
SliderServo * | servo [servono] |
SliderJoint * | joint [servono] |
OSGPrimitive * | axis [servono] |
Sphererobot3MassesConf | conf |
RaySensorBank | irSensorBank |
a collection of ir sensors | |
double | transparency |
bool | created |
Static Protected Attributes | |
static const int | servono = 3 |
This robot was inspired by Julius Popp (http://sphericalrobots.com)
enum objects |
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] |
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.
globalData | structure that contains global data from the simulation environment |
Implements OdeRobot.
static Sphererobot3MassesConf getDefaultConf | ( | ) | [inline, static] |
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] |
int getSensorNumber | ( | ) | [virtual] |
int getSensors | ( | sensor * | sensors, | |
int | sensornumber | |||
) | [virtual] |
Writes the sensor values to an array in the memory.
sensor* | pointer to the array | |
sensornumber | length of the sensor array |
Implements AbstractRobot.
Reimplemented in Barrel2Masses, and Barrel2Masses2nd.
void init | ( | ) | [protected] |
initialises some internal variables
void place | ( | const osg::Matrix & | pose | ) | [virtual] |
void setMotors | ( | const motor * | motors, | |
int | motornumber | |||
) | [virtual] |
sets actual motorcommands
motors | motors scaled to [-1,1] | |
motornumber | length of the motor array |
Implements AbstractRobot.
void update | ( | ) | [virtual] |
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] |
SliderServo* servo[servono] [protected] |
const int servono = 3 [static, protected] |
double transparency [protected] |