ARGoS  3
A parallel, multi-engine simulator for swarm robotics
plugins/robots/foot-bot/simulator/footbot_turret_entity.h
Go to the documentation of this file.
00001 
00007 #ifndef FOOTBOT_TURRET_ENTITY_H
00008 #define FOOTBOT_TURRET_ENTITY_H
00009 
00010 namespace argos {
00011    class CFootBotTurretEntity;
00012 }
00013 
00014 #include <argos3/core/simulator/entity/entity.h>
00015 #include <argos3/core/utility/math/vector3.h>
00016 
00017 namespace argos {
00018 
00019    class CFootBotTurretEntity : public CEntity {
00020 
00021    public:
00022 
00023       ENABLE_VTABLE();
00024 
00025       enum EMode {
00026          MODE_OFF,
00027          MODE_PASSIVE,
00028          MODE_SPEED_CONTROL,
00029          MODE_POSITION_CONTROL
00030       };
00031 
00032    public:
00033 
00034       CFootBotTurretEntity(CComposableEntity* pc_parent);
00035 
00036       CFootBotTurretEntity(CComposableEntity* pc_parent,
00037                            const std::string& str_id);
00038 
00039       virtual void Reset();
00040 
00041       inline UInt32 GetMode() const {
00042          return m_unMode;
00043       }
00044 
00045       inline void SetMode(UInt32 un_mode) {
00046          m_unMode = un_mode;
00047       }
00048 
00049       inline const CRadians& GetRotation() const {
00050          return m_cRotation;
00051       }
00052 
00053       void SetRotation(const CRadians& c_rotation);
00054 
00055       inline Real GetRotationSpeed() const {
00056          return m_fRotationSpeed;
00057       }
00058 
00059       inline void SetRotationSpeed(Real f_speed) {
00060          m_fRotationSpeed = f_speed;
00061       }
00062 
00063       virtual std::string GetTypeDescription() const {
00064          return "turret";
00065       }
00066 
00067    private:
00068 
00069       UInt32 m_unMode;
00070       CRadians m_cRotation;
00071       Real m_fRotationSpeed;
00072 
00073    };
00074 }
00075 
00076 #endif