Class SubhingeForceLimits#

Inheritance Relationships#

Base Type#

  • public Karana::Models::KModel< SubhingeForceLimits, SubhingeForceLimitsParams > (Template Class KModel)

Class Documentation#

class SubhingeForceLimits : public Karana::Models::KModel<SubhingeForceLimits, SubhingeForceLimitsParams>#

Limits the generalized force that can be applied to a subhinge.

Public Functions

SubhingeForceLimits(std::string_view name, const kc::ks_ptr<kd::StatePropagator> &sp, const kc::ks_ptr<kd::PhysicalSubhinge> &sh)#

Constructor. The SubhingeForceLimits models actuator saturation limits for a subhinge. This clamps the generalized force of the subhinge using a lower bound and upper bound defined by lower_limits and upper_limits in the param.

Parameters:
  • name – The name of the model.

  • sp – The StatePropagator to register this model with.

  • sh – The subhinge to add the force limits to.

~SubhingeForceLimits()#

Destructor for SubhingeForceLimits.

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

Calculate and apply the spring/damper force.

Parameters:
  • t – Current time. Not used.

  • x – Current state. Not used.

virtual bool isFinalized() const final#

Ensure the model is finalized.

Returns:

true if the model is finalized, `false otherwise.

Public Static Functions

static kc::ks_ptr<SubhingeForceLimits> create(std::string_view name, const kc::ks_ptr<kd::StatePropagator> &sp, const kc::ks_ptr<kd::PhysicalSubhinge> &sh)#

Constructor. The SubhingeForceLimits models actuator saturation limits for a subhinge. This clamps the generalized force of the subhinge using a lower bound and upper bound defined by lower_limits and upper_limits in the param.

Parameters:
  • name – The name of the model.

  • sp – The StatePropagator to register this model with.

  • sh – The subhinge to add the force limits to.

Returns:

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