37 const std::string& actuator_name,
38 const std::string& transmission_name,
43 const TiXmlElement* reduction_el = parent_el.FirstChildElement(
"mechanicalReduction");
48 ROS_ERROR_STREAM_NAMED(
"parser",
"Actuator '" << actuator_name <<
"' of transmission '" << transmission_name <<
49 "' does not specify the required <mechanicalReduction> element.");
54 ROS_DEBUG_STREAM_NAMED(
"parser",
"Actuator '" << actuator_name <<
"' of transmission '" << transmission_name <<
55 "' does not specify the optional <mechanicalReduction> element.");
61 try {reduction = std::stod(reduction_el->GetText());}
62 catch (
const std::logic_error&)
64 ROS_ERROR_STREAM_NAMED(
"parser",
"Actuator '" << actuator_name <<
"' of transmission '" << transmission_name <<
65 "' specifies the <mechanicalReduction> element, but is not a number.");
73 const std::string& joint_name,
74 const std::string& transmission_name,
79 const TiXmlElement* reduction_el = parent_el.FirstChildElement(
"mechanicalReduction");
85 "' does not specify the required <mechanicalReduction> element.");
91 "' does not specify the optional <mechanicalReduction> element.");
97 try {reduction = std::stod(reduction_el->GetText());}
98 catch (
const std::logic_error&)
101 "' specifies the <mechanicalReduction> element, but is not a number.");
109 const std::string& joint_name,
110 const std::string& transmission_name,
115 const TiXmlElement* offset_el = parent_el.FirstChildElement(
"offset");
121 "' does not specify the required <offset> element.");
127 "' does not specify the optional <offset> element.");
133 try {offset = std::stod(offset_el->GetText());}
134 catch (
const std::logic_error&)
137 "' specifies the <offset> element, but is not a number.");
145 const std::string& actuator_name,
146 const std::string& transmission_name,
151 const TiXmlElement* role_el = parent_el.FirstChildElement(
"role");
156 ROS_ERROR_STREAM_NAMED(
"parser",
"Actuator '" << actuator_name <<
"' of transmission '" << transmission_name <<
157 "' does not specify the required <role> element.");
162 ROS_DEBUG_STREAM_NAMED(
"parser",
"Actuator '" << actuator_name <<
"' of transmission '" << transmission_name <<
163 "' does not specify the optional <offset> element.");
169 if (!role_el->GetText())
173 ROS_ERROR_STREAM_NAMED(
"parser",
"Actuator '" << actuator_name <<
"' of transmission '" << transmission_name <<
174 "' specifies an empty <role> element.");
179 ROS_DEBUG_STREAM_NAMED(
"parser",
"Actuator '" << actuator_name <<
"' of transmission '" << transmission_name <<
180 "' specifies an empty <role> element.");
184 role = role_el->GetText();
191 const std::string& joint_name,
192 const std::string& transmission_name,
197 const TiXmlElement* role_el = parent_el.FirstChildElement(
"role");
203 "' does not specify the required <role> element.");
209 "' does not specify the optional <offset> element.");
215 if (!role_el->GetText())
220 "' specifies an empty <role> element.");
226 "' specifies an empty <role> element.");
230 role = role_el->GetText();