Limits
Definition
All kinematic limits derive from the Limit
base class.
- class pink.limits.limit.Limit
Abstract base class for kinematic limits.
- abstract compute_qp_inequalities(q, dt)
Compute limit as linearized QP inequalities.
Those limits are returned as:
\[G(q) \Delta q \leq h(q)\]where \(q \in {\cal C}\) is the robot’s configuration and \(\Delta q \in T_q({\cal C})\) is the displacement in the tangent space at \(q\).
Configuration limit
Subset of bounded joints associated with a robot model.
- class pink.limits.configuration_limit.ConfigurationLimit(model, config_limit_gain=0.5)
Subspace of the tangent space restricted to joints with position limits.
- config_limit_gain
gain between 0 and 1 to steer away from configuration limits. It is described in “Real-time prioritized kinematic control under inequality constraints for redundant manipulators” (Kanoun, 2012). More details in this writeup.
- model
Robot model the limit applies to.
- joints
Joints with configuration limits.
- projection_matrix
Projection from tangent space to subspace with configuration-limited joints.
- compute_qp_inequalities(q, dt)
Compute the configuration-dependent velocity limits.
Those limits are returned as:
\[{q \ominus q_{min}} \leq \Delta q \leq {q_{max} \ominus q}\]where \(q \in {\cal C}\) is the robot’s configuration and \(\Delta q \in T_q({\cal C})\) is the displacement in the tangent space at \(q\). These limits correspond to the derivative of \(q_{min} \leq q \leq q_{max}\).
Velocity limit
Subset of velocity-limited joints in a robot model.
- class pink.limits.velocity_limit.VelocityLimit(model)
Subset of velocity-limited joints in a robot model.
- indices
Tangent indices corresponding to velocity-limited joints.
- joints
List of velocity-limited joints.
- model
Robot model.
- projection_matrix
Projection from tangent space to subspace with velocity-limited joints.
- compute_qp_inequalities(q, dt)
Compute inequalities for velocity limits.
Those limits are defined by:
\[-\mathrm{d}t v_{max} \leq \Delta q \leq \mathrm{d}t v_{max}\]where \(v_{max} \in {\cal T}\) is the robot’s velocity limit vector and \(\Delta q \in T_q({\cal C})\) is the displacement computed by the inverse kinematics.
Acceleration limit
Subset of acceleration-limited joints in a robot model.
- class pink.limits.acceleration_limit.AccelerationLimit(model, acceleration_limit)
Subset of acceleration-limited joints in a robot model.
Acceleration limits consists of two parts: the expected \(|a| \leq a_{\mathrm{max}}\), but also the following term accounting for the “breaking distance” to configuration limits:
\[-\sqrt{2 a_max (q \ominus q_{\min})} \leq a \leq \sqrt{2 a_max (q_{\max} \ominus q)}\]This additional inequality is detailed in [Flacco2015] as well as in [DelPrete2018].
- Delta_q_prev
Latest displacement of the robot.
- a_max
Maximum acceleration vector for acceleration-limited joints.
- indices
Tangent indices corresponding to acceleration-limited joints.
- model
Robot model.
- projection_matrix
Projection from tangent space to subspace with acceleration-limited joints.
- compute_qp_inequalities(q, dt)
Compute inequalities for acceleration limits.
Those limits are defined by:
\[\Delta q_{\mathrm{prev}} - a_max \mathrm{d} t^2 \leq \Delta q \leq \Delta q_{\mathrm{prev}} + a_max \mathrm{d} t^2\]where \(a_{max} \in {\cal T}\) is the robot’s acceleration limit vector (in the tangent space) and \(\Delta q \in T_q({\cal C})\) is the displacement computed by the inverse kinematics, with \(\Delta q_{\mathrm{prev}}\) the displacement from the previous iteration.
- set_last_integration(v_prev, dt)
Set the latest velocity and the duration it was applied for.
The goal of the low-acceleration task is to minimize the difference between the new velocity and the previous one.
- Parameters:
v_prev (
ndarray
) – Latest integrated velocity.dt – Integration timestep in [s].
- Return type:
None