ARGoS  3
A parallel, multi-engine simulator for swarm robotics
footbot_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(Abs(m_cAperture) / CRadians::PI_OVER_TWO);
32  }
33 
34  /****************************************/
35  /****************************************/
36 
38  Unlock();
39  }
40 
41  /****************************************/
42  /****************************************/
43 
44 }
45 
46 REGISTER_ACTUATOR(CFootBotGripperDefaultActuator,
47  "footbot_gripper", "default",
48  "Carlo Pinciroli [ilpincy@gmail.com]",
49  "1.0",
50  "The footbot gripper actuator.",
51  "This actuator controls the foot-bot gripper. For a complete description of its\n"
52  "usage, refer to the ci_footbot_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  " <footbot_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 
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::CRadians::PI_OVER_TWO
static const CRadians PI_OVER_TWO
Set to PI / 2.
Definition: angles.h:59
argos::CComposableEntity::GetComponent
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.
Definition: composable_entity.cpp:109
argos::CCI_FootBotGripperActuator::m_cAperture
CRadians m_cAperture
Definition: ci_footbot_gripper_actuator.h:86
REGISTER_ACTUATOR
REGISTER_ACTUATOR(CFootBotGripperDefaultActuator, "footbot_gripper", "default", "Carlo Pinciroli [ilpincy@gmail.com]", "1.0", "The footbot gripper actuator.", "This actuator controls the foot-bot gripper. For a complete description of its\n" "usage, refer to the ci_footbot_gripper_actuator.h file.\n\n" "REQUIRED XML CONFIGURATION\n\n" " <controllers>\n" " ...\n" " <my_controller ...>\n" " ...\n" " <actuators>\n" " ...\n" " <footbot_gripper implementation=\"default\" />\n" " ...\n" " </actuators>\n" " ...\n" " </my_controller>\n" " ...\n" " </controllers>\n\n" "OPTIONAL XML CONFIGURATION\n\n" "None.\n", "Usable")
argos::CEntity::Enable
void Enable()
Enables the entity.
Definition: entity.h:239
argos::CGripperEquippedEntity
An entity that stores the state of a robot gripper.
Definition: gripper_equipped_entity.h:37
argos::Abs
T Abs(const T &t_v)
Returns the absolute value of the passed argument.
Definition: general.h:25
argos::CFootBotGripperDefaultActuator::SetRobot
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this actuator.
Definition: footbot_gripper_default_actuator.cpp:22
argos::CFootBotGripperDefaultActuator::Update
virtual void Update()
Updates the state of the entity associated to this actuator.
Definition: footbot_gripper_default_actuator.cpp:30
footbot_gripper_default_actuator.h
argos::CGripperEquippedEntity::SetLockState
void SetLockState(Real f_lock_state)
Sets the lock state of the gripper.
Definition: gripper_equipped_entity.cpp:80
argos::CFootBotGripperDefaultActuator::CFootBotGripperDefaultActuator
CFootBotGripperDefaultActuator()
Definition: footbot_gripper_default_actuator.cpp:16
argos::CCI_FootBotGripperActuator::Unlock
void Unlock()
Unlock gripper: objects are released.
Definition: ci_footbot_gripper_actuator.cpp:101
argos::CFootBotGripperDefaultActuator::Reset
virtual void Reset()
Resets the actuator to the state it had just after Init().
Definition: footbot_gripper_default_actuator.cpp:37