should look like a humanoid More...
#include <skeleton.h>
Inherits lpzrobots::OdeRobot, and Inspectable.
Public Types | |
enum | SkelParts { Hip, Trunk_comp, Belly, Thorax, Neck, Head_comp, Left_Shoulder, Left_Forearm, Left_Hand, Right_Shoulder, Right_Forearm, Right_Hand, Left_Thigh, Left_Shin, Left_Foot, Right_Thigh, Right_Shin, Right_Foot, LastPart } |
Public Member Functions | |
Skeleton (const OdeHandle &odeHandle, const OsgHandle &osgHandle, SkeletonConf &conf, const std::string &name) | |
constructor of Skeleton robot | |
virtual | ~Skeleton () |
virtual void | update () |
updates the OSG nodes of the vehicle | |
virtual void | place (const osg::Matrix &pose) |
sets the pose of the vehicle | |
virtual int | getSensors (sensor *sensors, int sensornumber) |
returns actual sensorvalues | |
virtual void | setMotors (const motor *motors, int motornumber) |
sets actual motorcommands | |
virtual int | getSensorNumber () |
returns number of sensors | |
virtual int | getMotorNumber () |
returns number of motors | |
virtual void | doInternalStuff (GlobalData &globalData) |
this function is called in each timestep. | |
virtual void | notifyOnChange (const paramkey &key) |
Is called when a parameter was changes via setParam(). | |
virtual Primitive * | getMainPrimitive () const |
the main object of the robot, which is used for position and speed tracking | |
virtual Position | getHeadPosition () |
returns the position of the head | |
virtual Position | getTrunkPosition () |
returns the position of the trunk | |
GripperList & | getGrippers () |
returns a the gripper list | |
Static Public Member Functions | |
static SkeletonConf | getDefaultConf () |
static SkeletonConf | getDefaultConfVelServos () |
Protected Member Functions | |
virtual void | create (const osg::Matrix &pose) |
creates vehicle at desired pose | |
virtual void | destroy () |
destroys vehicle and space | |
Protected Attributes | |
SkeletonConf | conf |
bool | created |
OdeHandle | ignoreColSpace |
std::vector< TwoAxisServo * > | hipservos |
std::vector< OneAxisServo * > | kneeservos |
std::vector< OneAxisServo * > | ankleservos |
std::vector< TwoAxisServo * > | armservos |
std::vector< OneAxisServo * > | arm1servos |
std::vector< TwoAxisServo * > | headservos |
OneAxisServo * | pelvisservo |
std::vector< OneAxisServo * > | backservos |
std::vector< AngularMotor * > | frictionmotors |
RaySensorBank | irSensorBank |
GripperList | grippers |
should look like a humanoid
enum SkelParts |
Skeleton | ( | const OdeHandle & | odeHandle, | |
const OsgHandle & | osgHandle, | |||
SkeletonConf & | conf, | |||
const std::string & | name | |||
) |
constructor of Skeleton robot
odeHandle | data structure for accessing ODE | |
osgHandle | ata structure for accessing OSG | |
conf | configuration object |
virtual ~Skeleton | ( | ) | [inline, virtual] |
virtual void create | ( | const osg::Matrix & | pose | ) | [protected, virtual] |
creates vehicle at desired pose
pose | 4x4 pose matrix |
void destroy | ( | ) | [protected, virtual] |
destroys vehicle and space
void doInternalStuff | ( | GlobalData & | global | ) | [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 |
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 |
Reimplemented from OdeRobot.
static SkeletonConf getDefaultConf | ( | ) | [inline, static] |
static SkeletonConf getDefaultConfVelServos | ( | ) | [inline, static] |
GripperList & getGrippers | ( | ) |
returns a the gripper list
returns the grippers
Position getHeadPosition | ( | ) | [virtual] |
returns the position of the head
virtual Primitive* getMainPrimitive | ( | ) | const [inline, virtual] |
the main object of the robot, which is used for position and speed tracking
Reimplemented from OdeRobot.
int getMotorNumber | ( | ) | [virtual] |
returns number of motors
Implements AbstractRobot.
int getSensorNumber | ( | ) | [virtual] |
returns number of sensors
Implements AbstractRobot.
int getSensors | ( | sensor * | sensors, | |
int | sensornumber | |||
) | [virtual] |
returns actual sensorvalues
sensors | sensors scaled to [-1,1] | |
sensornumber | length of the sensor array |
Implements AbstractRobot.
Position getTrunkPosition | ( | ) | [virtual] |
returns the position of the trunk
void notifyOnChange | ( | const paramkey & | key | ) | [virtual] |
Is called when a parameter was changes via setParam().
Note that it is not called of parameters of childs are changed, then there notifyOnChange() method is called. The key and of the changed parameter (use getParam() to retrieve its actual value). Overload this function when special actions have to be taken on parameter changes.
Reimplemented from Configurable.
virtual 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] |
std::vector<OneAxisServo*> ankleservos [protected] |
std::vector<OneAxisServo*> arm1servos [protected] |
std::vector<TwoAxisServo*> armservos [protected] |
std::vector<OneAxisServo*> backservos [protected] |
SkeletonConf conf [protected] |
bool created [protected] |
std::vector<AngularMotor*> frictionmotors [protected] |
GripperList grippers [protected] |
std::vector<TwoAxisServo*> headservos [protected] |
std::vector<TwoAxisServo*> hipservos [protected] |
OdeHandle ignoreColSpace [protected] |
RaySensorBank irSensorBank [protected] |
std::vector<OneAxisServo*> kneeservos [protected] |
OneAxisServo* pelvisservo [protected] |