Warning: include(php/utility.php): Failed to open stream: No such file or directory in /home/argos/argos3/doc/api/embedded/a00579_source.php on line 2

Warning: include(): Failed opening 'php/utility.php' for inclusion (include_path='.:/usr/lib64/php') in /home/argos/argos3/doc/api/embedded/a00579_source.php on line 2
The ARGoS Website

footbot_distance_scanner_rotzonly_sensor.h
Go to the documentation of this file.
1 
7 #ifndef FOOTBOT_DISTANCE_SCANNER_SENSOR_H
8 #define FOOTBOT_DISTANCE_SCANNER_SENSOR_H
9 
10 namespace argos {
11  class CFootBotDistanceScannerRotZOnlySensor;
12  class CControllableEntity;
13  class CSpace;
14 }
15 
16 #include <argos3/plugins/robots/foot-bot/control_interface/ci_footbot_distance_scanner_sensor.h>
17 #include <argos3/plugins/robots/foot-bot/simulator/footbot_distance_scanner_equipped_entity.h>
18 #include <argos3/core/simulator/entity/embodied_entity.h>
19 #include <argos3/core/utility/math/rng.h>
20 #include <argos3/core/utility/math/ray3.h>
21 #include <argos3/core/simulator/sensor.h>
22 
23 #include <string>
24 #include <map>
25 
26 namespace argos {
27 
30 
31  public:
32 
34 
36 
37  virtual void SetRobot(CComposableEntity& c_entity);
38 
39  virtual void Init(TConfigurationNode& t_tree);
40 
41  virtual void Update();
42 
43  virtual void Reset();
44 
45  private:
46 
47  void UpdateNotRotating();
48  void UpdateRotating();
49 
50  Real CalculateReadingForRay(const CRay3& c_ray,
51  Real f_min_distance);
52 
53  void CalculateRaysNotRotating();
54  void CalculateRaysRotating();
55 
56  private:
57 
59  CRandom::CRNG* m_pcRNG;
60 
62  bool m_bAddNoise;
63 
65  CRange<Real> m_cNoiseRange;
66 
67  CSpace& m_cSpace;
68  CFootBotDistanceScannerEquippedEntity* m_pcDistScanEntity;
69  CControllableEntity* m_pcControllableEntity;
70  CEmbodiedEntity* m_pcEmbodiedEntity;
71  CRadians m_cLastDistScanRotation;
72 
73  bool m_bShowRays;
74 
75  CRay3 m_cShortRangeRays0[6];
76  CRay3 m_cShortRangeRays2[6];
77  CRay3 m_cLongRangeRays1[6];
78  CRay3 m_cLongRangeRays3[6];
79 
80  /* Internally used to speed up ray calculations */
81  CVector3 m_cDirection;
82  CVector3 m_cOriginRayStart;
83  CVector3 m_cOriginRayEnd;
84  CVector3 m_cRayStart;
85  CVector3 m_cRayEnd;
86  };
87 
88 }
89 
90 #endif
The RNG.
Definition: rng.h:90
An entity that contains a pointer to the user-defined controller.
A 3D vector class.
Definition: vector3.h:29
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
virtual void Init(TConfigurationNode &t_tree)
Initializes the sensor from the XML configuration tree.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
This entity is a link to a body in the physics engine.
The basic interface for a simulated sensor.
Definition: sensor.h:22
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
Basic class for an entity that contains other entities.
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this sensor.
virtual void Reset()
Resets the sensor to the state it had just after Init().
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
virtual void Update()
Updates the state of the entity associated to this sensor.