45 joint_name_(joint_name)
47 pair<vector<joint_calibration::Point>, vector<joint_calibration::Point> > both_maps =
read_friction_map();
58 double compensation = 0.0;
60 if (force_demand > 0.0)
88 if (abs(force_demand) < deadband)
94 static_cast<double> (deadband), 1.0);
105 vector<joint_calibration::Point> friction_map_forward, friction_map_backward;
106 string param_name =
"/sr_friction_map";
108 bool joint_not_found_forward =
true;
109 bool joint_not_found_backward =
true;
121 for (int32_t index_cal = 0; index_cal < calib.
size(); ++index_cal)
129 string joint_name_tmp =
static_cast<string> (calib[index_cal][0]);
138 if (static_cast<int> (calib[index_cal][1]) == 1)
140 joint_not_found_forward =
false;
146 joint_not_found_backward =
false;
153 if (joint_not_found_forward)
160 if (joint_not_found_backward)
176 pair<vector<joint_calibration::Point>, vector<joint_calibration::Point> > both_maps;
177 both_maps.first = friction_map_forward;
178 both_maps.second = friction_map_backward;
185 vector<joint_calibration::Point> friction_map;
188 for (int32_t index_table = 0; index_table < raw_map.
size(); ++index_table)
200 friction_map.push_back(point_tmp);
208 vector<joint_calibration::Point> friction_map;
213 friction_map.push_back(point_tmp);
215 friction_map.push_back(point_tmp);
std::vector< joint_calibration::Point > generate_flat_map()
static const double velocity_for_static_friction
std::pair< std::vector< joint_calibration::Point >, std::vector< joint_calibration::Point > > read_friction_map()
double friction_compensation(double position, double velocity, int force_demand, int deadband)
Type const & getType() const
SrFrictionCompensator(const std::string &joint_name)
static double to_rad(double degrees)
Compensate the tendon friction by adding a given value depending on the sign of the force demand...
boost::scoped_ptr< shadow_robot::JointCalibration > friction_interpoler_backward
An interpolator for the backward friction map: used to compute the offset from the map...
static double linear_interpolate_(double x, double x0, double y0, double x1, double y1)
ros::NodeHandle node_
node handle for reading the map from the parameters server.
#define ROS_DEBUG_STREAM(args)
#define ROS_INFO_STREAM(args)
bool getParam(const std::string &key, std::string &s) const
std::vector< joint_calibration::Point > read_one_way_map(XmlRpc::XmlRpcValue &raw_map)
boost::scoped_ptr< shadow_robot::JointCalibration > friction_interpoler_forward
An interpolator for the forward friction map: used to compute the offset from the map...
bool hasParam(const std::string &key) const