#include <discus.h>
Inherits OdeRobot.
Inheritance diagram for Discus:


Public Types | |
| Base | |
| Stabilizer | |
| Pendular1 | |
| Pendular2 | |
| Pendular3 | |
| Last | |
| 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 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 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 | |
| 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 | |
| Primitive * | object [Last] |
| SliderServo * | servo [maxservono] |
| SliderJoint * | joint [maxservono] |
| OSGPrimitive * | axis [maxservono] |
| DiscusConf | conf |
| RaySensorBank | irSensorBank |
| a collection of ir sensors | |
| double | transparency |
| bool | created |
Static Protected Attributes | |
| static const int | maxservono = 3 |
This robot was inspired by Julius Popp (http://sphericalrobots.com)
| enum objects |
| 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
| ~Discus | ( | ) | [virtual] |
| 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 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 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
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.
| 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[maxservono] [protected] |
DiscusConf conf [protected] |
bool created [protected] |
RaySensorBank irSensorBank [protected] |
a collection of ir sensors
SliderJoint* joint[maxservono] [protected] |
const int maxservono = 3 [static, protected] |
SliderServo* servo[maxservono] [protected] |
double transparency [protected] |
1.4.7