19 std::set<std::string> joint_set;
20 std::map<std::string, double> start_position_map;
26 pnh.
getParam(
"start_position", start_position_map);
28 for (
auto it=start_position_map.begin(); it!=start_position_map.end(); it++)
45 if (urdf_model.
initParam(
"robot_description"))
47 for (
auto it=urdf_model.joints_.begin(); it!=urdf_model.joints_.end(); it++)
49 urdf::Joint joint = *it->second;
51 if (joint.type == urdf::Joint::FIXED || joint.type == urdf::Joint::UNKNOWN)
55 joint_set.insert(joint.name);
60 ROS_WARN(
"We cannot find the parameter robot_description.");
74 std::copy(joint_set.begin(), joint_set.end(), std::back_inserter(
joint_names_));
77 ROS_ERROR(
"No joints is specified. Please use include_joints parameters.");
87 for (
auto it=start_position_map.begin(); it!=start_position_map.end(); it++)
void registerInterface(T *iface)
std::vector< std::string > joint_names_
std::vector< double > act_eff
std::vector< double > act_dis
std::vector< double > cmd_dis
std::vector< double > act_vel
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
hardware_interface::PositionJointInterface position_joint_interface
hardware_interface::JointStateInterface joint_state_interface
URDF_EXPORT bool initParam(const std::string ¶m)
#define ROS_DEBUG_STREAM(args)
void registerHandle(const JointStateHandle &handle)
JointStateHandle getHandle(const std::string &name)
void update(void)
Update function to call all of the update function of motors.
std::vector< std::string > exclude_joints_
bool getParam(const std::string &key, std::string &s) const
ROSCPP_DECL void shutdown()
std::vector< std::string > include_joints_