ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
00001 00015 #ifndef CCI_FOOTBOT_WHEEL_SPEED_SENSOR_H 00016 #define CCI_FOOTBOT_WHEEL_SPEED_SENSOR_H 00017 00018 /* To avoid dependency problems when including */ 00019 namespace argos { 00020 class CCI_FootBotWheelSpeedSensor; 00021 } 00022 00023 #include <argos3/core/control_interface/ci_sensor.h> 00024 00025 namespace argos { 00026 00027 class CCI_FootBotWheelSpeedSensor : public CCI_Sensor { 00028 00029 public: 00030 00031 struct SReading { 00032 Real LinearVelocityLeft; 00033 Real LinearVelocityRight; 00034 00035 SReading() : 00036 LinearVelocityLeft(0.0f), 00037 LinearVelocityRight(0.0f) { 00038 } 00039 00040 SReading(Real f_linear_velocity_left, 00041 Real f_linear_velocity_right) : 00042 LinearVelocityLeft(f_linear_velocity_left), 00043 LinearVelocityRight(f_linear_velocity_right) { 00044 } 00045 }; 00046 00047 public: 00048 00049 virtual ~CCI_FootBotWheelSpeedSensor() {} 00050 00051 inline const SReading& GetReading() const { 00052 return m_sReading; 00053 } 00054 00055 00056 #ifdef ARGOS_WITH_LUA 00057 virtual void CreateLuaState(lua_State* pt_lua_state); 00058 00059 virtual void ReadingsToLuaState(lua_State* pt_lua_state); 00060 #endif 00061 00062 protected: 00063 00064 SReading m_sReading; 00065 }; 00066 } 00067 00068 #endif