#include <sphererobot3masses.h>
Inherits OdeRobot.
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 all primitives and joints | |
| 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) |
| Reads the actual motor commands from an array, and sets all motors of the snake to this values. | |
| 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 Primitive * | getMainPrimitive () const |
| the main object of the robot, which is used for position and speed tracking | |
Static Public Member Functions | |
| static Sphererobot3MassesConf | getDefaultConf () |
| default configuration | |
Protected Member Functions | |
| virtual void | create (const osg::Matrix &pose) |
| creates vehicle at desired position | |
| virtual void | destroy () |
| destroys vehicle and space | |
Protected Attributes | |
| Primitive * | object [Last] |
| SliderServo * | servo [servono] |
| SliderJoint * | joint [servono] |
| OSGPrimitive * | axis [servono] |
| double | transparency |
| bool | created |
| Sphererobot3MassesConf | conf |
| RaySensorBank | irSensorBank |
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 | ( | ) | [virtual] |
| 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.
| data | (unused) | |
| o1 | first geometrical object, which has taken part in the collision | |
| o2 | second geometrical object, which has taken part in the collision |
Implements OdeRobot.
| void create | ( | const osg::Matrix & | pose | ) | [protected, virtual] |
| 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.
| globalData | structure that contains global data from the simulation environment |
Implements OdeRobot.
| static Sphererobot3MassesConf getDefaultConf | ( | ) | [inline, static] |
default configuration
| virtual Primitive* getMainPrimitive | ( | ) | const [inline, virtual] |
| int getMotorNumber | ( | ) | [virtual] |
| int getSensorNumber | ( | ) | [virtual] |
Returns the number of sensors used by the robot.
Implements AbstractRobot.
| int getSensors | ( | sensor * | sensors, | |
| int | sensornumber | |||
| ) | [virtual] |
Writes the sensor values to an array in the memory.
| sensors | pointer to the array | |
| sensornumber | length of the sensor array |
Implements AbstractRobot.
| void place | ( | const osg::Matrix & | pose | ) | [virtual] |
| void setMotors | ( | const motor * | motors, | |
| int | motornumber | |||
| ) | [virtual] |
Reads the actual motor commands from an array, and sets all motors of the snake to this values.
| motors | pointer to the array, motor values are 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] |
SliderJoint* joint[servono] [protected] |
SliderServo* servo[servono] [protected] |
const int servono = 3 [static, protected] |
double transparency [protected] |
1.4.7