footbot_entity.h
Go to the documentation of this file.
1 
7 #ifndef FOOTBOT_ENTITY_H
8 #define FOOTBOT_ENTITY_H
9 
10 namespace argos {
11  class CBatteryEquippedEntity;
12  class CControllableEntity;
13  class CFootBotDistanceScannerEquippedEntity;
14  class CEmbodiedEntity;
15  class CFootBotEntity;
16  class CFootBotTurretEntity;
17  class CGripperEquippedEntity;
18  class CGroundSensorEquippedEntity;
19  class CLEDEquippedEntity;
20  class CLightSensorEquippedEntity;
21  class COmnidirectionalCameraEquippedEntity;
22  class CPerspectiveCameraEquippedEntity;
23  class CProximitySensorEquippedEntity;
24  class CRABEquippedEntity;
25  class CWiFiEquippedEntity;
26 }
27 
28 #include <argos3/core/simulator/entity/composable_entity.h>
29 #include <argos3/plugins/simulator/entities/wheeled_entity.h>
30 
31 namespace argos {
32 
34 
35  public:
36 
38 
39  public:
40 
42 
43  CFootBotEntity(const std::string& str_id,
44  const std::string& str_controller_id,
45  const CVector3& c_position = CVector3(),
46  const CQuaternion& c_orientation = CQuaternion(),
47  Real f_rab_range = 3.0f,
48  size_t un_rab_data_size = 10,
49  const std::string& str_bat_model = "",
50  const CRadians& c_omnicam_aperture = ToRadians(CDegrees(70.0f)),
51  bool b_perspcam_front = true,
52  const CRadians& c_perspcam_aperture = ToRadians(CDegrees(30.0f)),
53  Real f_perspcam_focal_length = 0.035,
54  Real f_perspcam_range = 2.0);
55 
56  virtual void Init(TConfigurationNode& t_tree);
57  virtual void Reset();
58  virtual void UpdateComponents();
59 
61  return *m_pcControllableEntity;
62  }
63 
65  return *m_pcControllableEntity;
66  }
67 
69  return *m_pcDistanceScannerEquippedEntity;
70  }
71 
73  return *m_pcTurretEntity;
74  }
75 
77  return *m_pcEmbodiedEntity;
78  }
79 
81  return *m_pcGripperEquippedEntity;
82  }
83 
85  return *m_pcGroundSensorEquippedEntity;
86  }
87 
89  return *m_pcLEDEquippedEntity;
90  }
91 
93  return *m_pcLightSensorEquippedEntity;
94  }
95 
97  return *m_pcOmnidirectionalCameraEquippedEntity;
98  }
99 
101  return *m_pcPerspectiveCameraEquippedEntity;
102  }
103 
105  return *m_pcProximitySensorEquippedEntity;
106  }
107 
109  return *m_pcRABEquippedEntity;
110  }
111 
113  return *m_pcWheeledEntity;
114  }
115 
117  return *m_pcWiFiEquippedEntity;
118  }
119 
121  return *m_pcBatteryEquippedEntity;
122  }
123 
124  virtual std::string GetTypeDescription() const {
125  return "foot-bot";
126  }
127 
128  private:
129 
130  CControllableEntity* m_pcControllableEntity;
131  CFootBotDistanceScannerEquippedEntity* m_pcDistanceScannerEquippedEntity;
132  CFootBotTurretEntity* m_pcTurretEntity;
133  CEmbodiedEntity* m_pcEmbodiedEntity;
134  CGripperEquippedEntity* m_pcGripperEquippedEntity;
135  CGroundSensorEquippedEntity* m_pcGroundSensorEquippedEntity;
136  CLEDEquippedEntity* m_pcLEDEquippedEntity;
137  CLightSensorEquippedEntity* m_pcLightSensorEquippedEntity;
138  COmnidirectionalCameraEquippedEntity* m_pcOmnidirectionalCameraEquippedEntity;
139  CPerspectiveCameraEquippedEntity* m_pcPerspectiveCameraEquippedEntity;
140  CProximitySensorEquippedEntity* m_pcProximitySensorEquippedEntity;
141  CRABEquippedEntity* m_pcRABEquippedEntity;
142  CWheeledEntity* m_pcWheeledEntity;
143  CWiFiEquippedEntity* m_pcWiFiEquippedEntity;
144  CBatteryEquippedEntity* m_pcBatteryEquippedEntity;
145  };
146 
147 }
148 
149 #endif
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
CRadians ToRadians(const CDegrees &c_degrees)
Converts CDegrees to CRadians.
Definition: angles.h:498
Basic class for an entity that contains other entities.
An entity that contains a pointer to the user-defined controller.
This entity is a link to a body in the physics engine.
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
It defines the basic type CDegrees, used to store an angle value in degrees.
Definition: angles.h:288
A 3D vector class.
Definition: vector3.h:31
CGroundSensorEquippedEntity & GetGroundSensorEquippedEntity()
CFootBotTurretEntity & GetTurretEntity()
CGripperEquippedEntity & GetGripperEquippedEntity()
CEmbodiedEntity & GetEmbodiedEntity()
CLEDEquippedEntity & GetLEDEquippedEntity()
CControllableEntity & GetControllableEntity()
CWheeledEntity & GetWheeledEntity()
CLightSensorEquippedEntity & GetLightSensorEquippedEntity()
virtual void UpdateComponents()
Calls the Update() method on all the components.
CWiFiEquippedEntity & GetWiFiEquippedEntity()
CFootBotDistanceScannerEquippedEntity & GetDistanceScannerEquippedEntity()
CPerspectiveCameraEquippedEntity & GetPerspectiveCameraEquippedEntity()
virtual std::string GetTypeDescription() const
Returns a string label for this class.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
CProximitySensorEquippedEntity & GetProximitySensorEquippedEntity()
CRABEquippedEntity & GetRABEquippedEntity()
CBatteryEquippedEntity & GetBatterySensorEquippedEntity()
COmnidirectionalCameraEquippedEntity & GetOmnidirectionalCameraEquippedEntity()
const CControllableEntity & GetControllableEntity() const
An entity that stores the state of a robot gripper.
A container of CLEDEntity.