footbot_distance_scanner_equipped_entity.cpp
Go to the documentation of this file.
1 
8 #include <argos3/core/simulator/physics_engine/physics_engine.h>
9 #include <argos3/core/simulator/space/space.h>
10 
11 namespace argos {
12 
13  /****************************************/
14  /****************************************/
15 
17  CEntity(pc_parent),
18  m_unMode(MODE_OFF),
19  m_fRotationSpeed(0.0f) {
20  Disable();
21  }
22 
23  /****************************************/
24  /****************************************/
25 
27  const std::string& str_id) :
28  CEntity(pc_parent, str_id),
29  m_unMode(MODE_OFF),
30  m_fRotationSpeed(0.0f) {
31  Disable();
32  }
33 
34  /****************************************/
35  /****************************************/
36 
38  m_unMode = MODE_OFF;
39  m_cRotation = CRadians::ZERO;
40  m_fRotationSpeed = 0.0f;
41  }
42 
43  /****************************************/
44  /****************************************/
45 
47  if(m_unMode == MODE_SPEED_CONTROL &&
48  m_fRotationSpeed != 0.0f) {
49  m_cRotation += CRadians(m_fRotationSpeed *
51  m_cRotation.UnsignedNormalize();
52  }
53  }
54 
55  /****************************************/
56  /****************************************/
57 
59  m_cRotation = c_rotation;
60  m_cRotation.UnsignedNormalize();
61  }
62 
63  /****************************************/
64  /****************************************/
65 
67 
68  /****************************************/
69  /****************************************/
70 
71 }
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
REGISTER_STANDARD_SPACE_OPERATIONS_ON_ENTITY(CEntity)
Basic class for an entity that contains other entities.
The basic entity type.
Definition: entity.h:90
void Disable()
Disables the entity.
Definition: entity.h:275
static Real GetSimulationClockTick()
Returns the simulation clock tick.
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
CRadians & UnsignedNormalize()
Normalizes the value in the range [0:TWO_PI].
Definition: angles.h:148
static const CRadians ZERO
Set to zero radians.
Definition: angles.h:79
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
virtual void Update()
Updates the state of this entity.