Class BilateralConstraintBase#

Inheritance Relationships#

Base Type#

Derived Types#

Class Documentation#

class BilateralConstraintBase : public Karana::Core::LockingBase#

Base class for bilateral constraints.

See the Coordinate constraints section for more discussion on bilateral constraints.

Subclassed by Karana::Dynamics::CoordinateConstraint, Karana::Dynamics::LoopConstraintBase

Public Types

enum class BilateralConstraintType#

The available subhinge types.

Values:

enumerator HINGE_LOOP#

hinge loop constraint

enumerator CONVEL_LOOP#

convel loop constraint

enumerator COORDINATE#

coordinate constraint

Public Functions

inline BilateralConstraintBase(kc::ks_ptr<Multibody> &mb, std::string_view name)#

Constructor.

Parameters:
  • mb – The Multibody instance

  • name – the name for the bilateral constraint instance

inline virtual std::string_view typeString() const noexcept override#

Returns the type string of Base.

Returns:

The type string.

virtual size_t nResiduals() const = 0#

Return the size of residuals for the constraint.

Returns:

the residuals size for the constraint

virtual km::Vec poseError() const = 0#

Return the 6 size pose residual term for the constraint.

Used for computing the pose configuration kinematics

Returns:

The pose eror

virtual km::Vec velError() const = 0#

Return the current constraint spatial velocity error.

Returns:

the spatial velocity error as a 6-vector

virtual km::Vec accelError() const = 0#

Return the current constraint spatial acceleration error.

Returns:

the acceleration error

inline BilateralConstraintType type() const#

Return the bilateral constraint type.

Returns:

the bilateral constraint type

Protected Attributes

BilateralConstraintType _type = BilateralConstraintType::HINGE_LOOP#

bilateral constraint type

std::weak_ptr<Multibody> _mb#

Weak pointer to the multibody. Used for cleanup only.