#include <sphererobot.h>
Inheritance diagram for Sphererobot:
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.
Definition at line 81 of file sphererobot.h.
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 char *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 (vector< Position > &poslist) |
returns a vector with the positions of all segments of the robot | |
Static Public Member Functions | |
static SphererobotConf | getDefaultConf () |
Public Attributes | |
SliderServo * | servo [3] |
Primitive * | object [Last] |
SliderJoint * | slider [3] |
Joint * | joint [6] |
Protected Member Functions | |
virtual Primitive * | getMainPrimitive () const |
the main object of the robot, which is used for position and speed tracking | |
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 | |
static const int | sensorno = 9 |
|
Definition at line 84 of file sphererobot.h. |
|
Definition at line 58 of file sphererobot.cpp. |
|
Definition at line 69 of file sphererobot.cpp. |
|
This is the collision handling function for snake robots. This overwrides the function collisionCallback of the class robot.
Implements OdeRobot. Definition at line 124 of file sphererobot.cpp. |
|
creates vehicle at desired position
Definition at line 192 of file sphererobot.cpp. |
|
destroys vehicle and space
Definition at line 273 of file sphererobot.cpp. |
|
this function is called in each timestep. It should perform robot-internal checks, like space-internal collision detection, sensor resets/update etc.
Implements OdeRobot. Definition at line 122 of file sphererobot.cpp. |
|
Definition at line 106 of file sphererobot.h. |
|
the main object of the robot, which is used for position and speed tracking
Implements OdeRobot. Definition at line 176 of file sphererobot.h. |
|
Returns the number of motors used by the snake.
Implements AbstractRobot. Definition at line 163 of file sphererobot.cpp. |
|
returns a vector with the positions of all segments of the robot
Definition at line 181 of file sphererobot.cpp. |
|
Returns the number of sensors used by the robot.
Implements AbstractRobot. Definition at line 173 of file sphererobot.cpp. |
|
Writes the sensor values to an array in the memory.
Implements AbstractRobot. Definition at line 88 of file sphererobot.cpp. |
|
sets the pose of the vehicle
Implements OdeRobot. Definition at line 113 of file sphererobot.cpp. |
|
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. Definition at line 105 of file sphererobot.cpp. |
|
update the subcomponents
Implements OdeRobot. Definition at line 73 of file sphererobot.cpp. |
|
Definition at line 90 of file sphererobot.h. |
|
Definition at line 91 of file sphererobot.h. |
|
Definition at line 97 of file sphererobot.h. |
|
Definition at line 95 of file sphererobot.h. |
|
Definition at line 88 of file sphererobot.h. |
|
Definition at line 94 of file sphererobot.h. |
|
Definition at line 96 of file sphererobot.h. |