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 
37  ENABLE_VTABLE();
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_pcDistanceScannerEquippedEntity;
66  }
67 
69  return *m_pcTurretEntity;
70  }
71 
73  return *m_pcEmbodiedEntity;
74  }
75 
77  return *m_pcGripperEquippedEntity;
78  }
79 
81  return *m_pcGroundSensorEquippedEntity;
82  }
83 
85  return *m_pcLEDEquippedEntity;
86  }
87 
89  return *m_pcLightSensorEquippedEntity;
90  }
91 
93  return *m_pcOmnidirectionalCameraEquippedEntity;
94  }
95 
97  return *m_pcPerspectiveCameraEquippedEntity;
98  }
99 
101  return *m_pcProximitySensorEquippedEntity;
102  }
103 
105  return *m_pcRABEquippedEntity;
106  }
107 
109  return *m_pcWheeledEntity;
110  }
111 
113  return *m_pcWiFiEquippedEntity;
114  }
115 
117  return *m_pcBatteryEquippedEntity;
118  }
119 
120  virtual std::string GetTypeDescription() const {
121  return "foot-bot";
122  }
123 
124  private:
125 
126  CControllableEntity* m_pcControllableEntity;
127  CFootBotDistanceScannerEquippedEntity* m_pcDistanceScannerEquippedEntity;
128  CFootBotTurretEntity* m_pcTurretEntity;
129  CEmbodiedEntity* m_pcEmbodiedEntity;
130  CGripperEquippedEntity* m_pcGripperEquippedEntity;
131  CGroundSensorEquippedEntity* m_pcGroundSensorEquippedEntity;
132  CLEDEquippedEntity* m_pcLEDEquippedEntity;
133  CLightSensorEquippedEntity* m_pcLightSensorEquippedEntity;
134  COmnidirectionalCameraEquippedEntity* m_pcOmnidirectionalCameraEquippedEntity;
135  CPerspectiveCameraEquippedEntity* m_pcPerspectiveCameraEquippedEntity;
136  CProximitySensorEquippedEntity* m_pcProximitySensorEquippedEntity;
137  CRABEquippedEntity* m_pcRABEquippedEntity;
138  CWheeledEntity* m_pcWheeledEntity;
139  CWiFiEquippedEntity* m_pcWiFiEquippedEntity;
140  CBatteryEquippedEntity* m_pcBatteryEquippedEntity;
141  };
142 
143 }
144 
145 #endif
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
CEmbodiedEntity & GetEmbodiedEntity()
Basic class for an entity that contains other entities.
CControllableEntity & GetControllableEntity()
CGroundSensorEquippedEntity & GetGroundSensorEquippedEntity()
COmnidirectionalCameraEquippedEntity & GetOmnidirectionalCameraEquippedEntity()
CRABEquippedEntity & GetRABEquippedEntity()
This entity is a link to a body in the physics engine.
CProximitySensorEquippedEntity & GetProximitySensorEquippedEntity()
CFootBotDistanceScannerEquippedEntity & GetDistanceScannerEquippedEntity()
A 3D vector class.
Definition: vector3.h:29
virtual void UpdateComponents()
Calls the Update() method on all the components.
CRadians ToRadians(const CDegrees &c_degrees)
Converts CDegrees to CRadians.
Definition: angles.h:498
CLightSensorEquippedEntity & GetLightSensorEquippedEntity()
CLEDEquippedEntity & GetLEDEquippedEntity()
An entity that stores the state of a robot gripper.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
CBatteryEquippedEntity & GetBatterySensorEquippedEntity()
An entity that contains a pointer to the user-defined controller.
A container of CLEDEntity.
CPerspectiveCameraEquippedEntity & GetPerspectiveCameraEquippedEntity()
It defines the basic type CDegrees, used to store an angle value in degrees.
Definition: angles.h:288
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
CWheeledEntity & GetWheeledEntity()
CWiFiEquippedEntity & GetWiFiEquippedEntity()
CFootBotTurretEntity & GetTurretEntity()
virtual std::string GetTypeDescription() const
Returns a string label for this class.
CGripperEquippedEntity & GetGripperEquippedEntity()
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
float Real
Collects all ARGoS code.
Definition: datatypes.h:39