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 BILATERAL_CONSTRAINT_TYPE#

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, const std::string &name)#

Constructor.

inline virtual const std::string &typeString() const noexcept override#

Returns the type string of LockingBase.

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 residual 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 spatial acceleration error as a 6-vector

inline BILATERAL_CONSTRAINT_TYPE type() const#

Return the bilateral constraint type.

Returns:

the bilateral constraint type

Public Static Functions

static const kc::ks_ptr<BilateralConstraintBase> create(kc::ks_ptr<Multibody> &mb, kc::ks_ptr<PhysicalSubhinge> oshg, kc::ks_ptr<PhysicalSubhinge> pshg, const std::string &name)#

Factory method for creating a BilateralConstraintBase instance.

Parameters:
Returns:

a BilateralConstraintBase instance

Protected Attributes

BILATERAL_CONSTRAINT_TYPE _type#

bilateral constraint type

std::weak_ptr<Multibody> _mb#

Weak pointer to the multibody. Used for cleanup only.