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 
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 
gripper_default_actuator.h
argos
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
argos::CComposableEntity
Basic class for an entity that contains other entities.
Definition: composable_entity.h:32
argos::CComposableEntity::GetComponent
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.
Definition: composable_entity.cpp:109
argos::CEntity::Enable
void Enable()
Enables the entity.
Definition: entity.h:239
argos::CGripperDefaultActuator::SetRobot
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this actuator.
Definition: gripper_default_actuator.cpp:22
REGISTER_ACTUATOR
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")
argos::CGripperEquippedEntity
An entity that stores the state of a robot gripper.
Definition: gripper_equipped_entity.h:37
argos::CGripperDefaultActuator::Update
virtual void Update()
Updates the state of the entity associated to this actuator.
Definition: gripper_default_actuator.cpp:30
argos::CGripperDefaultActuator::CGripperDefaultActuator
CGripperDefaultActuator()
Definition: gripper_default_actuator.cpp:16
argos::CCI_GripperActuator::m_fLockState
Real m_fLockState
Definition: ci_gripper_actuator.h:60
argos::CGripperEquippedEntity::SetLockState
void SetLockState(Real f_lock_state)
Sets the lock state of the gripper.
Definition: gripper_equipped_entity.cpp:80
argos::CGripperDefaultActuator::Reset
virtual void Reset()
Resets the actuator to the state it had just after Init().
Definition: gripper_default_actuator.cpp:37