00001
00007 #include "gripper_default_actuator.h"
00008 #include <argos3/core/utility/logging/argos_log.h>
00009 #include <argos3/core/simulator/entity/composable_entity.h>
00010
00011 namespace argos {
00012
00013
00014
00015
00016 CGripperDefaultActuator::CGripperDefaultActuator() :
00017 m_pcGripperEquippedEntity(NULL) {}
00018
00019
00020
00021
00022 void CGripperDefaultActuator::SetRobot(CComposableEntity& c_entity) {
00023 m_pcGripperEquippedEntity = &(c_entity.GetComponent<CGripperEquippedEntity>("gripper"));
00024 m_pcGripperEquippedEntity->Enable();
00025 }
00026
00027
00028
00029
00030 void CGripperDefaultActuator::Update() {
00031 m_pcGripperEquippedEntity->SetLockState(m_fLockState);
00032 }
00033
00034
00035
00036
00037 void CGripperDefaultActuator::Reset() {
00038 m_fLockState = 0.0;
00039 }
00040
00041
00042
00043
00044 }
00045
00046 REGISTER_ACTUATOR(CGripperDefaultActuator,
00047 "gripper", "default",
00048 "Carlo Pinciroli [ilpincy@gmail.com]",
00049 "1.0",
00050 "The Gripper actuator.",
00051 "This actuator controls a gripper. For a complete description of its\n"
00052 "usage, refer to the ci_gripper_actuator.h file.\n\n"
00053 "REQUIRED XML CONFIGURATION\n\n"
00054 " <controllers>\n"
00055 " ...\n"
00056 " <my_controller ...>\n"
00057 " ...\n"
00058 " <actuators>\n"
00059 " ...\n"
00060 " <gripper implementation=\"default\" />\n"
00061 " ...\n"
00062 " </actuators>\n"
00063 " ...\n"
00064 " </my_controller>\n"
00065 " ...\n"
00066 " </controllers>\n\n"
00067 "OPTIONAL XML CONFIGURATION\n\n"
00068 "None.\n",
00069 "Usable"
00070 );
00071