Class BilateralConstraintBase#
Defined in File CoordinateConstraint.h
Inheritance Relationships#
Base Type#
public Karana::Core::LockingBase(Class LockingBase)
Derived Types#
public Karana::Dynamics::CoordinateConstraint(Class CoordinateConstraint)public Karana::Dynamics::LoopConstraintBase(Class LoopConstraintBase)
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
Public Functions
-
inline BilateralConstraintBase(std::string_view name, kc::ks_ptr<Multibody> &mb)#
Constructor.
- Parameters:
mb – The Multibody instance
name – the name for the bilateral constraint instance
-
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 error
-
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 Functions
-
virtual km::Vec _poseResidual() const = 0#
Return the nResiduals() size pose residual term for the constraint.
Used for computing the Baumgarte error control term for TA dynamics
- Returns:
The pose residual error
-
virtual km::Vec _velResidual() const = 0#
Return the nResiduals() size velocity residual term for the constraint.
Used for computing the Baumgarte error control term for TA dynamics
- Returns:
The velocity residual error
-
virtual km::Vec _accelResidual() const = 0#
Return the nResiduals() size accel residual term for the constraint.
Used for computing the acceleration kinematics and the lambda (Lagrange multiplier) terms for the TA dynamics correction step
- Returns:
The acceleration residual error
-
km::Vec _baumgarteResidual(double stiffness, double damping) const#
Return the nResiduals() size Baumgarte residual term for the constraint for use for computing the error stabilization term for TA dynamics method.
- Parameters:
stiffness – the stiffness coefficient
damping – the damping coefficient
- Returns:
the residual vector
Protected Attributes
-
BilateralConstraintType _type = BilateralConstraintType::CUTJOINT_LOOP#
bilateral constraint type
-
inline BilateralConstraintBase(std::string_view name, kc::ks_ptr<Multibody> &mb)#