24 #include "urdf_parser/urdf_parser.h" 25 #include "urdf_model/model.h" 26 #include "urdf_model/joint.h" 27 #include <boost/foreach.hpp> 28 #include <boost/algorithm/string/predicate.hpp> 35 using urdf::ModelInterface;
50 const std::set<std::string> hand_default_joints(default_hand_joints_vector.begin(),
51 default_hand_joints_vector.end());
52 std::string robot_description;
56 std::pair<std::string, boost::shared_ptr<Joint> > joint;
57 BOOST_FOREACH(joint, hand_urdf->joints_)
59 const std::string joint_name = joint.first;
60 if ((Joint::FIXED != joint.second->type) && (hand_default_joints.end() == hand_default_joints.find(joint_name)))
62 bool found_suffix =
false;
63 BOOST_FOREACH(std::string default_joint_name, hand_default_joints)
65 if (boost::ends_with(joint_name, default_joint_name))
74 std::pair<std::string, std::string> hand;
77 const std::string hand_serial = hand.first;
78 const std::string hand_id = hand.second;
83 joints_[hand_id].push_back(joint_name);
92 ROS_WARN_STREAM(
"No robot_description found on parameter server. Assuming that there is no arm.");
std::map< std::string, std::string > joint_prefix_
ArmConfig get_arm_parameters()
static const std::vector< std::string > get_default_joints()
ROSCPP_DECL bool get(const std::string &key, std::string &s)
ROSCPP_DECL bool has(const std::string &key)
#define ROS_WARN_STREAM(args)
std::map< std::string, std::string > mapping_
std::map< std::string, std::vector< std::string > > joints_
#define ROS_ERROR_STREAM(args)
std::map< std::string, std::vector< std::string > > get_joints()