15 m_pcJointEquippedEntity(nullptr) {
30 for(itJoint = itJoint.begin(&t_tree);
31 itJoint != itJoint.end();
34 std::string strJointId;
48 if(strMode ==
"disabled") {
51 else if(strMode ==
"position") {
54 else if(strMode ==
"velocity") {
59 "\" for joint \"" << strJointId <<
60 "\" " <<
" is not implemented");
65 m_vecSimulatedActuators.emplace_back(strJointId, 0.0, sInstance);
82 s_actuator.Instance.Target = s_actuator.Target;
91 s_actuator.Target = 0.0;
100 "Michael Allwright [allsey87@gmail.com]",
102 "The prototype joints actuator: controls a prototype entity's joints.",
103 "This actuator is used to control the joints inside a prototype entity. To\n"
104 "control a joint, add a joint child node to the joints node. Each child node has\n"
105 "three attributes, all of which are required.\n\n"
106 "REQUIRED XML CONFIGURATION\n\n"
109 " <my_controller ...>\n"
113 " <joints implementation=\"default\">\n"
114 " <joint id=\"joint0\" mode=\"velocity\" max_impulse=\"0.002f\"/>\n"
115 " <joint id=\"joint1\" mode=\"position\" max_impulse=\"0.005f\"/>\n"
121 " </my_controller>\n"
123 " </controllers>\n\n"
124 "The 'id' attribute specifies which joint in the prototype joint equipped entity\n"
125 "we are interested in controlling. The 'mode' attribute has three options:\n"
126 "disabled, position, and velocity. The disabled mode is self-explanatory. The\n"
127 "position and velocity modes enable closed loop position control and closed loop\n"
128 "velocity control. The 'max_impulse' attribute defines the maximum impulse of\n"
129 "the actuator in kg m/s for prismatic joints and kg m^2/s for revolute joints.\n\n"
130 "OPTIONAL XML CONFIGURATION\n\n"
#define THROW_ARGOSEXCEPTION(message)
This macro throws an ARGoS exception with the passed message.
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
ticpp::Iterator< ticpp::Element > TConfigurationNodeIterator
The iterator for the ARGoS configuration XML node.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
REGISTER_ACTUATOR(CFootBotDistanceScannerDefaultActuator, "footbot_distance_scanner", "default", "Carlo Pinciroli [ilpincy@gmail.com]", "1.0", "The foot-bot distance scanner actuator.", "This actuator controls the foot-bot distance scanner. For a complete\n" "description of its usage, refer to the ci_footbot_distance_scanner_actuator\n" "file.\n\n" "REQUIRED XML CONFIGURATION\n\n" " <controllers>\n" " ...\n" " <my_controller ...>\n" " ...\n" " <actuators>\n" " ...\n" " <footbot_distance_scanner implementation=\"default\" />\n" " ...\n" " </actuators>\n" " ...\n" " </my_controller>\n" " ...\n" " </controllers>\n\n" "OPTIONAL XML CONFIGURATION\n\n" "None for the time being.\n", "Usable")
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
Basic class for an entity that contains other entities.
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.
SActuator::TVector m_vecActuators
SActuator & GetActuator()
CPrototypeJointEntity & GetJoint(UInt32 un_index)
virtual void Init(TConfigurationNode &t_tree)
Initializes the actuator from the XML configuration tree.
CPrototypeJointsDefaultActuator()
virtual void Update()
Updates the state of the entity associated to this actuator.
virtual void Reset()
Resets the actuator to the state it had just after Init().
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this actuator.