Class for limiters, declaring the method to limit all joint positions. More...
#include <limiter.h>
Public Member Functions | |
virtual KDL::JntArray | enforceLimits (const KDL::JntArray &q_dot_ik, const KDL::JntArray &q) const |
LimiterAllJointPositions (const LimiterParams &limiter_params) |
Class for limiters, declaring the method to limit all joint positions.
LimiterAllJointPositions::LimiterAllJointPositions | ( | const LimiterParams & | limiter_params | ) | [inline, explicit] |
KDL::JntArray LimiterAllJointPositions::enforceLimits | ( | const KDL::JntArray & | q_dot_ik, |
const KDL::JntArray & | q | ||
) | const [virtual] |
Specific implementation of enforceLimits-method. See base class LimiterJointBase for more details on params and returns.
Checks the positions of the joints whether they are in limits_tolerance or not. If not the corresponding velocities vector is scaled. This function multiplies the velocities that result from the IK with a limits-dependent factor in case the joint positions violate the specified limits_tolerance. The factor is calculated by using the cosine function to provide a smooth transition from 1 to zero. Factor is applied on all joint velocities (although only one joint has exceeded its limits), so that the direction of the desired twist is not changed. -> Important for the Use-Case to follow a trajectory exactly!
Implements LimiterJointBase.
Definition at line 150 of file limiter.cpp.