#include <sphererobot.h>
Inherits OdeRobot.
Inheritance diagram for Sphererobot:


Public Types | |
| enum | objects { Base, Pendular, Pole1Bot, Pole2Bot, Pole3Bot, Pole1Top, Pole2Top, Pole3Top, Last } |
Public Member Functions | |
| Sphererobot (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const SphererobotConf &conf, const std::string &name) | |
| virtual | ~Sphererobot () |
| virtual void | update () |
| update the subcomponents | |
| 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 snake 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, an 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 int | getSegmentsPosition (std::vector< Position > &poslist) |
| returns a vector with the positions of all segments of the robot | |
| virtual Primitive * | getMainPrimitive () const |
| the main object of the robot, which is used for position and speed tracking | |
Static Public Member Functions | |
| SphererobotConf | getDefaultConf () |
Public Attributes | |
| SliderServo * | servo [3] |
| Primitive * | object [Last] |
| SliderJoint * | slider [3] |
| Joint * | joint [6] |
Protected Member Functions | |
| virtual void | create (const osg::Matrix &pose) |
| creates vehicle at desired position | |
| virtual void | destroy () |
| destroys vehicle and space | |
Protected Attributes | |
| SphererobotConf | conf |
| bool | created |
Static Protected Attributes | |
| const int | sensorno = 9 |
It consists of a number of equal elements, each linked by a joint. This class is based upon the class roboter by the same author.
|
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
||||||||||||||||
|
This is the collision handling function for snake robots. This overwrides the function collisionCallback of the class robot.
Implements OdeRobot.
|
|
|
creates vehicle at desired position
|
|
|
destroys vehicle and space
|
|
|
this function is called in each timestep. It should perform robot-internal checks, like space-internal collision detection, sensor resets/update etc.
Implements OdeRobot.
|
|
|
|
|
|
the main object of the robot, which is used for position and speed tracking
Implements OdeRobot.
|
|
|
Returns the number of motors used by the snake.
Implements AbstractRobot.
|
|
|
returns a vector with the positions of all segments of the robot
|
|
|
Returns the number of sensors used by the robot.
Implements AbstractRobot.
|
|
||||||||||||
|
Writes the sensor values to an array in the memory.
Implements AbstractRobot.
|
|
|
sets the pose of the vehicle
Implements OdeRobot.
|
|
||||||||||||
|
Reads the actual motor commands from an array, an sets all motors of the snake to this values. It is an linear allocation.
Implements AbstractRobot.
|
|
|
update the subcomponents
Implements OdeRobot.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.8