Class CELoopKinematicsNumeric#
Defined in File CELoopKinematics.h
Inheritance Relationships#
Base Type#
public Karana::Dynamics::CELoopKinematicsBase(Class CELoopKinematicsBase)
Class Documentation#
-
class CELoopKinematicsNumeric : public Karana::Dynamics::CELoopKinematicsBase#
The numerical iterations based CE kinematics loop solver.
Public Functions
-
CELoopKinematicsNumeric(std::string_view name, kc::ks_ptr<SubGraph> bodies_sg, const km::VecInt &indep_indices_U, const km::VecInt &indep_indices_Q)#
CELoopKinematicsNumeric constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.
- Parameters:
name – Instance name.
bodies_sg – SubGraph with the embedded bodies.
indep_indices_U – The list of independent U coordinate indices.
indep_indices_Q – The list of independent Q coordinate indices.
-
virtual void updateDependentQ(const km::Vec &min_q, bool global) const override#
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 override#
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 override#
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
-
void setIndependentIndices(const km::VecInt &indep_indices_U, const km::VecInt &indep_indices_Q = {})#
Set the independent Q and U coordinate indices.
If the Q indices are unspecified, they are assumed to be the same as the U indices.
- Parameters:
indep_indices_U – the independent U coordinate indices
indep_indices_Q – 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 CELoopKinematicsNumericVars &getVars() const override#
Get vars as the most derived type.
- Returns:
The vars member as its most derived type.
Public Static Functions
-
static Karana::Core::ks_ptr<CELoopKinematicsNumeric> create(std::string_view name, kc::ks_ptr<SubGraph> bodies_sg, const km::VecInt &indep_indices_U, const km::VecInt &indep_indices_Q)#
Constructs a CELoopKinematicsNumeric instance.
- Parameters:
name – Instance name.
bodies_sg – SubGraph with bodies being embedded.
indep_indices_U – The list of independent U coordinate indices.
indep_indices_Q – The list of independent Q coordinate indices.
- Returns:
A CELoopKinematicsNumeric instance.
Protected Functions
-
void _updateConstraintRowIndices(const km::VecInt &inert_columns)#
Compute the constraint error row indices to use in X computation.
The inert columns is used to exclude columns that do not contribute to the constraint error (eg. out of plane coords for a planar system)
- Parameters:
inert_columns – the columns to treat as inert
-
void _computeInertIndices()#
Compute the coordinate indices that are inert, i.e. ones that do hot contribute to the constraint errors (eg. out of plane coords in a planar system).
Protected Attributes
-
kc::ks_ptr<ConstraintKinematicsSolver> _cks = nullptr#
the CK solver used to solve for the dependent coordinates
-
km::VecInt _rows_Y#
indices for non-redundant rows for the aggregation graphs constraint velocity error Jacobian
-
CELoopKinematicsNumeric(std::string_view name, kc::ks_ptr<SubGraph> bodies_sg, const km::VecInt &indep_indices_U, const km::VecInt &indep_indices_Q)#