ARGoS 3
A parallel, multi-engine simulator for swarm robotics
footbot_distance_scanner_default_actuator.cpp
Go to the documentation of this file.
1
8
9namespace argos {
10
12
13 /****************************************/
14 /****************************************/
15
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
43
44 /****************************************/
45 /****************************************/
46
50
51 /****************************************/
52 /****************************************/
53
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}
#define ARGOS_PI
To be used when initializing static variables.
Definition angles.h:32
float Real
Collects all ARGoS code.
Definition datatypes.h:39
#define REGISTER_ACTUATOR(CLASSNAME, LABEL, IMPLEMENTATION, AUTHOR, VERSION, BRIEF_DESCRIPTION, LONG_DESCRIPTION, STATUS)
Registers a new actuator model inside ARGoS.
Definition actuator.h:59
The namespace containing all the ARGoS related code.
Definition ci_actuator.h:12
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.