footbot_distance_scanner_default_actuator.cpp
Go to the documentation of this file.
1 
8 
9 namespace argos {
10 
12 
13  /****************************************/
14  /****************************************/
15 
17  m_fDesiredRotationSpeed(0.0f),
19 
20  /****************************************/
21  /****************************************/
22 
24  m_pcDistanceScannerEquippedEntity = &(c_entity.GetComponent<CFootBotDistanceScannerEquippedEntity>("distance_scanner"));
25  m_pcDistanceScannerEquippedEntity->Enable();
26  }
27 
28  /****************************************/
29  /****************************************/
30 
33  m_cDesiredRotation = c_angle;
34  }
35 
36  /****************************************/
37  /****************************************/
38 
41  m_fDesiredRotationSpeed = f_rpm * RPM_TO_RADIANS_PER_SEC;
42  }
43 
44  /****************************************/
45  /****************************************/
46 
49  }
50 
51  /****************************************/
52  /****************************************/
53 
56  }
57 
58  /****************************************/
59  /****************************************/
60 
62  m_pcDistanceScannerEquippedEntity->SetMode(m_unDesiredMode);
64  m_pcDistanceScannerEquippedEntity->SetRotation(m_cDesiredRotation);
65  }
67  m_pcDistanceScannerEquippedEntity->SetRotationSpeed(m_fDesiredRotationSpeed);
68  }
69  }
70 
71  /****************************************/
72  /****************************************/
73 
75  m_cDesiredRotation = CRadians::ZERO;
76  m_fDesiredRotationSpeed = 0.0f;
78  }
79 
80  /****************************************/
81  /****************************************/
82 
84  "footbot_distance_scanner", "default",
85  "Carlo Pinciroli [ilpincy@gmail.com]",
86  "1.0",
87  "The foot-bot distance scanner actuator.",
88  "This actuator controls the foot-bot distance scanner. For a complete\n"
89  "description of its usage, refer to the ci_footbot_distance_scanner_actuator\n"
90  "file.\n\n"
91  "REQUIRED XML CONFIGURATION\n\n"
92  " <controllers>\n"
93  " ...\n"
94  " <my_controller ...>\n"
95  " ...\n"
96  " <actuators>\n"
97  " ...\n"
98  " <footbot_distance_scanner implementation=\"default\" />\n"
99  " ...\n"
100  " </actuators>\n"
101  " ...\n"
102  " </my_controller>\n"
103  " ...\n"
104  " </controllers>\n\n"
105  "OPTIONAL XML CONFIGURATION\n\n"
106  "None for the time being.\n",
107  "Usable"
108  );
109 
110 }
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
#define ARGOS_PI
To be used when initializing static variables.
Definition: angles.h:32
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
REGISTER_ACTUATOR(CFootBotDistanceScannerDefaultActuator, "footbot_distance_scanner", "default", "Carlo Pinciroli [ilpincy@gmail.com]", "1.0", "The foot-bot distance scanner actuator.", "This actuator controls the foot-bot distance scanner. For a complete\n" "description of its usage, refer to the ci_footbot_distance_scanner_actuator\n" "file.\n\n" "REQUIRED XML CONFIGURATION\n\n" " <controllers>\n" " ...\n" " <my_controller ...>\n" " ...\n" " <actuators>\n" " ...\n" " <footbot_distance_scanner implementation=\"default\" />\n" " ...\n" " </actuators>\n" " ...\n" " </my_controller>\n" " ...\n" " </controllers>\n\n" "OPTIONAL XML CONFIGURATION\n\n" "None for the time being.\n", "Usable")
Basic class for an entity that contains other entities.
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.
void Enable()
Enables the entity.
Definition: entity.h:265
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
static const CRadians ZERO
Set to zero radians.
Definition: angles.h:79
virtual void Update()
Updates the state of the entity associated to this actuator.
virtual void SetRPM(Real f_rpm)
Sets the distance scanner speed The distance scanner can be controller in position or in speed.
virtual void Reset()
Resets the actuator to the state it had just after Init().
virtual void SetAngle(const CRadians &c_angle)
Sets the distance scanner angle The distance scanner can be controller in position or in speed.
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this actuator.