Class LoopConstraintConVel#

Inheritance Relationships#

Base Type#

Class Documentation#

class LoopConstraintConVel : public Karana::Dynamics::LoopConstraintBase#

Public Functions

LoopConstraintConVel(kc::ks_ptr<Multibody> &mb, kc::ks_ptr<kf::Frame2Frame> constrainet_f2f, const std::string &name)#

Constructor.

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

Returns the type string of LockingBase.

Returns:

The type string.

inline virtual bool constrainsQ() const override#

convel constraints only impact velocities

virtual size_t nResiduals() const override#

Override the standard defintion to return zero error since convel constraints do not apply at the position level, only velocity and accel levels

virtual km::Vec poseError() const override#

Return the 6 size pose residual term for the constraint.

Used for computing the pose configuration kinematics

Returns:

The pose residual eror

void setInput(double vel, double accel)#

Set the velocity and acceleration inputs for the convel constraint.

The input is used to set the difference between the source and target component velocity and acceleration component values.

Parameters:
  • vel – The input velocity

  • accel – The input accel

void setUnitAxis(const km::Vec &axis, bool is_rotational)#

Set the unit axis long which the convel constraint applies.

Parameters:
  • axis – The unit axis vector in the source node frame

  • is_rotational – If true, the constraint is assumed to on relative angular velocity, else translational

const km::Vec3 &getUnitAxis() const#

Get the unit axis to which the convel constraint applies.

Returns:

The unit axis vector in the source node frame

bool isRotational() const#

Get whether the constraint is on relative angular velocity.

Returns:

If the constraint is angular, else linear

virtual bool isFinalized() const override#

Checks is the params for the object have been initialized.

Returns:

True if the params have set up.

virtual km::Vec velError() const override#

Return the current constraint spatial velocity error.

Returns:

the spatial velocity error as a 6-vector

virtual km::Vec accelError() const override#

Return the current constraint spatial acceleration error.

Returns:

the spatial acceleration error as a 6-vector

Public Static Functions

static const kc::ks_ptr<LoopConstraintConVel> create(kc::ks_ptr<Multibody> &mb, kc::ks_ptr<kf::Frame2Frame> constraint_f2f, const std::string &name)#

Factory method for creating a LoopConstraintConVel instance.

Parameters:
Returns:

a LoopConstraintHinge instance

Protected Functions

virtual void _computeQMats(QMats &val) override#
virtual km::Vec _accelResidual() const override#

Return the (6-nU) size accel residual term for the constraint.

Used for computing the lambda (Lagrnage multiplier) terms for the TA dynamics correction step

Returns:

The acceleraton residual eror