25 #include "worldsimconfig.h"
29 #include "motorcontrollers.h"
30 #include "sensorcontrollers.h"
31 #include "graphicalwobject.h"
34 #include "phycylinder.h"
61 static const real basex;
62 static const real basey;
63 static const real basez;
64 static const real basem;
67 static const real bodyr;
68 static const real bodyh;
69 static const real bodym;
72 static const real axledistance;
73 static const real trackradius;
74 static const real trackheight;
75 static const real trackm;
78 static const real treaddepth;
81 static const real wheelr;
82 static const real wheelh;
83 static const real wheelm;
86 static const real turreth;
87 static const real turretm;
90 static const real attachdevr;
91 static const real attachdevx;
92 static const real attachdevy;
93 static const real attachdevz;
94 static const real attachdevm;
110 return attachdevCtrl;
118 return groundBottomIR;
122 return groundAroundIR;
126 return tractionSensor;
132 virtual void preUpdate();
137 virtual void postUpdate();
139 void setProximityIRSensorsGraphicalProperties(
bool drawSensor,
bool drawRay =
false,
bool drawRealRay =
false);
141 void setGroundBottomIRSensorsGraphicalProperties(
bool drawSensor,
bool drawRay =
false,
bool drawRealRay =
false);
143 void setGroundAroundIRSensorsGraphicalProperties(
bool drawSensor,
bool drawRay =
false,
bool drawRealRay =
false);
152 void setDrawFrontMarker(
bool drawMarker);
161 bool getDrawFrontMarker()
const;
171 void enableAttachmentDevice(
bool enable);
178 bool attachmentDeviceEnabled()
const
180 return (attachdev != NULL);
190 void resetAttachmentDevice();
234 return attachdevjoint;
243 void doKinematicSimulation(
bool k);
246 bool isKinematic()
const
248 return kinematicSimulation;
263 void setLedColors(QList<QColor> c);
270 QList<QColor> ledColors()
const;
279 const QList<PhyCylinder::SegmentColor>& segmentsColor()
const;
293 void setLeftWheelDesideredVelocity(
real velocity);
304 void setRightWheelDesideredVelocity(
real velocity);
308 virtual void changedMatrix();
314 QVector<PhyObject*> wheels;
316 QVector<wMatrix> wheelstm;
318 QVector<PhyJoint*> wheelJoints;
346 bool kinematicSimulation;
348 real leftWheelVelocity;
350 real rightWheelVelocity;
366 QList<QColor> ledColorsv;
375 mutable QList<PhyCylinder::SegmentColor> uniformColor;
388 static const real basex;
389 static const real basey;
390 static const real basez;
391 static const real basem;
394 static const real bodyr;
395 static const real bodyh;
396 static const real bodym;
399 static const real axledistance;
400 static const real trackradius;
401 static const real trackheight;
402 static const real trackm;
405 static const real treaddepth;
408 static const real wheelr;
409 static const real wheelh;
410 static const real wheelm;
413 static const real attachringh;
414 static const real attachringm;
417 static const real ledsh;
418 static const real ledsradius;
419 static const real ledsm;
439 return groundBottomIR;
443 return groundAroundIR;
447 return tractionSensor;
453 virtual void preUpdate();
458 virtual void postUpdate();
460 void setProximityIRSensorsGraphicalProperties(
bool drawSensor,
bool drawRay =
false,
bool drawRealRay =
false);
462 void setGroundBottomIRSensorsGraphicalProperties(
bool drawSensor,
bool drawRay =
false,
bool drawRealRay =
false);
464 void setGroundAroundIRSensorsGraphicalProperties(
bool drawSensor,
bool drawRay =
false,
bool drawRealRay =
false);
473 void doKinematicSimulation(
bool k);
477 bool isKinematic()
const
479 return kinematicSimulation;
493 void setLeftWheelDesideredVelocity(
real velocity);
504 void setRightWheelDesideredVelocity(
real velocity);
508 virtual void changedMatrix();
514 QVector<PhyObject*> wheels;
516 QVector<wMatrix> wheelstm;
518 QVector<PhyJoint*> wheelJoints;
536 bool kinematicSimulation;
538 real leftWheelVelocity;
540 real rightWheelVelocity;