Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
amos4legs.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2012 by *
3  * Martin Biehl <mab@physik3.gwdg.de> *
4  * Guillaume de Chambrier <s0672742@sms.ed.ac.uk> *
5  * martius@informatik.uni-leipzig.de *
6  * Timo Nachstedt <nachstedt@physik3.gwdg.de> *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the *
20  * Free Software Foundation, Inc., *
21  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22  * *
23  **************************************************************************/
24 
25 #ifndef __AMOSFOUR_H
26 #define __AMOSFOUR_H
27 
28 #include <ode_robots/oderobot.h>
29 #include <selforg/inspectable.h>
30 #include <ode_robots/contactsensor.h>
31 //-------------Add by Ren relativepositionsensor.h-------
32 #include <ode_robots/relativepositionsensor.h>
33 #include <ode_robots/axisorientationsensor.h>
34 #include <ode_robots/amosiisensormotordefinition.h>
35 
36 /**
37  * forward declarations
38  */
39 namespace lpzrobots {
40  class HingeJoint;
41  class IRSensor;
42  class Joint;
43  class OneAxisServo;
44  class Primitive;
45  class RaySensorBank;
46  class SliderJoint;
47  class SpeedSensor;
48  class Spring;
49  class TwoAxisServo;
50 }
51 
52 namespace lpzrobots {
53 
54  struct AmosFourConf {
55  /**
56  * @name flags
57  *
58  * Enable or disable different element and features
59  */
60  /**@{*/
61  /** fix the shoulder element to the trunk. */
63  /** whether to use joints at the knees or fix them */
65  /** use spring foot */
66  bool useFoot;
67  /** use the hinge joint in the back */
68  bool useBack;
69  /**
70  * if true, rubber substance is used for feet instead of the substance
71  * used for the rest of the robot
72  */
73  bool rubberFeet;
74  /** decide whether you wand to use a local velocity sensors.
75  * If yes it gets velocity vector in local coordinates and pass it as
76  * sensorvalues */
78  /** Use binary leg contact sensors. If false, a force sensor is used. */
80  /**@}*/
81 
82  /** scaling factor for robot (length of body) */
83  double size;
84  /** trunk width */
85  double width;
86  /** trunk height */
87  double height;
88  /** length of the front of the body (if back joint is used) */
89  double frontLength;
90  /** radius of a wheel */
91  double wheel_radius;
92  /** width of a wheel */
93  double wheel_width;
94  /** mass of a wheel */
95  double wheel_mass;
96 
97  /** trunk mass */
98  double trunkMass;
99  /** mass of the front part of the robot (if backboine joint is used) */
100  double frontMass;
101  /** mass of the shoulders (if used) */
102  double shoulderMass;
103  /** mass of the coxa limbs */
104  double coxaMass;
105  /** mass of the second limbs */
106  double secondMass;
107  /** mass of the tebia limbs */
108  double tebiaMass;
109  /** mass of the feet */
110  double footMass;
111 
112  /** fix legs to trunk at this distance from bottom of trunk */
114 
115  /** distance between hindlegs and middle legs */
116  double legdist1;
117 
118  /** distance between middle legs and front legs */
119  double legdist2;
120 
121  /** @name Leg extension from trunk
122  *
123  * amosII has a fixed but adjustable joint that decides how the legs
124  * extend from the trunk.here you can adjust these joints, if
125  * shoulder = 0 this still influences how the legs extend (the coxa-trunk
126  * connection in that case)
127  */
128  /**@{*/
129  /** angle in rad around vertical axis at leg-trunk fixation for front
130  * legs*/
132  /** angle in rad around horizontal axis at leg-trunk fixation for front
133  * legs */
135  /** rotation of front legs around own axis */
136  double fLegRotAngle;
137  /** angle in rad around vertical axis at leg-trunk fixation for middle
138  * legs */
140  /** angle in rad around horizontal axis at leg-trunk fixation for middle
141  * legs */
143  /** rotation of middle legs around own axis */
144  double mLegRotAngle;
145  /** angle in rad around vertical axis at leg-trunk fixation for rear legs
146  * */
148  /** angle in rad around horizontal axis at leg-trunk fixation for rear
149  * legs */
151  /** rotation of rear legs around own axis */
152  double rLegRotAngle;
153  /**@}*/
154 
155  /**
156  * @name leg part dimensions
157  *
158  * the lengths and radii of the individual leg parts
159  */
160  /**@{*/
161  /** length of the shoulder limbs (if used) */
163  /** radius of the shoulder limbs (if used) */
165  /** length of the coxa limbs */
166  double coxaLength;
167  /** radius of the coxa limbs */
168  double coxaRadius;
169  /** length of the second limbs */
170  double secondLength;
171  /** radius of the second limbs */
172  double secondRadius;
173  /** length of the tebia limbs including fully extended foot spring
174  * (if used) */
175  double tebiaLength;
176  /** radius of the tebia limbs */
177  double tebiaRadius;
178  /** range of the foot spring */
179  double footRange;
180  /** radius of the foot capsules, choose different from tebiaRadius */
181  double footRadius;
182  /**@}*/
183 
184  /**
185  * @name Joint Limits
186  *
187  * set limits for each joint
188  */
189  /**{*/
190  /** smaller limit of the backbone joint, positive is down */
192  /** upper limit of the backbone joint, positive is down */
194  /** forward limit of the front TC joints, negative is forward
195  * (zero specified by fcoxazero) */
197  /** backward limit of the front TC joints, negative is forward
198  * (zero specified by fcoxaZero) */
200  /** forward limit of the middle TC joints, negative is forward
201  * (zero specified by fcoxaZero) */
203  /** backward limit of the middle TC joints, negative is forward
204  * (zero specified by fcoxaZero) */
206  /** forward limit of the rear TC joints, negative is forward
207  * (zero specified by fcoxaZero) */
209  /** backward limit of the rear TC joints, negative is forward
210  * (zero specified by fcoxaZero) */
212  /** lower limit of the CTr joints, positive is down */
214  /** upper limit of the CTr joints, positive is down */
216  /** lower limit of the FTi joints, positive is down */
218  /** upper limit of the FTi joints, positive is down */
220  /**}*/
221 
222  /** preload of the foot spring */
224  /** upper limit of the foot spring = maximum value
225  * (negative is downwards (spring extends)) */
227  /** lower limit of the foot spring = minimum value
228  * (negative is downwards (spring extends)) */
230 
231  /** maximal force of the backbone joint */
232  double backPower;
233  /** maximal force of the TC joint servos */
234  double coxaPower;
235  /** maximal force of the CTr joint servos */
236  double secondPower;
237  /** maximal force of the FTi joint servos */
238  double tebiaPower;
239  /** maximal force of the foot spring servos */
240  double footPower;
241 
242  /** damping of the backbone joint servo */
243  double backDamping;
244  /** damping of the TC joint servos */
245  double coxaDamping;
246  /** damping of the CTr joint servo */
248  /** damping of the FTi joint servo */
249  double tebiaDamping;
250  /** damping of the foot spring servo */
251  double footDamping;
252 
253  /** maximal velocity of the backbone joint servo */
254  double backMaxVel;
255  /** maximal velocity of the TC joint servo */
256  double coxaMaxVel;
257  /** maximal velocity of the CTr joint servo */
258  double secondMaxVel;
259  /** maximal velocity of the FTi joint servo */
260  double tebiaMaxVel;
261  /** maximal velocity of the foot spring servo */
262  double footMaxVel;
263 
264  /**
265  * @name front ultrasonic sensors
266  *
267  * configure the front ultrasonic sensors
268  */
269  /**{*/
270  /** angle versus x axis */
271  double usAngleX;
272  /** angle versus y axis */
273  double usAngleY;
274  /** choose between parallel or antiparallel front ultrasonic sensors true
275  * means parallel */
277  /** range of the front ultrasonic sensors */
278  double usRangeFront;
279  /**}*/
280 
281  /** range of the infrared sensors at the legs */
282  double irRangeLeg;
283 
284  /** path to texture for legs */
285  std::string texture;
286  /** path to texture for trunk */
287  std::string bodyTexture;
288 
289  //-----------Add GoalSensor by Ren------------------------
290  std::vector<Primitive*> GoalSensor_references;
291  //-----------Add GoalSensor by Ren------------------------
292 
293  // Internal variable storing the currently used version
295 
296  };
297 
298  class AmosFour : public OdeRobot, public Inspectable {
299  public:
300 // enum LegPos {
301 // L0, L1, L2, R0, R1, R2, LEG_POS_MAX
302 // };
303  enum LegPos {
305  };
306  enum LegPosUsage {
308  };
310  // thoroca-coxal joint for forward (+) and backward (-) movements
311  TC,
312  // coxa-trochanteral joint for elevation (+) and depression (-) of
313  // the leg
315  // femur-tibia joints for extension (+) and flexion (-) of the
316  // tibia
318  // maximum value, used for iteration
320  };
323 
324  /**
325  * Returns the default configuration values
326  */
327  static AmosFourConf getDefaultConf(double _scale = 1.0, bool _useShoulder = 1, bool _useFoot = 1,
328  bool _useBack = 0);
329 
330  static AmosFourConf getAmosIIv1Conf(double _scale = 1.0, bool _useShoulder = 1, bool _useFoot = 1,
331  bool _useBack = 0);
332 
333  static AmosFourConf getAmosIIv2Conf(double _scale = 1.0, bool _useShoulder = 1, bool _useFoot = 1,
334  bool _useBack = 0);
335 
336  /**
337  * constructor
338  * @param odeHandle data structure for accessing ODE
339  * @param osgHandle ata structure for accessing OSG
340  * @param conf configuration object
341  * @param name name to display for this robot
342  */
344  const std::string& name = "AmosII robot");
345 
346  virtual ~AmosFour();
347 
348  /**
349  * updates the OSG nodes of the vehicle
350  */
351  virtual void update();
352 
353  /**
354  * sets the pose of the vehicle
355  * @param pose desired pose matrix
356  */
357  virtual void placeIntern(const osg::Matrix& pose);
358 
359  /**
360  * returns actual sensorvalues
361  * @param sensors sensor array with sensors scaled to [-1,1]
362  * @param sensornumber length of the sensor array
363  * @return number of actually written sensors
364  */
365  virtual int getSensorsIntern(sensor* sensors, int sensornumber);
366 
367  /**
368  * sets actual motorcommands
369  * @param motors motors scaled to [-1,1]
370  * @param motornumber length of the motor array
371  */
372  virtual void setMotorsIntern(const double* motors, int motornumber);
373 
374  /**
375  * returns number of sensors
376  */
377  virtual int getSensorNumberIntern();
378 
379  /**
380  * returns number of motors
381  */
382  virtual int getMotorNumberIntern();
383 
384  /**
385  * this function is called in each timestep. It should perform
386  * robot-internal checks,like space-internal collision detection, sensor
387  * resets/update etc.
388  * @param globalData structure that contains global data from the
389  * simulation environment
390  */
391  virtual void doInternalStuff(GlobalData& globalData);
392 
393  virtual void sense(GlobalData& globalData);
394 
395  virtual double getMassOfRobot();
396 
397  void setLegPosUsage(LegPos leg, LegPosUsage usage);
398 
399  // Configurable Interface
400  virtual bool setParam(const paramkey& key, paramval val);
401 
402  /**
403  * the main object of the robot, which is used for position and speed
404  * tracking
405  */
406  virtual Primitive* getMainPrimitive() const;
407 
408  /**
409  * returns the MotorName enum value for the given joint at the given
410  * leg. If the value for leg or joint are not valid AMOSII_MOTOR_MAX
411  * is returned.
412  *
413  * @param leg leg position
414  * @param joint leg joint type
415  * @return the motor name value or AMOSII_MOTOR_MAX if parameters are
416  * invalid
417  */
418  static MotorName getMotorName(LegPos leg, LegJointType joint);
419 
420  /**
421  * Returns the joint type of the given motor. If the given motor name
422  * is not associated with a leg joint JOINT_TYPE_MAX is returend and a
423  * warning is given out.
424  *
425  * @param MotorName name of the motor
426  * @return joint type controlled by this motor or JOINT_TYPE_MAX if
427  * MotorName is invalid
428  */
430 
431  /**
432  * Returns the leg of the given motor. If the given motor name is not
433  * associated wit a leg LEG_POS_MAX is returned and a warning is given
434  * out.
435  *
436  * @param MotorName name of the motor
437  * @return the leg on which this motor operates or LEG_POS_MAX if
438  * MotorName is invalid
439  */
441 
442  protected:
443 
444  struct Leg {
445  Leg();
459  };
460 
461  /**
462  * creates vehicle at desired pose
463  *
464  * @param pose 4x4 pose matrix
465  */
466  virtual void create(const osg::Matrix& pose);
467 
468  /**
469  * destroys vehicle and space
470  */
471  virtual void destroy();
472 
473  /**
474  * Assign a human readable name to a motor. This name is used for the
475  * associated inspectable value as used e.g. in guilogger.
476  *
477  * @param motorNo index of the motor (for standard motors defined by
478  * the MotorName enum)
479  * @param name human readable name for the motor
480  */
481  void nameMotor(const int motorNo, const char* name);
482 
483  /**
484  * Assign a human readable name to a sensor. This name is used for the
485  * associated inspectable value as used e.g. in guilogger.
486  *
487  * @param motorNo index of the motor (for standard motors defined by
488  * the SensorName enum)
489  * @param name human readable name for the sensor
490  */
491  void nameSensor(const int sensorNo, const char* name);
492 
493  private:
494 
495  /** typedefs */
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;
505 
506  AmosFourConf conf;
507  bool created; // true if robot was created
508 
509  /** a collection of ir sensors **/
510  RaySensorBank * irSensorBank;
511 
512  /** speed sensor */
513  SpeedSensor * speedsensor;
514 
515  /**
516  * statistics
517  * theses values are updated in every timestep and have to be updated
518  * to make them available to the lpzrobots::Inspectable interface
519  */
520  /** position of the robot */
521  Position position;
522 
523  /**
524  * defines for everey leg position the way it is used (e.g place
525  * a leg or a wheel at this position)
526  */
527  LegPosUsageMap legPosUsage;
528 
529  /**
530  * used for detection of leg contacts
531  */
532  LegContactMap legContactSensors;
533 
534  // this map knows which IR sensor to find at which leg
535  LegIRSensorMap irLegSensors;
536 
537  // holds the two front ultrasonic sensors
538  IRSensor * usSensorFrontLeft;
539  IRSensor * usSensorFrontRight;
540 
541 // // body in case of no hinge joint being used
542 // Primitive *trunk;
543 //
544 // // front part of body (when hinge joint is used)
545 // Primitive *front;
546 
547  // back part of body (when hinge joint is used)
548  Primitive *center;
549 
550  // information on all legs
551  LegMap legs;
552 
553  // back bone joint
554  OneAxisServo * backboneServo;
555 
556  // all the objects
557  PrimitiveList objects;
558 
559  // all the joints
560  JointList joints;
561 
562  // passive servos without a Motorname
563  ServoList passiveServos;
564 
565  // contains all active servos
566  MotorMap servos;
567 
568  //---------------Add GoalSensor by Ren---------------
569  std::vector<RelativePositionSensor> GoalSensor; // Relative position sensors
570  bool GoalSensor_active;
571  AxisOrientationSensor* OrientationSensor;
572  //---------------Add GoalSensor by Ren---------------
573 
574  };
575 }
576 
577 #endif
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
Definition: joint.h:304
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
Definition: spring.h:30
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
Definition: joint.h:183
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