30 #ifndef TRANSMISSION_INTERFACE_TRANSMISSION_LOADER_H 31 #define TRANSMISSION_INTERFACE_TRANSMISSION_LOADER_H 41 #include <boost/foreach.hpp> 42 #include <boost/shared_ptr.hpp> 82 const unsigned int dim = transmission_info.
actuators_.size();
83 if (expected_dim != dim)
86 "' of type '" << transmission_info.
type_ <<
87 "'. Expected " << expected_dim <<
" actuators, got " << dim <<
".");
95 const unsigned int dim = transmission_info.
joints_.size();
96 if (expected_dim != dim)
99 "' of type '" << transmission_info.
type_ <<
100 "'. Expected " << expected_dim <<
" joints, got " << dim <<
".");
108 TiXmlElement element(
"");
109 std::stringstream element_stream;
110 element_stream << element_str;
111 element_stream >> element;
116 const std::string& actuator_name,
117 const std::string& transmission_name,
122 const std::string& joint_name,
123 const std::string& transmission_name,
128 const std::string& joint_name,
129 const std::string& transmission_name,
134 const std::string& actuator_name,
135 const std::string& transmission_name,
140 const std::string& joint_name,
141 const std::string& transmission_name,
150 #endif // header guard boost::shared_ptr< TransmissionLoader > TransmissionLoaderSharedPtr
static TiXmlElement loadXmlElement(const std::string &element_str)
#define ROS_ERROR_STREAM_NAMED(name, args)
Abstract interface for loading transmission instances from configuration data.
virtual ~TransmissionLoader()
Contains semantic info about a given transmission loaded from XML (URDF)
static ParseStatus getActuatorReduction(const TiXmlElement &parent_el, const std::string &actuator_name, const std::string &transmission_name, bool required, double &reduction)
Structs to hold tranmission data loaded straight from XML (URDF).
static ParseStatus getActuatorRole(const TiXmlElement &parent_el, const std::string &actuator_name, const std::string &transmission_name, bool required, std::string &role)
static bool checkActuatorDimension(const TransmissionInfo &transmission_info, const unsigned int expected_dim)
static ParseStatus getJointRole(const TiXmlElement &parent_el, const std::string &joint_name, const std::string &transmission_name, bool required, std::string &role)
virtual TransmissionSharedPtr load(const TransmissionInfo &transmission_info)=0
static ParseStatus getJointReduction(const TiXmlElement &parent_el, const std::string &joint_name, const std::string &transmission_name, bool required, double &reduction)
std::vector< ActuatorInfo > actuators_
static ParseStatus getJointOffset(const TiXmlElement &parent_el, const std::string &joint_name, const std::string &transmission_name, bool required, double &offset)
std::vector< JointInfo > joints_
static bool checkJointDimension(const TransmissionInfo &transmission_info, const unsigned int expected_dim)