54 std::vector<std::string> controller_names, joint_names;
60 model.
initParam( ns +
"/robot_description" );
68 param[ano] <<
"khi_robot_param/arm/arm" << ano + 1;
69 if ( nh_joints.
getParam( param[ano].str(), controller_names ) )
72 for (
int cno = 0; cno < controller_names.size(); cno++ )
74 if ( nh_joints.
getParam( controller_names[cno] +
"/joints", joint_names ) )
76 for (
int n = 0; n < joint_names.size(); n++ )
79 auto jt_ptr = model.getJoint( joint_names[n] );
96 ROS_ERROR(
"Failed to get param '/joints'" );
void registerInterface(T *iface)
khi_robot_control::KhiRobotClient * client
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val)
joint_limits_interface::PositionJointSaturationInterface joint_limit_interface
bool hold(const KhiRobotData &data)
void write(const ros::Time &time, const ros::Duration &period) override
bool getPeriodDiff(double &diff)
bool getPeriodDiff(double &diff)
bool activate(KhiRobotData &data)
void deactivate(const KhiRobotData &data)
#define ROS_INFO_STREAM_NAMED(name, args)
int updateState(const KhiRobotData &data)
hardware_interface::PositionJointInterface joint_position_interface
hardware_interface::JointStateInterface joint_state_interface
void enforceLimits(const ros::Duration &period)
~KhiRobotHardwareInterface()
double pos[KHI_MAX_JOINT]
KhiRobotArmData arm[KHI_MAX_ARM]
KhiRobotHardwareInterface()
ROSCPP_DECL const std::string & getNamespace()
bool open(const std::string &ip, const double &period, KhiRobotData &data, const bool in_simulation=false)
URDF_EXPORT bool initParam(const std::string ¶m)
void registerHandle(const JointStateHandle &handle)
JointStateHandle getHandle(const std::string &name)
std::string name[KHI_MAX_JOINT]
double eff[KHI_MAX_JOINT]
void read(const ros::Time &time, const ros::Duration &period) override
void write(const KhiRobotData &data)
bool getParam(const std::string &key, std::string &s) const
khi_robot_control::KhiRobotData data
double vel[KHI_MAX_JOINT]
bool getJointLimits(urdf::JointConstSharedPtr urdf_joint, JointLimits &limits)
void read(KhiRobotData &data)
double cmd[KHI_MAX_JOINT]
bool open(const std::string &robot_name, const std::string &ip_address, const double &period, const bool in_simulation=false)