Class CELoopKinematicsBase#

Inheritance Relationships#

Base Type#

Derived Types#

Class Documentation#

class CELoopKinematicsBase : public Karana::Core::BaseWithVars#

Base class for CE loop kinematics solvers.

Subclassed by Karana::Dynamics::CELoopKinematicsNumeric, Karana::Dynamics::CELoopKinematicsPlanar4Bar

Public Functions

CELoopKinematicsBase(std::string_view name, kc::ks_ptr<SubGraph> bodies_sg)#

Constructor.

Parameters:
inline virtual ~CELoopKinematicsBase()#

Destructor

virtual void updateDependentQ(const km::Vec &min_q, bool global) const = 0#

Convert the input minimal independent coords Q into the full dependent Q for all the aggregated subhinges for the compound body as appropriate and set the values.

Note that the constraints are at the velocity level and not the Q level, and in some cases Q is subject to a different (and perhaps no) constraints, The global flag controls whether the incoming Q values are global are local chart coordinates.

Parameters:
  • min_q – The minimal coordinates.

  • global – Flag to indicate whether incoming coords are local or global.

virtual void computeConstraintX(km::Mat &X) const = 0#

Fill the X matrix that maps the min independent U to the full U (independent, dependent, constraint dofs) for the compound body.

Parameters:

X – The matrix to fill with the X matrix.

virtual void computeXdotU(km::Vec &XdotU) const = 0#

Return Xdot*U product of the time derivative of X constraint matrix with the U generalized velocities.

Parameters:

XdotU – the vector to fill with the compute value

virtual const km::VecInt &getIndependentIndicesU() const#

Return the indices of the independent U coordinates.

Returns:

the independent U coordinate indices

virtual const km::VecInt &getIndependentIndicesQ() const#

Return the indices of the independent Q coordinates.

Returns:

the independent Q coordinate indices

virtual std::string dumpString(std::string_view prefix = "", const Karana::Core::Base::DumpOptions *options = nullptr) const override#

Return information about the object.

Parameters:
  • prefix – A string to use as prefix for each output line

  • options – Struct with options to tailor the output

Returns:

String with the information about the object.

virtual const CELoopKinematicsBaseVars &getVars() const override#

Get vars as the most derived type.

Returns:

The vars member as its most derived type.

Protected Attributes

km::VecInt _indep_indices_U#

indices of all independent U coords among the embedded coordinates

km::VecInt _indep_indices_Q#

indices of all independent Q coords among the embedded coordinates

km::VecInt _inert_indices_U#

indices of all inert coords among the _bodies_tree coordinates (i.e. indices that have no effect on the constraint errors such as for planar systems)

km::VecInt _dep_indices_U#

indices of all dependent coords among the _bodies_sg coordinates

kc::ks_ptr<SubGraph> _bodies_sg#

the aggregation subgraph for the compound body

std::vector<std::pair<kc::ks_ptr<PhysicalSubhinge>, size_t>> _indep_cbs_U#

List contains the physical subhinge+offset value for each of the independent U indices

std::vector<std::pair<kc::ks_ptr<PhysicalSubhinge>, size_t>> _indep_cbs_Q#

List contains the physical subhinge+offset value for each of the independent Q indices