giskardpy.qp.constraint#

Constraint description classes for the QP controller (GiskardConstraint and subclasses).

Attributes#

Classes#

GiskardConstraint

Defines a (slack-relaxed) constraint on expression for a quadratic program.

GiskardEqualityConstraint

A constraint that drives the expression to a single target value.

GiskardInequalityConstraint

A constraint that keeps the expression between a lower and upper bound.

Module Contents#

giskardpy.qp.constraint.LargeNumber = 10000.0#
class giskardpy.qp.constraint.GiskardConstraint#

Bases: abc.ABC

Defines a (slack-relaxed) constraint on expression for a quadratic program.

name: str#

Human readable name of the constraint, used for debugging.

expression: krrood.symbolic_math.symbolic_math.Scalar#

The expression that is being constrained.

quadratic_weight: krrood.symbolic_math.symbolic_math.ScalarData#

The quadratic weight of this constraint. Describes how expensive it is to violate.

linear_weight: krrood.symbolic_math.symbolic_math.ScalarData = 0#

The linear weight of this constraint. It is only here for completeness, no use case has been found for it yet.

normalization_factor: float#

This value is important to make constraints with different units comparable. The meaning depends on derivative. If the derivative is position, the normalization factor is rough velocity with which the expression can change. For example:

  • If you have a joint position constraint, the normalization factor should be the joint velocity limit.

  • If you have a cartesian position constraint, the normalization factor should be the cartesian velocity limit.

In practice, use joint limits from the URDF for joint space constraints and define two values for cartesian constraints:
  • a m/s limit for translation

  • a rad/s value for rotation

enforcement_strategy: type[giskardpy.qp.enforcement_strategy.EnforcementStrategy]#

The strategy used to enforce this constraint within the QP.

lower_slack_limit: krrood.symbolic_math.symbolic_math.ScalarData = -10000.0#

How far the constraint may be violated below its bound.

upper_slack_limit: krrood.symbolic_math.symbolic_math.ScalarData = 10000.0#

How far the constraint may be violated above its bound.

class giskardpy.qp.constraint.GiskardEqualityConstraint#

Bases: GiskardConstraint

A constraint that drives the expression to a single target value.

bound: krrood.symbolic_math.symbolic_math.Scalar#

The target value the expression should reach.

bound_cap: giskardpy.qp.bound_cap.BoundCap#

How the bound is limited to what may be demanded within the control horizon.

class giskardpy.qp.constraint.GiskardInequalityConstraint#

Bases: GiskardConstraint

A constraint that keeps the expression between a lower and upper bound.

lower_bound: krrood.symbolic_math.symbolic_math.Scalar#

The lowest allowed value of the expression.

upper_bound: krrood.symbolic_math.symbolic_math.Scalar#

The highest allowed value of the expression.