42 using ros_ethercat_model::Transmission;
43 using ros_ethercat_model::RobotState;
51 bool SimpleTransmission::initXml(TiXmlElement *elt, RobotState *robot)
53 if (!ros_ethercat_model::Transmission::initXml(elt, robot))
59 TiXmlElement *jel = elt->FirstChildElement(
"joint");
60 if (!jel || !jel->Attribute(
"name"))
66 TiXmlElement *ael = elt->FirstChildElement(
"actuator");
67 if (!ael || !ael->Attribute(
"name"))
69 ROS_ERROR_STREAM(
"Transmission " << name_ <<
" has no actuator in configuration");
73 joint_ = robot->getJointState(jel->Attribute(
"name"));
75 actuator_->name_ = ael->Attribute(
"name");
76 actuator_->command_.enable_ =
true;
81 void SimpleTransmission::propagatePosition()
84 joint_->position_ = act->state_.position_;
85 joint_->velocity_ = act->state_.velocity_;
86 joint_->effort_ = act->state_.last_measured_effort_;
89 void SimpleTransmission::propagateEffort()
92 act->command_.enable_ =
true;
93 act->command_.effort_ = joint_->commanded_effort_;
#define ROS_ERROR_STREAM(args)