42 using ros_ethercat_model::Transmission;
43 using ros_ethercat_model::RobotState;
53 if (!ros_ethercat_model::Transmission::initXml(elt, robot))
59 tinyxml2::XMLElement *jel = elt->FirstChildElement(
"joint");
60 if (!jel || !jel->Attribute(
"name"))
66 tinyxml2::XMLElement *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;
84 joint_->position_ = act->state_.position_;
85 joint_->velocity_ = act->state_.velocity_;
86 joint_->effort_ = act->state_.last_measured_effort_;
92 act->command_.enable_ =
true;
93 act->command_.effort_ = joint_->commanded_effort_;
bool initXml(tinyxml2::XMLElement *config, ros_ethercat_model::RobotState *robot)
#define ROS_ERROR_STREAM(args)