30 #include <selforg/inspectable.h>
32 #include <ode_robots/oderobot.h>
33 #include <ode_robots/raysensorbank.h>
34 #include <ode_robots/contactsensor.h>
118 const std::string&
name);
194 double round(
double,
int);
249 std::vector<dReal*> pos_record;
254 std::vector<Leg> legContact;
255 Leg* legContactArray;
256 std::vector<dGeomID> footIDs;
double costOfTran
Definition: hexapod.h:236
Matrix type.
Definition: matrix.h:65
double coxaJointLimitH
angle range for horizontal direction of legs
Definition: hexapod.h:55
virtual double * getPosition()
Definition: hexapod.h:206
double tebiaJointLimit
angle range for knees
Definition: hexapod.h:62
Data structure for accessing the ODE.
Definition: odehandle.h:44
virtual Primitive * getMainPrimitive() const
the main object of the robot, which is used for position and speed tracking
Definition: hexapod.h:218
dGeomID geomid
Definition: hexapod.h:101
double E_t
energy consumption over a period t;
Definition: hexapod.h:238
double power(void *c, double x)
returns x the power c (as a double)
Definition: controller_misc.cpp:17
std::vector< std::shared_ptr< OneAxisServo > > tarsussprings
Definition: hexapod.h:266
virtual double getPower()
Definition: hexapod.cpp:678
std::vector< std::shared_ptr< OneAxisServo > > tebiaservos
Definition: hexapod.h:265
Matrixd Matrix
Definition: osgforwarddecl.h:47
charArray paramkey
Definition: avrtypes.h:36
int numTarsusSections
the number of sections in the tarsus
Definition: hexapod.h:70
double height
body with in units of size
Definition: hexapod.h:49
double legmass
Definition: hexapod.h:232
double irRangeRight
Definition: hexapod.h:96
virtual void resetMotorPower(double power)
Definition: hexapod.cpp:682
int legID
Definition: hexapod.h:100
bool recordGait
Definition: hexapod.h:239
iparamkey name
Definition: inspectable.h:251
bool irLeft
Definition: hexapod.h:91
bool ignoreInternalCollisions
Definition: hexapod.h:81
virtual void destroy()
destroys vehicle and space
Definition: hexapod.cpp:667
bool useWhiskers
if true add whiskers to robot
Definition: hexapod.h:74
HexapodConf conf
Definition: hexapod.h:231
bool useActiveWhisker
if true whiskers have motorized joints, otherwise springs
Definition: hexapod.h:75
Data structure for accessing the OpenSceneGraph.
Definition: osghandle.h:79
virtual void create(const osg::Matrix &pose)
creates vehicle at desired pose
Definition: hexapod.cpp:253
bool useBigBox
whether to use a big invisible box on the back of the robot
Definition: hexapod.h:72
bool irRight
Definition: hexapod.h:92
double irRangeBack
Definition: hexapod.h:94
double size
scaling factor for robot (diameter of body)
Definition: hexapod.h:45
double coxaSpeed
speed of the hip servo
Definition: hexapod.h:57
static HexapodConf getDefaultConf()
Definition: hexapod.h:122
virtual void notifyOnChange(const paramkey &key)
Is called when a parameter was changes via setParam().
Definition: hexapod.cpp:689
Primitive * headtrans
Definition: hexapod.h:259
Primitive * bigboxtransform
Definition: hexapod.h:259
double T
T is the for the time for calculating the cost of transport over time.
Definition: hexapod.h:78
virtual ~Hexapod()
Definition: hexapod.h:120
double coxaJointLimitV
angle range for vertical direction of legs
Definition: hexapod.h:54
Primitive * irbox
Definition: hexapod.h:259
double backLegFactor
size factor for back legs
Definition: hexapod.h:67
bool calculateEnergy
Definition: hexapod.h:83
Primitive * trunk
Definition: hexapod.h:259
virtual double outwardMechanicalPower(const dReal *torques, const dReal *angularV)
Definition: hexapod.cpp:121
virtual double getMassOfRobot()
Definition: hexapod.cpp:157
double * heights
Definition: hexapod.h:240
double coxaDamping
damping of hip joint servos
Definition: hexapod.h:56
std::vector< Primitive * > thorax
Definition: hexapod.h:261
double tebiaPower
spring strength in the knees
Definition: hexapod.h:61
bool irFront
Definition: hexapod.h:89
Interface class for primitives represented in the physical and graphical world.
Definition: primitive.h:80
double legSpreading
angle at which legs are spread to the front and back
Definition: hexapod.h:66
double tebiaOffset
angle offset for knees
Definition: hexapod.h:63
double coxaPower
maximal force for at hip joint motors
Definition: hexapod.h:53
double irSensors
Definition: hexapod.h:88
Hexapod(const OdeHandle &odeHandle, const OsgHandle &osgHandle, const HexapodConf &conf, const std::string &name)
constructor of VierBeiner robot
Definition: hexapod.cpp:60
double irRangeLeft
Definition: hexapod.h:95
Data structure holding all essential global information.
Definition: globaldata.h:57
double legLength
length of the legs in units of size
Definition: hexapod.h:46
dBodyID bodyID
Definition: hexapod.h:102
bool useTarsusJoints
whether to use joints on the tarsus
Definition: hexapod.h:71
bool useTebiaMotors
if true tebia joints are actuated, otherwise springs
Definition: hexapod.h:60
bool created
Definition: hexapod.h:233
Interface for inspectable objects.
Definition: inspectable.h:48
matrix::Matrix m
Definition: hexapod.h:86
double * angles
Definition: hexapod.h:241
double tebiaDamping
damping in the knees
Definition: hexapod.h:64
double irRangeFront
Definition: hexapod.h:93
bool tarsus
whether to use a tarsus or not
Definition: hexapod.h:69
bool useTebiaJoints
whether to use joints at the knees
Definition: hexapod.h:59
OsgHandle osgHandle
Definition: oderobot.h:278
OdeHandle odeHandle
Definition: oderobot.h:277
virtual double costOfTransport(double E, double W, double V, double T)
Definition: hexapod.cpp:168
virtual double energyConsumpThroughtHeatLoss(const dReal *torques)
Definition: hexapod.cpp:136
virtual void doInternalStuff(GlobalData &globalData)
this function is called in each timestep.
Definition: hexapod.cpp:181
virtual void placeIntern(const osg::Matrix &pose)
sets the pose of the vehicle
Definition: hexapod.cpp:112
const int T
integer constant for use with exp function and (^) operator to transpose the matrix ...
Definition: matrix.cpp:21
int legNumber
number of snake elements
Definition: hexapod.h:47
double percentageBodyMass
relation between bodymass(trunk) and rest
Definition: hexapod.h:51
Abstract class for ODE robots.
Definition: oderobot.h:64
int * legContacts
Definition: hexapod.h:87
std::vector< Primitive * > legs
Definition: hexapod.h:260
bool useContactSensors
Definition: hexapod.h:85
double width
body with in units of size
Definition: hexapod.h:48
Definition: hexapod.h:108
Primitives objects
list of objects (should be populated by subclasses)
Definition: oderobot.h:265
double round(double, int)
calculates the total energy consumption of all servos.
Definition: hexapod.cpp:172
std::vector< std::shared_ptr< TwoAxisServo > > hipservos
Definition: hexapod.h:264
virtual double energyConsumption()
Definition: hexapod.cpp:142
dJointID joint
Definition: hexapod.h:104
std::vector< Pos > thoraxPos
Definition: hexapod.h:262
double whiskerSpread
angle by which the wiskers are spread
Definition: hexapod.h:76
Primitive * stabaliserTransform
Definition: hexapod.h:259
int c
Definition: hexapod.cpp:56
double * energyOneStep
energy consumption for one time step
Definition: hexapod.h:237
bool irBack
Definition: hexapod.h:90
double * v
Definition: hexapod.h:79
double mass
chassis mass
Definition: hexapod.h:50