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 
11 namespace argos {
12 
13  /****************************************/
14  /****************************************/
15 
17  m_pcGripperEquippedEntity(NULL) {}
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 
38  m_fLockState = 0.0;
39  }
40 
41  /****************************************/
42  /****************************************/
43 
44 }
45 
46 REGISTER_ACTUATOR(CGripperDefaultActuator,
47  "gripper", "default",
48  "Carlo Pinciroli [ilpincy@gmail.com]",
49  "1.0",
50  "The Gripper actuator.",
51  "This actuator controls a gripper. For a complete description of its\n"
52  "usage, refer to the ci_gripper_actuator.h file.\n\n"
53  "REQUIRED XML CONFIGURATION\n\n"
54  " <controllers>\n"
55  " ...\n"
56  " <my_controller ...>\n"
57  " ...\n"
58  " <actuators>\n"
59  " ...\n"
60  " <gripper implementation=\"default\" />\n"
61  " ...\n"
62  " </actuators>\n"
63  " ...\n"
64  " </my_controller>\n"
65  " ...\n"
66  " </controllers>\n\n"
67  "OPTIONAL XML CONFIGURATION\n\n"
68  "None.\n",
69  "Usable"
70  );
71 
virtual void Update()
Updates the state of the entity associated to this actuator.
void Enable()
Enables the entity.
Definition: entity.h:265
Basic class for an entity that contains other entities.
virtual void Reset()
Resets the actuator to the state it had just after Init().
REGISTER_ACTUATOR(CGripperDefaultActuator,"gripper","default","Carlo Pinciroli [ilpincy@gmail.com]","1.0","The Gripper actuator.","This actuator controls a gripper. For a complete description of its\n""usage, refer to the ci_gripper_actuator.h file.\n\n""REQUIRED XML CONFIGURATION\n\n"" <controllers>\n"" ...\n"" <my_controller ...>\n"" ...\n"" <actuators>\n"" ...\n"" <gripper implementation=\"default\" />\n"" ...\n"" </actuators>\n"" ...\n"" </my_controller>\n"" ...\n"" </controllers>\n\n""OPTIONAL XML CONFIGURATION\n\n""None.\n","Usable")
void SetLockState(Real f_lock_state)
Sets the lock state of the gripper.
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this actuator.
An entity that stores the state of a robot gripper.
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.