00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef PHYMARXBOT_H
00023 #define PHYMARXBOT_H
00024
00025 #include "worldsimconfig.h"
00026 #include "wvector.h"
00027 #include "wmatrix.h"
00028 #include "world.h"
00029 #include "motorcontrollers.h"
00030 #include "sensorcontrollers.h"
00031 #include <QVector>
00032
00033 namespace farsa {
00034 class PhyObject;
00035 class PhyJoint;
00036 class PhyCylinder;
00037 class PhyFixed;
00038
00042 class FARSA_WSIM_API PhyMarXbot : public WObject {
00043 Q_OBJECT
00044 public:
00048 PhyMarXbot( World* world, QString name, const wMatrix& tm = wMatrix::identity() );
00051 virtual ~PhyMarXbot();
00053 WheelMotorController* wheelsController() {
00054 return wheelsCtrl;
00055 };
00057 IRSensorController* proximityIRSensorController() {
00058 return proximityIR;
00059 }
00061 IRSensorController* groundBottomIRSensorController() {
00062 return groundBottomIR;
00063 }
00065 IRSensorController* groundAroundIRSensorController() {
00066 return groundAroundIR;
00067 }
00072 virtual void preUpdate();
00077 virtual void postUpdate();
00079 void setProximityIRSensorsGraphicalProperties(bool drawSensor, bool drawRay = false, bool drawRealRay = false);
00081 void setGroundBottomIRSensorsGraphicalProperties(bool drawSensor, bool drawRay = false, bool drawRealRay = false);
00083 void setGroundAroundIRSensorsGraphicalProperties(bool drawSensor, bool drawRay = false, bool drawRealRay = false);
00084 public slots:
00085
00086 protected:
00088 virtual void changedMatrix();
00089
00090 private:
00092 PhyObject* base;
00094 QVector<PhyObject*> wheels;
00096 QVector<wMatrix> wheelstm;
00098 QVector<PhyJoint*> wheelJoints;
00100 WheelMotorController* wheelsCtrl;
00102 PhyObject* attachring;
00104 wMatrix attachringtm;
00106 PhyJoint* forcesensor;
00108 SimulatedIRProximitySensorController* proximityIR;
00110 SimulatedIRGroundSensorController* groundBottomIR;
00112 SimulatedIRGroundSensorController* groundAroundIR;
00113 };
00114 }
00115
00116 #endif