Class PinJointLimits#

Inheritance Relationships#

Base Type#

Class Documentation#

class PinJointLimits : public Karana::Models::KModel<PinJointLimits, PinJointLimitsParams>#

Model that adds joint limits to a pin hinge.

Public Functions

PinJointLimits(std::string_view name, const kc::ks_ptr<kd::StatePropagator> &sp, const kc::ks_ptr<kd::PinSubhinge> &pin)#

PinJointLimits constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.

Parameters:
  • name – The name of the model.

  • sp – The StatePropagator to register this model with.

  • pin – The pin subhinge to apply joint limits to.

~PinJointLimits()#

Destructor for PinJointLimits.

void preDeriv(const km::Ktime &t, const km::Vec &x)#

Calculate and apply the restoring force to mimic joint limits.

Parameters:
  • t – - Current time. Not used.

  • x – - Current state. Not used.

Public Static Functions

static kc::ks_ptr<PinJointLimits> create(std::string_view name, const kc::ks_ptr<kd::StatePropagator> &sp, const kc::ks_ptr<kd::PinSubhinge> &pin)#

Constructor.

Parameters:
  • name – The name of the model.

  • sp – The StatePropagator to register this model with.

  • pin – The pin subhinge to apply joint limits to.

Returns:

A ks_ptr to the newly created instance of the PinJointLimits model.