Tesseract
Motion Planning Environment
|
Parameters for Joint Safety Controllers. More...
#include <joint.h>
Public Types | |
using | Ptr = std::shared_ptr< JointSafety > |
using | ConstPtr = std::shared_ptr< const JointSafety > |
Public Member Functions | |
JointSafety ()=default | |
JointSafety (double soft_upper_limit, double soft_lower_limit, double k_position, double k_velocity) | |
void | clear () |
bool | operator== (const JointSafety &rhs) const |
bool | operator!= (const JointSafety &rhs) const |
Public Attributes | |
double | soft_upper_limit { 0 } |
double | soft_lower_limit { 0 } |
double | k_position { 0 } |
double | k_velocity { 0 } |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Friends | |
class | boost::serialization::access |
std::ostream & | operator<< (std::ostream &os, const JointSafety &safety) |
Parameters for Joint Safety Controllers.
using tesseract_scene_graph::JointSafety::ConstPtr = std::shared_ptr<const JointSafety> |
using tesseract_scene_graph::JointSafety::Ptr = std::shared_ptr<JointSafety> |
|
default |
|
inline |
|
inline |
bool tesseract_scene_graph::JointSafety::operator!= | ( | const JointSafety & | rhs | ) | const |
bool tesseract_scene_graph::JointSafety::operator== | ( | const JointSafety & | rhs | ) | const |
|
private |
|
friend |
|
friend |
double tesseract_scene_graph::JointSafety::k_position { 0 } |
double tesseract_scene_graph::JointSafety::k_velocity { 0 } |
double tesseract_scene_graph::JointSafety::soft_lower_limit { 0 } |
double tesseract_scene_graph::JointSafety::soft_upper_limit { 0 } |
IMPORTANT: The safety controller support is very much PR2 specific, not intended for generic usage.
Basic safety controller operation is as follows
current safety controllers will take effect on joints outside the position range below:
position range: [JointSafety::soft_lower_limit + JointLimits::velocity / JointSafety::k_position, JointSafety::soft_uppper_limit - JointLimits::velocity / JointSafety::k_position]
if (joint_position is outside of the position range above) velocity_limit_min = -JointLimits::velocity + JointSafety::k_position * (joint_position - JointSafety::soft_lower_limit) velocity_limit_max = JointLimits::velocity + JointSafety::k_position * (joint_position - JointSafety::soft_upper_limit) else velocity_limit_min = -JointLimits::velocity velocity_limit_max = JointLimits::velocity
velocity range: [velocity_limit_min + JointLimits::effort / JointSafety::k_velocity, velocity_limit_max - JointLimits::effort / JointSafety::k_velocity]
if (joint_velocity is outside of the velocity range above) effort_limit_min = -JointLimits::effort + JointSafety::k_velocity * (joint_velocity - velocity_limit_min) effort_limit_max = JointLimits::effort + JointSafety::k_velocity * (joint_velocity - velocity_limit_max) else effort_limit_min = -JointLimits::effort effort_limit_max = JointLimits::effort
Final effort command sent to the joint is saturated by [effort_limit_min,effort_limit_max]
Please see wiki for more details: http://www.ros.org/wiki/pr2_controller_manager/safety_limits