Class HingeOnode#
Defined in File HingeNode.h
Inheritance Relationships#
Base Type#
public Karana::Dynamics::HingeNode(Class HingeNode)
Class Documentation#
-
class HingeOnode : public Karana::Dynamics::HingeNode#
Represents the hinge onode class.
See Connecting bodies via hinges section for more discussion of hinge, onodes and pnodes.
This class is for onodes for physiccal hinges
Public Functions
-
HingeOnode(std::string_view name, kc::ks_ptr<PhysicalBody> bd)#
HingeOnode constructor.
- Parameters:
bd – the parent body
-
virtual ~HingeOnode()#
HingeOnode destructor.
-
inline virtual std::string_view typeString() const noexcept override#
Returns the type string of the HingeNode.
- Returns:
The type string.
-
virtual std::string dumpString(std::string_view prefix, const Karana::Core::Base::DumpOptions *options) 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 bool isFinalized() const override#
Checks is the params for the object have been initialized.
- Returns:
True if the params have set up.
-
inline const kc::ks_ptr<kc::DataCache<HingeOnodeATBIMatrices>> &atbiMatrixCache() const#
Return the ATBI matrix cache.
- Returns:
the ATBI matrix cache
-
inline const HingeOnodeATBIMatrices &atbiMatrices() const#
Update and return the ATBI matrices.
- Returns:
the ATBI matrices
-
inline const kc::ks_ptr<kc::DataCache<HingeOnodeATBIFilterVectors>> &atbiFilterCache() const#
Return the ATBI filter cache.
- Returns:
the ATBI filter cache
-
inline const HingeOnodeATBIFilterVectors &atbiFilterVectors() const#
Update and return the ATBI filter vectors.
- Returns:
the ATBI filter vectors
-
inline const kc::ks_ptr<kc::DataCache<HingeOnodeATBISmootherVectors>> atbiSmootherCache() const#
Return the ATBI smoother cache.
- Returns:
the ATBI smoother cache
-
inline const HingeOnodeATBISmootherVectors &atbiSmootherVectors() const#
Update and return the ATBI smoother vectors.
- Returns:
the ATBI smoother vectors
-
inline const km::SpatialVector &interBodyForce() const#
Return the inter-body spatial force at the hinge.
While the spatial force is at the onode, and in the onode frame, its sign is that for the version applying on the outboard (the pnode) body. This values should be negated to get the equal and opposite spatial force on the onode’s body.
- Returns:
the inter-body spatial force
-
inline const kc::ks_ptr<kc::DataCache<HingeOnodeUpsilonMatrices>> &upsilonMatrixCache() const#
Return the OSCM Upsilon matrix cache.
- Returns:
the OSCM Upsilon matrix cache
-
inline const HingeOnodeUpsilonMatrices &upsilonMatrices() const#
Update and return the OSCM Upsilon matrices.
- Returns:
the OSCM Upsilon matrices
-
inline const kc::ks_ptr<kc::DataCache<HingeOnodeInvDynVectors>> inverseDynamicsCache() const#
Return the inverse dynamics cache.
- Returns:
the inverse dynamics cache
-
inline const HingeOnodeInvDynVectors &inverseDynamicsVectors() const#
Update and return the inverse dynamics vectors.
- Returns:
the inverse dynamics vectors
-
km::SpatialVector getTAInterBodyForce()#
Return the interbody force at the onode for Tree Augmented (TA) dynamics with constraints.
This method returns the interbody force at the onode when doing TA dynamics for the system in the presence of loop constraints. This is only meant to be used for regular hinges (not cut-joint hinges)
- Returns:
the inter-body spatial force
Protected Functions
-
void _saveExtraATBIVariables()#
Helper method in TA dynamics with loop constraints to save the zrplus and alpha_plus values from the “free” dynamics solution for possible use in interbody force computations where we need to combine these values with those from the correction step.
-
void _computeInvDynForces(HingeOnodeInvDynVectors&)#
-
void _computeATBIMatrices(HingeOnodeATBIMatrices &val)#
-
void _computeATBIFilterVectors(HingeOnodeATBIFilterVectors &val)#
-
void _computeATBISmootherVectors(HingeOnodeATBISmootherVectors &val, bool is_root_onode)#
-
virtual void _computeUpsilonMatrices(HingeOnodeUpsilonMatrices &val, bool is_root_onode)#
-
km::SpatialVector _getInterBodyForce()#
compute the ATBI based inter-body force for the hinge at the onode represented in the onode frame.
-
void _oneTimeSetupDataCaches()#
-
void _oneTimeTeardownDataCaches()#
-
void _oneTimeSetupDataCacheGatherCallbacks()#
sets up the onode’s gather cache callbacks to depend on the child pnode’s gather data caches
-
void _oneTimeTeardownDataCacheGatherCallbacks()#
-
void _oneTimeTeardown()#
-
void _setupDataCachesWithParentPnode()#
called to setup/unset a pnode’s gather data cache dependency on a onode whenever a new pnode or a new onode is created, i.e. whenever there is a new pnode/onde pairing
-
void _teardownDataCachesWithParentPnode()#
Protected Attributes
-
kc::ks_ptr<kf::OrientedChainedFrameToFrame> _pnode2onode_f2f = nullptr#
the oriented f2f from this onode’s parent body’s pnode to the onode
-
kc::ks_ptr<kf::FrameToFrame> _body2onode_f2f = nullptr#
the oriented f2f from this onode’s parent body’s frame to the onode
-
HingeOnodeATBIDataCaches _atbi_data_caches#
-
kc::ks_ptr<kc::DataCache<HingeOnodeInvDynVectors>> _invdyn_data_cache = nullptr#
-
HingeOnode(std::string_view name, kc::ks_ptr<PhysicalBody> bd)#