#include <sr_friction_compensation.hpp>
sr_friction_compensation::SrFrictionCompensator::SrFrictionCompensator |
( |
const std::string & |
joint_name | ) |
|
|
explicit |
sr_friction_compensation::SrFrictionCompensator::~SrFrictionCompensator |
( |
| ) |
|
double sr_friction_compensation::SrFrictionCompensator::friction_compensation |
( |
double |
position, |
|
|
double |
velocity, |
|
|
int |
force_demand, |
|
|
int |
deadband |
|
) |
| |
Computes the value of the offset to add to the force demand to compensate for the friction. This offset is computed based on the current joint position and on the force demand sign as well, using a friction map.
The friction map is generated by moving the joint very slowly, from one end to the other, while recording the force necessary to move it. Two different map position->force are then created by interpolating those values, one for each direction.
- Parameters
-
position | the current joint position. |
velocity | the current joint velocity. |
force_demand | the force demand is used to know in which direction we want to move: if > 0 -> forward if < 0 -> backward |
deadband | the deadband on the force_demand (in the deadband region, we're returning an offset of 0.0 for stability reasons). |
- Returns
- the force necessary to have the joint ready to move.
Definition at line 56 of file sr_friction_compensation.cpp.
Generates a flat map for the joints missing one of their friction map.
- Returns
- A flat map (always 0.0)
Definition at line 206 of file sr_friction_compensation.cpp.
Read the 2 friction maps from the parameter servers for each joint. Generate a flat map (no offset) if the map doesn't exist.
- Returns
- a pair of map: the first is the forward map, the second is the backward map.
Definition at line 103 of file sr_friction_compensation.cpp.
Format one map from the given raw map directly taken from the parameter server.
- Parameters
-
raw_map | the raw_map directly read from the parameters. |
- Returns
- The map (either forward or backward)
Definition at line 183 of file sr_friction_compensation.cpp.
An interpolator for the backward friction map: used to compute the offset from the map, given the current pos.
Definition at line 115 of file sr_friction_compensation.hpp.
An interpolator for the forward friction map: used to compute the offset from the map, given the current pos.
Definition at line 113 of file sr_friction_compensation.hpp.
std::string sr_friction_compensation::SrFrictionCompensator::joint_name_ |
|
private |
const double sr_friction_compensation::SrFrictionCompensator::velocity_for_static_friction = 0.01 |
|
staticprivate |
The documentation for this class was generated from the following files: