28 #include <ode_robots/oderobot.h>
29 #include <selforg/inspectable.h>
30 #include <ode_robots/contactsensor.h>
32 #include <ode_robots/relativepositionsensor.h>
33 #include <ode_robots/amosiisensormotordefinition.h>
34 #include <ode_robots/axisorientationsensor.h>
336 bool _useBack = 0,
bool _highFootContactsensoryFeedback=
false);
339 bool _useBack = 0,
bool _highFootContactsensoryFeedback=
false);
342 bool _useBack = 0,
bool _highFootContactsensoryFeedback=
false);
359 const std::string&
name =
"AmosII robot");
511 typedef std::map<LegPos, HingeJoint*> HingeJointMap;
512 typedef std::map<LegPos, Leg> LegMap;
513 typedef std::map<LegPos, ContactSensor*> LegContactMap;
514 typedef std::map<MotorName, OneAxisServo*> MotorMap;
515 typedef std::map<LegPos, LegPosUsage> LegPosUsageMap;
516 typedef std::map<LegPos, IRSensor*> LegIRSensorMap;
517 typedef std::vector<Primitive*> PrimitiveList;
518 typedef std::vector<Joint*> JointList;
519 typedef std::vector<OneAxisServo*> ServoList;
535 std::vector<SoundSensor*> soundsensors;
549 LegPosUsageMap legPosUsage;
554 LegContactMap legContactSensors;
557 LegIRSensorMap irLegSensors;
580 ServoList passiveServos;
586 std::vector<RelativePositionSensor> GoalSensor;
587 bool GoalSensor_active;
Class for a bank (collection) of ray sensors.
Definition: raysensorbank.h:36
double secondDamping
damping of the CTr joint servo
Definition: amosII.h:249
double tebiaJointLimitU
upper limit of the FTi joints, positive is down
Definition: amosII.h:221
double footRadius
radius of the foot capsules, choose different from tebiaRadius
Definition: amosII.h:183
static AmosIIConf getAmosIIv2Conf(double _scale=1.0, bool _useShoulder=1, bool _useFoot=1, bool _useBack=0, bool _highFootContactsensoryFeedback=false)
Definition: amosII.cpp:1507
void nameMotor(const int motorNo, const char *name)
Assign a human readable name to a motor.
Definition: amosII.cpp:314
double legdist1
distance between hindlegs and middle legs
Definition: amosII.h:118
void nameSensor(const int sensorNo, const char *name)
Assign a human readable name to a sensor.
Definition: amosII.cpp:296
AmosIISensorNames
Definition: amosiisensormotordefinition.h:12
double backJointLimitD
{
Definition: amosII.h:193
double footSpringLimitU
upper limit of the foot spring = maximum value (negative is downwards (spring extends)) ...
Definition: amosII.h:228
double shoulderLength
length of the shoulder limbs (if used)
Definition: amosII.h:164
double rLegTrunkAngleV
angle in rad around vertical axis at leg-trunk fixation for rear legs
Definition: amosII.h:149
double wheel_radius
radius of a wheel
Definition: amosII.h:93
bool useFoot
use spring foot
Definition: amosII.h:68
double coxaMaxVel
maximal velocity of the TC joint servo
Definition: amosII.h:258
double secondMass
mass of the second limbs
Definition: amosII.h:108
Data structure for accessing the ODE.
Definition: odehandle.h:44
Primitive * shoulder
Definition: amosII.h:469
std::string paramkey
Definition: configurable.h:85
double shoulderHeight
fix legs to trunk at this distance from bottom of trunk
Definition: amosII.h:115
LegPos
Definition: amosII.h:311
double size
scaling factor for robot (length of body)
Definition: amosII.h:85
double backDamping
damping of the backbone joint servo
Definition: amosII.h:245
OneAxisServo * tcServo
Definition: amosII.h:465
void setLegPosUsage(LegPos leg, LegPosUsage usage)
Definition: amosII.cpp:1465
double rLegTrunkAngleH
angle in rad around horizontal axis at leg-trunk fixation for rear legs
Definition: amosII.h:152
double fLegTrunkAngleH
angle in rad around horizontal axis at leg-trunk fixation for front legs
Definition: amosII.h:136
virtual double getMassOfRobot()
Definition: amosII.cpp:667
bool useBack
use the hinge joint in the back
Definition: amosII.h:70
double wheel_mass
mass of a wheel
Definition: amosII.h:97
bool highFootContactsensoryFeedback
Definition: amosII.h:305
double backMaxVel
maximal velocity of the backbone joint servo
Definition: amosII.h:256
double tebiaMass
mass of the tebia limbs
Definition: amosII.h:110
Matrixd Matrix
Definition: osgforwarddecl.h:47
double trunkMass
trunk mass
Definition: amosII.h:100
double coxaRadius
radius of the coxa limbs
Definition: amosII.h:170
double coxaLength
length of the coxa limbs
Definition: amosII.h:168
double footDamping
damping of the foot spring servo
Definition: amosII.h:253
Class for sensing the axis orienation of a primitive (robot)
Definition: axisorientationsensor.h:33
virtual void sense(GlobalData &globalData) override
this function is called each controlstep before control.
Definition: amosII.cpp:679
double footRange
range of the foot spring
Definition: amosII.h:181
virtual int getSensorsIntern(sensor *sensors, int sensornumber)
returns actual sensorvalues
Definition: amosII.cpp:364
double secondLength
length of the second limbs
Definition: amosII.h:172
double backJointLimitU
upper limit of the backbone joint, positive is down
Definition: amosII.h:195
bool rubberFeet
if true, rubber substance is used for feet instead of the substance used for the rest of the robot ...
Definition: amosII.h:75
double footMaxVel
maximal velocity of the foot spring servo
Definition: amosII.h:264
iparamkey name
Definition: inspectable.h:251
double tebiaRadius
radius of the tebia limbs
Definition: amosII.h:179
static AmosIIConf getAmosIIv1Conf(double _scale=1.0, bool _useShoulder=1, bool _useFoot=1, bool _useBack=0, bool _highFootContactsensoryFeedback=false)
Definition: amosII.cpp:1724
std::vector< Primitive * > GoalSensor_references
Definition: amosII.h:292
double fcoxaJointLimitB
backward limit of the front TC joints, negative is forward (zero specified by fcoxaZero) ...
Definition: amosII.h:201
double mLegTrunkAngleH
angle in rad around horizontal axis at leg-trunk fixation for middle legs
Definition: amosII.h:144
Data structure for accessing the OpenSceneGraph.
Definition: osghandle.h:79
Class for IR sensors.
Definition: irsensor.h:39
double rLegRotAngle
rotation of rear legs around own axis
Definition: amosII.h:154
virtual int getSensorNumberIntern()
returns number of sensors
Definition: amosII.cpp:348
double usAngleY
angle versus y axis
Definition: amosII.h:275
double footSpringPreload
}
Definition: amosII.h:225
double irRangeLeg
}
Definition: amosII.h:284
double usRangeFront
range of the front ultrasonic sensors
Definition: amosII.h:280
double rcoxaJointLimitF
forward limit of the rear TC joints, negative is forward (zero specified by fcoxaZero) ...
Definition: amosII.h:210
virtual ~AmosII()
Definition: amosII.cpp:279
static MotorName getMotorName(LegPos leg, LegJointType joint)
returns the MotorName enum value for the given joint at the given leg.
Definition: amosII.cpp:1344
virtual void create(const osg::Matrix &pose)
creates vehicle at desired pose
Definition: amosII.cpp:733
LegPosUsage
Definition: amosII.h:314
double fLegTrunkAngleV
angle in rad around vertical axis at leg-trunk fixation for front legs
Definition: amosII.h:133
Definition: position.h:30
static AmosIIConf getDefaultConf(double _scale=1.0, bool _useShoulder=1, bool _useFoot=1, bool _useBack=0, bool _highFootContactsensoryFeedback=false)
Returns the default configuration values.
Definition: amosII.cpp:1503
double coxaMass
mass of the coxa limbs
Definition: amosII.h:106
bool useTebiaJoints
whether to use joints at the knees or fix them
Definition: amosII.h:66
double paramval
Definition: configurable.h:88
double frontLength
length of the front of the body (if back joint is used)
Definition: amosII.h:91
double tebiaJointLimitD
lower limit of the FTi joints, positive is down
Definition: amosII.h:219
double secondMaxVel
maximal velocity of the CTr joint servo
Definition: amosII.h:260
virtual void placeIntern(const osg::Matrix &pose)
sets the pose of the vehicle
Definition: amosII.cpp:625
Joint * footJoint
Definition: amosII.h:464
double coxaDamping
damping of the TC joint servos
Definition: amosII.h:247
double mcoxaJointLimitB
backward limit of the middle TC joints, negative is forward (zero specified by fcoxaZero) ...
Definition: amosII.h:207
double footPower
maximal force of the foot spring servos
Definition: amosII.h:242
Primitive * getTibiaPrimitive(LegPos leg)
Definition: amosII.cpp:1491
bool legContactSensorIsBinary
Use binary leg contact sensors.
Definition: amosII.h:81
Interface class for primitives represented in the physical and graphical world.
Definition: primitive.h:80
double shoulderRadius
radius of the shoulder limbs (if used)
Definition: amosII.h:166
Primitive * coxa
Definition: amosII.h:470
virtual void update()
updates the OSG nodes of the vehicle
Definition: amosII.cpp:645
AmosII(const OdeHandle &odeHandle, const OsgHandle &osgHandle, const AmosIIConf &conf=getDefaultConf(), const std::string &name="AmosII robot")
constructor
Definition: amosII.cpp:91
double rcoxaJointLimitB
backward limit of the rear TC joints, negative is forward (zero specified by fcoxaZero) ...
Definition: amosII.h:213
static LegJointType getLegJointType(MotorName)
Returns the joint type of the given motor.
Definition: amosII.cpp:1393
Data structure holding all essential global information.
Definition: globaldata.h:57
double frontMass
mass of the front part of the robot (if backboine joint is used)
Definition: amosII.h:102
virtual Primitive * getMainPrimitive() const
the main object of the robot, which is used for position and speed tracking
Definition: amosII.cpp:724
Primitive * getShoulderPrimitive(LegPos leg)
Definition: amosII.cpp:1476
std::list< SensorAttachment > sensors
Definition: oderobot.h:269
Class for speed sensing of robots.
Definition: speedsensor.h:34
double usAngleX
{
Definition: amosII.h:273
Primitive * tibia
Definition: amosII.h:472
double tebiaLength
length of the tebia limbs including fully extended foot spring (if used)
Definition: amosII.h:177
LegJointType
Definition: amosII.h:317
Interface for inspectable objects.
Definition: inspectable.h:48
Primitive * foot
Definition: amosII.h:473
virtual int getMotorNumberIntern()
returns number of motors
Definition: amosII.cpp:283
double mLegRotAngle
rotation of middle legs around own axis
Definition: amosII.h:146
static LegPos getMotorLegPos(MotorName)
Returns the leg of the given motor.
Definition: amosII.cpp:1432
Spring * footSpring
Definition: amosII.h:468
double shoulderMass
mass of the shoulders (if used)
Definition: amosII.h:104
double secondRadius
radius of the second limbs
Definition: amosII.h:174
OsgHandle osgHandle
Definition: oderobot.h:278
OdeHandle odeHandle
Definition: oderobot.h:277
double footMass
mass of the feet
Definition: amosII.h:112
HingeJoint * ftiJoint
Definition: amosII.h:463
Primitive * second
Definition: amosII.h:471
double tebiaPower
maximal force of the FTi joint servos
Definition: amosII.h:240
HingeJoint * ctrJoint
Definition: amosII.h:462
virtual bool setParam(const paramkey &key, paramval val)
Definition: amosII.cpp:1271
AmosIISensorNames SensorName
Definition: amosII.h:330
double tebiaMaxVel
maximal velocity of the FTi joint servo
Definition: amosII.h:262
Abstract class for ODE robots.
Definition: oderobot.h:64
int amos_version
Definition: amosII.h:297
std::string bodyTexture
path to texture for trunk
Definition: amosII.h:289
double fcoxaJointLimitF
forward limit of the front TC joints, negative is forward (zero specified by fcoxazero) ...
Definition: amosII.h:198
OneAxisServo * ftiServo
Definition: amosII.h:467
double fLegRotAngle
rotation of front legs around own axis
Definition: amosII.h:138
OneAxisServo * ctrServo
Definition: amosII.h:466
double sensor
Definition: abstractrobot.h:43
bool usParallel
choose between parallel or antiparallel front ultrasonic sensors true means parallel ...
Definition: amosII.h:278
double tebiaDamping
damping of the FTi joint servo
Definition: amosII.h:251
AmosIIMotorNames
Definition: amosiisensormotordefinition.h:222
bool useShoulder
fix the shoulder element to the trunk.
Definition: amosII.h:64
double height
trunk height
Definition: amosII.h:89
double mcoxaJointLimitF
forward limit of the middle TC joints, negative is forward (zero specified by fcoxaZero) ...
Definition: amosII.h:204
AmosIIMotorNames MotorName
Definition: amosII.h:329
virtual void doInternalStuff(GlobalData &globalData)
this function is called in each timestep.
Definition: amosII.cpp:704
std::string texture
path to texture for legs
Definition: amosII.h:287
virtual void destroy()
destroys vehicle and space
Definition: amosII.cpp:1200
HingeJoint * tcJoint
Definition: amosII.h:461
double legdist2
distance between middle legs and front legs
Definition: amosII.h:121
bool useLocalVelSensor
decide whether you wand to use a local velocity sensors.
Definition: amosII.h:79
double footSpringLimitD
lower limit of the foot spring = minimum value (negative is downwards (spring extends)) ...
Definition: amosII.h:231
double secondPower
maximal force of the CTr joint servos
Definition: amosII.h:238
double mLegTrunkAngleV
angle in rad around vertical axis at leg-trunk fixation for middle legs
Definition: amosII.h:141
general servo motor to achieve position control
Definition: oneaxisservo.h:38
std::list< MotorAttachment > motors
Definition: oderobot.h:270
double wheel_width
width of a wheel
Definition: amosII.h:95
virtual void setMotorsIntern(const double *motors, int motornumber)
sets actual motorcommands
Definition: amosII.cpp:328
double width
trunk width
Definition: amosII.h:87
double backPower
maximal force of the backbone joint
Definition: amosII.h:234
Leg()
Definition: amosII.cpp:71
double secondJointLimitU
upper limit of the CTr joints, positive is down
Definition: amosII.h:217
double coxaPower
maximal force of the TC joint servos
Definition: amosII.h:236
double secondJointLimitD
lower limit of the CTr joints, positive is down
Definition: amosII.h:215