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/axisorientationsensor.h>
34 #include <ode_robots/amosiisensormotordefinition.h>
344 const std::string&
name =
"AmosII robot");
496 typedef std::map<LegPos, HingeJoint*> HingeJointMap;
497 typedef std::map<LegPos, Leg> LegMap;
498 typedef std::map<LegPos, ContactSensor*> LegContactMap;
499 typedef std::map<MotorName, OneAxisServo*> MotorMap;
500 typedef std::map<LegPos, LegPosUsage> LegPosUsageMap;
501 typedef std::map<LegPos, IRSensor*> LegIRSensorMap;
502 typedef std::vector<Primitive*> PrimitiveList;
503 typedef std::vector<Joint*> JointList;
504 typedef std::vector<OneAxisServo*> ServoList;
527 LegPosUsageMap legPosUsage;
532 LegContactMap legContactSensors;
535 LegIRSensorMap irLegSensors;
557 PrimitiveList objects;
563 ServoList passiveServos;
569 std::vector<RelativePositionSensor> GoalSensor;
570 bool GoalSensor_active;
Class for a bank (collection) of ray sensors.
Definition: raysensorbank.h:36
Primitive * shoulder
Definition: amos4legs.h:454
double legdist2
distance between middle legs and front legs
Definition: amos4legs.h:119
AmosFour(const OdeHandle &odeHandle, const OsgHandle &osgHandle, const AmosFourConf &conf=getDefaultConf(), const std::string &name="AmosII robot")
constructor
Definition: amos4legs.cpp:77
double rcoxaJointLimitF
forward limit of the rear TC joints, negative is forward (zero specified by fcoxaZero) ...
Definition: amos4legs.h:208
bool legContactSensorIsBinary
Use binary leg contact sensors.
Definition: amos4legs.h:79
double tebiaJointLimitD
lower limit of the FTi joints, positive is down
Definition: amos4legs.h:217
AmosIISensorNames
Definition: amosiisensormotordefinition.h:12
double backDamping
damping of the backbone joint servo
Definition: amos4legs.h:243
Definition: amos4legs.h:304
Primitive * tibia
Definition: amos4legs.h:457
Data structure for accessing the ODE.
Definition: odehandle.h:44
double footMass
mass of the feet
Definition: amos4legs.h:110
double footSpringLimitU
upper limit of the foot spring = maximum value (negative is downwards (spring extends)) ...
Definition: amos4legs.h:226
double wheel_width
width of a wheel
Definition: amos4legs.h:93
OneAxisServo * tcServo
Definition: amos4legs.h:450
double trunkMass
trunk mass
Definition: amos4legs.h:98
Primitive * foot
Definition: amos4legs.h:458
Definition: amos4legs.h:311
std::string paramkey
Definition: configurable.h:85
static AmosFourConf getDefaultConf(double _scale=1.0, bool _useShoulder=1, bool _useFoot=1, bool _useBack=0)
Returns the default configuration values.
Definition: amos4legs.cpp:1366
Definition: amos4legs.h:304
virtual ~AmosFour()
Definition: amos4legs.cpp:265
virtual int getMotorNumberIntern()
returns number of motors
Definition: amos4legs.cpp:269
double usAngleX
{
Definition: amos4legs.h:271
double tebiaMass
mass of the tebia limbs
Definition: amos4legs.h:108
Definition: amos4legs.h:54
std::string bodyTexture
path to texture for trunk
Definition: amos4legs.h:287
double shoulderHeight
fix legs to trunk at this distance from bottom of trunk
Definition: amos4legs.h:113
int amos_version
Definition: amos4legs.h:294
double secondMaxVel
maximal velocity of the CTr joint servo
Definition: amos4legs.h:258
double mcoxaJointLimitF
forward limit of the middle TC joints, negative is forward (zero specified by fcoxaZero) ...
Definition: amos4legs.h:202
double secondLength
length of the second limbs
Definition: amos4legs.h:170
double footPower
maximal force of the foot spring servos
Definition: amos4legs.h:240
Matrixd Matrix
Definition: osgforwarddecl.h:47
void nameMotor(const int motorNo, const char *name)
Assign a human readable name to a motor.
Definition: amos4legs.cpp:300
Class for sensing the axis orienation of a primitive (robot)
Definition: axisorientationsensor.h:33
std::string texture
path to texture for legs
Definition: amos4legs.h:285
double frontLength
length of the front of the body (if back joint is used)
Definition: amos4legs.h:89
double mLegTrunkAngleH
angle in rad around horizontal axis at leg-trunk fixation for middle legs
Definition: amos4legs.h:142
iparamkey name
Definition: inspectable.h:251
double footRadius
radius of the foot capsules, choose different from tebiaRadius
Definition: amos4legs.h:181
virtual int getSensorNumberIntern()
returns number of sensors
Definition: amos4legs.cpp:334
double rLegTrunkAngleV
angle in rad around vertical axis at leg-trunk fixation for rear legs
Definition: amos4legs.h:147
double tebiaLength
length of the tebia limbs including fully extended foot spring (if used)
Definition: amos4legs.h:175
void setLegPosUsage(LegPos leg, LegPosUsage usage)
Definition: amos4legs.cpp:1362
double width
trunk width
Definition: amos4legs.h:85
Definition: amos4legs.h:317
double footMaxVel
maximal velocity of the foot spring servo
Definition: amos4legs.h:262
Definition: amos4legs.h:314
double footDamping
damping of the foot spring servo
Definition: amos4legs.h:251
double coxaPower
maximal force of the TC joint servos
Definition: amos4legs.h:234
Data structure for accessing the OpenSceneGraph.
Definition: osghandle.h:79
static AmosFourConf getAmosIIv1Conf(double _scale=1.0, bool _useShoulder=1, bool _useFoot=1, bool _useBack=0)
Definition: amos4legs.cpp:1584
double backJointLimitU
upper limit of the backbone joint, positive is down
Definition: amos4legs.h:193
Class for IR sensors.
Definition: irsensor.h:39
static MotorName getMotorName(LegPos leg, LegJointType joint)
returns the MotorName enum value for the given joint at the given leg.
Definition: amos4legs.cpp:1241
bool useBack
use the hinge joint in the back
Definition: amos4legs.h:68
Definition: amos4legs.h:444
double fLegTrunkAngleH
angle in rad around horizontal axis at leg-trunk fixation for front legs
Definition: amos4legs.h:134
LegPosUsage
Definition: amos4legs.h:306
Definition: amos4legs.h:307
double coxaDamping
damping of the TC joint servos
Definition: amos4legs.h:245
bool useLocalVelSensor
decide whether you wand to use a local velocity sensors.
Definition: amos4legs.h:77
double tebiaPower
maximal force of the FTi joint servos
Definition: amos4legs.h:238
std::vector< Primitive * > GoalSensor_references
Definition: amos4legs.h:290
double footSpringLimitD
lower limit of the foot spring = minimum value (negative is downwards (spring extends)) ...
Definition: amos4legs.h:229
virtual void sense(GlobalData &globalData)
this function is called each controlstep before control.
Definition: amos4legs.cpp:625
double wheel_radius
radius of a wheel
Definition: amos4legs.h:91
double wheel_mass
mass of a wheel
Definition: amos4legs.h:95
double coxaMass
mass of the coxa limbs
Definition: amos4legs.h:104
HingeJoint * tcJoint
Definition: amos4legs.h:446
Spring * footSpring
Definition: amos4legs.h:453
Definition: position.h:30
Primitive * second
Definition: amos4legs.h:456
double secondDamping
damping of the CTr joint servo
Definition: amos4legs.h:247
virtual int getSensorsIntern(sensor *sensors, int sensornumber)
returns actual sensorvalues
Definition: amos4legs.cpp:350
double paramval
Definition: configurable.h:88
static LegPos getMotorLegPos(MotorName)
Returns the leg of the given motor.
Definition: amos4legs.cpp:1329
virtual void setMotorsIntern(const double *motors, int motornumber)
sets actual motorcommands
Definition: amos4legs.cpp:314
Definition: amos4legs.h:307
virtual void placeIntern(const osg::Matrix &pose)
sets the pose of the vehicle
Definition: amos4legs.cpp:563
OneAxisServo * ctrServo
Definition: amos4legs.h:451
double rLegRotAngle
rotation of rear legs around own axis
Definition: amos4legs.h:152
double shoulderLength
length of the shoulder limbs (if used)
Definition: amos4legs.h:162
void nameSensor(const int sensorNo, const char *name)
Assign a human readable name to a sensor.
Definition: amos4legs.cpp:282
double mLegRotAngle
rotation of middle legs around own axis
Definition: amos4legs.h:144
double shoulderMass
mass of the shoulders (if used)
Definition: amos4legs.h:102
double backMaxVel
maximal velocity of the backbone joint servo
Definition: amos4legs.h:254
double irRangeLeg
}
Definition: amos4legs.h:282
Leg()
Definition: amos4legs.cpp:57
virtual void destroy()
destroys vehicle and space
Definition: amos4legs.cpp:1098
Definition: amos4legs.h:319
Definition: amos4legs.h:307
LegPos
Definition: amos4legs.h:303
Interface class for primitives represented in the physical and graphical world.
Definition: primitive.h:80
double secondRadius
radius of the second limbs
Definition: amos4legs.h:172
Primitive * coxa
Definition: amos4legs.h:455
Data structure holding all essential global information.
Definition: globaldata.h:57
double secondJointLimitD
lower limit of the CTr joints, positive is down
Definition: amos4legs.h:213
double fLegRotAngle
rotation of front legs around own axis
Definition: amos4legs.h:136
static LegJointType getLegJointType(MotorName)
Returns the joint type of the given motor.
Definition: amos4legs.cpp:1290
double secondJointLimitU
upper limit of the CTr joints, positive is down
Definition: amos4legs.h:215
std::list< SensorAttachment > sensors
Definition: oderobot.h:269
Class for speed sensing of robots.
Definition: speedsensor.h:34
double coxaLength
length of the coxa limbs
Definition: amos4legs.h:166
virtual bool setParam(const paramkey &key, paramval val)
Definition: amos4legs.cpp:1168
HingeJoint * ftiJoint
Definition: amos4legs.h:448
Interface for inspectable objects.
Definition: inspectable.h:48
double footRange
range of the foot spring
Definition: amos4legs.h:179
Definition: amos4legs.h:298
AmosIIMotorNames MotorName
Definition: amos4legs.h:321
double rcoxaJointLimitB
backward limit of the rear TC joints, negative is forward (zero specified by fcoxaZero) ...
Definition: amos4legs.h:211
double mcoxaJointLimitB
backward limit of the middle TC joints, negative is forward (zero specified by fcoxaZero) ...
Definition: amos4legs.h:205
SliderJoint * footJoint
Definition: amos4legs.h:449
double fLegTrunkAngleV
angle in rad around vertical axis at leg-trunk fixation for front legs
Definition: amos4legs.h:131
double frontMass
mass of the front part of the robot (if backboine joint is used)
Definition: amos4legs.h:100
double mLegTrunkAngleV
angle in rad around vertical axis at leg-trunk fixation for middle legs
Definition: amos4legs.h:139
OsgHandle osgHandle
Definition: oderobot.h:278
double rLegTrunkAngleH
angle in rad around horizontal axis at leg-trunk fixation for rear legs
Definition: amos4legs.h:150
OdeHandle odeHandle
Definition: oderobot.h:277
bool useFoot
use spring foot
Definition: amos4legs.h:66
double legdist1
distance between hindlegs and middle legs
Definition: amos4legs.h:116
double tebiaRadius
radius of the tebia limbs
Definition: amos4legs.h:177
Definition: amos4legs.h:304
double coxaRadius
radius of the coxa limbs
Definition: amos4legs.h:168
double coxaMaxVel
maximal velocity of the TC joint servo
Definition: amos4legs.h:256
Abstract class for ODE robots.
Definition: oderobot.h:64
bool useTebiaJoints
whether to use joints at the knees or fix them
Definition: amos4legs.h:64
double height
trunk height
Definition: amos4legs.h:87
virtual void create(const osg::Matrix &pose)
creates vehicle at desired pose
Definition: amos4legs.cpp:672
double size
scaling factor for robot (length of body)
Definition: amos4legs.h:83
bool useShoulder
fix the shoulder element to the trunk.
Definition: amos4legs.h:62
double usAngleY
angle versus y axis
Definition: amos4legs.h:273
double sensor
Definition: abstractrobot.h:43
double fcoxaJointLimitF
forward limit of the front TC joints, negative is forward (zero specified by fcoxazero) ...
Definition: amos4legs.h:196
Definition: amos4legs.h:304
double tebiaJointLimitU
upper limit of the FTi joints, positive is down
Definition: amos4legs.h:219
virtual void doInternalStuff(GlobalData &globalData)
this function is called in each timestep.
Definition: amos4legs.cpp:643
double secondPower
maximal force of the CTr joint servos
Definition: amos4legs.h:236
AmosIIMotorNames
Definition: amosiisensormotordefinition.h:222
double backPower
maximal force of the backbone joint
Definition: amos4legs.h:232
double tebiaDamping
damping of the FTi joint servo
Definition: amos4legs.h:249
AmosIISensorNames SensorName
Definition: amos4legs.h:322
bool rubberFeet
if true, rubber substance is used for feet instead of the substance used for the rest of the robot ...
Definition: amos4legs.h:73
virtual Primitive * getMainPrimitive() const
the main object of the robot, which is used for position and speed tracking
Definition: amos4legs.cpp:663
static AmosFourConf getAmosIIv2Conf(double _scale=1.0, bool _useShoulder=1, bool _useFoot=1, bool _useBack=0)
Definition: amos4legs.cpp:1370
double backJointLimitD
{
Definition: amos4legs.h:191
double tebiaMaxVel
maximal velocity of the FTi joint servo
Definition: amos4legs.h:260
double usRangeFront
range of the front ultrasonic sensors
Definition: amos4legs.h:278
double footSpringPreload
}
Definition: amos4legs.h:223
OneAxisServo * ftiServo
Definition: amos4legs.h:452
virtual void update()
updates the OSG nodes of the vehicle
Definition: amos4legs.cpp:583
bool usParallel
choose between parallel or antiparallel front ultrasonic sensors true means parallel ...
Definition: amos4legs.h:276
general servo motor to achieve position control
Definition: oneaxisservo.h:38
HingeJoint * ctrJoint
Definition: amos4legs.h:447
std::list< MotorAttachment > motors
Definition: oderobot.h:270
virtual double getMassOfRobot()
Definition: amos4legs.cpp:613
LegJointType
Definition: amos4legs.h:309
double fcoxaJointLimitB
backward limit of the front TC joints, negative is forward (zero specified by fcoxaZero) ...
Definition: amos4legs.h:199
Definition: amos4legs.h:304
double secondMass
mass of the second limbs
Definition: amos4legs.h:106
double shoulderRadius
radius of the shoulder limbs (if used)
Definition: amos4legs.h:164