ARGoS 3
A parallel, multi-engine simulator for swarm robotics
gripper_default_actuator.cpp
Go to the documentation of this file.
1
8#include <argos3/core/utility/logging/argos_log.h>
9#include <argos3/core/simulator/entity/composable_entity.h>
10
11namespace argos {
12
13 /****************************************/
14 /****************************************/
15
17 m_pcGripperEquippedEntity(nullptr) {}
18
19 /****************************************/
20 /****************************************/
21
23 m_pcGripperEquippedEntity = &(c_entity.GetComponent<CGripperEquippedEntity>("gripper"));
24 m_pcGripperEquippedEntity->Enable();
25 }
26
27 /****************************************/
28 /****************************************/
29
31 m_pcGripperEquippedEntity->SetLockState(m_fLockState);
32 }
33
34 /****************************************/
35 /****************************************/
36
40
41 /****************************************/
42 /****************************************/
43
44}
45
46REGISTER_ACTUATOR(CGripperDefaultActuator,
47 "gripper", "default",
48 "Carlo Pinciroli [ilpincy@gmail.com]",
49 "1.0",
50 "The Gripper actuator.",
51
52 "This actuator controls a gripper. For a complete description of its\n"
53 "usage, refer to the ci_gripper_actuator.h file.\n\n"
54
55 "REQUIRED XML CONFIGURATION\n\n"
56 " <controllers>\n"
57 " ...\n"
58 " <my_controller ...>\n"
59 " ...\n"
60 " <actuators>\n"
61 " ...\n"
62 " <gripper implementation=\"default\" />\n"
63 " ...\n"
64 " </actuators>\n"
65 " ...\n"
66 " </my_controller>\n"
67 " ...\n"
68 " </controllers>\n\n"
69
70 "OPTIONAL XML CONFIGURATION\n\n"
71
72 "None.\n",
73
74 "Usable"
75 );
76
#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
virtual void Update()
Updates the state of the entity associated to this actuator.
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this actuator.
virtual void Reset()
Resets the actuator to the state it had just after Init().
An entity that stores the state of a robot gripper.
void SetLockState(Real f_lock_state)
Sets the lock state of the gripper.