Class HingePnode#
Defined in File HingeNode.h
Nested Relationships#
Nested Types#
Inheritance Relationships#
Base Type#
public Karana::Dynamics::HingeNode(Class HingeNode)
Class Documentation#
-
class HingePnode : public Karana::Dynamics::HingeNode#
Represents the hinge pnode class.
See Connecting bodies via hinges section for more discussion of hinge, onodes and pnodes.
This class is for the pnodes for physical hinges
Public Functions
-
HingePnode(kc::ks_ptr<PhysicalBody> bd)#
Constructor.
- Parameters:
bd – the parent body
-
virtual ~HingePnode()#
HingePnode destructor.
-
virtual bool isReady() 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<ATBIMatrices>> atbiMatrixCache() const#
Return the ATBI matrix cache.
- Returns:
the ATBI matrix cache
-
inline const ATBIMatrices &atbiMatrices() const#
Update and return the ATBI matrices.
- Returns:
the ATBI matrices
-
inline const kc::ks_ptr<kc::DataCache<UpsilonMatrices>> upsilonMatrixCache() const#
Return the OSCM Upsilon matrix cache.
- Returns:
the OSCM Upsilon matrix cache
-
inline const UpsilonMatrices &upsilonMatrices() const#
Update and return the OSCM Upsilon matrices.
- Returns:
the OSCM Upsilon matrices
-
inline const kc::ks_ptr<kc::DataCache<ATBIFilterVectors>> atbiFilterCache() const#
Return the ATBI filter cache.
- Returns:
the ATBI filter cache
-
inline const ATBIFilterVectors &atbiFilterVectors() const#
Update and return the ATBI filter vectors.
- Returns:
the ATBI filter vectors
-
inline const kc::ks_ptr<kc::DataCache<ATBISmootherVectors>> &atbiSmootherCache() const#
Return the ATBI smoother cache.
- Returns:
the ATBI smoother cache
-
inline const ATBISmootherVectors &atbiSmootherVectors() const#
Update and return the ATBI smoother vectors.
- Returns:
the ATBI smoother vectors
-
inline const kc::ks_ptr<kc::DataCache<InvDynVectors>> inverseDynamicsCache() const#
Return the inverse dynamics cache.
- Returns:
the inverse dynamics cache
-
inline const InvDynVectors &inverseDynamicsVectors() const#
Update and return the inverse dynamics vectors.
- Returns:
the inverse dynamics vectors
-
inline const km::Mat &crbInertiaMatrix() const#
Update and return the CRB spatial inertia for the body referenced to the pnode.
This is a (nmodes+6) size square, symmetric, positive semi-definite matrix
- Returns:
the CRB inertia matrix.
-
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.
Protected Functions
-
void _oneTimeSetupDataCaches()#
Helper method to set up the pnode’s data caches.
-
void _oneTimeTeardownDataCaches()#
Helper method to tear down the pnode’s data caches.
-
void _oneTimeTeardown()#
Helper method to tear down the pnode.
-
km::SpatialVector _externalForces() const#
Helper method to compute the overall external spatial force on body transformed to the pnode.
- Returns:
the overall external spatial force
-
km::SpatialVector _constraintForces() const#
Helper method to compute the overall constraint spatial force on the body transformed to the pnode.
- Returns:
the overall external spatial force
-
bool _isFloatingFrame() const#
Return true if the pnode is connected to a full 6-dof hinge, false otherwise.
This is used in flex body dynamics to define whether or not the pnode is a material point on the body and can thus deform with the body.
- Returns:
true if the body hinge is a 6 dof hinge
-
void _computeMassMatrix(km::Mat66 &val)#
Data cache callback to update the pnode referenced spatial inertia for the body.
- Parameters:
val – the data buffer for the computed value
-
virtual void _computeGyroscopicForce(km::SpatialVector&) const#
Data cache callback for updating the body’s gyroscopic spatial force. This gyroscopic term corresponds to rigid body equations of motion where the body frame derivatives are used for generalized accel, i.e. the accel corresponds to pframeObservedRelSpAccel(). The returned spatial force is about and at the pnode frame.
-
virtual void _computeInvDynForces(InvDynVectors &val)#
Data cache callback to update the overall inverse dynamics forces values for this body.
The returned spatial force is at the pnode frame.
- Parameters:
val – the data buffer for the computed value
-
virtual void _computeATBIMatrices(ATBIMatrices &val)#
Data cache callback to update the ATBI matrix values.
- Parameters:
val – the data buffer for the computed value
-
void _computeATBIFilterVectors(ATBIFilterVectors &val)#
Data cache callback to update the ATBI filter values.
- Parameters:
val – the data buffer for the computed value
-
void _computeATBISmootherVectors(ATBISmootherVectors &val)#
Data cache callback to update the ATBI smoother values.
- Parameters:
val – the data buffer for the computed value
-
virtual void _computeUpsilonMatrices(UpsilonMatrices &val)#
Data cache callback to update the OSI Upsilon values.
- Parameters:
val – the data buffer for the computed value
-
void _computeCRBInertiaMatrix(km::Mat &val)#
Data cache callback to update the CRB inertia values.
- Parameters:
val – the data buffer for the computed value
Protected Attributes
-
kc::ks_ptr<kf::FrameToFrame> _pnode2body_f2f#
The cached oriented f2f from the pnode to the body frame
-
kc::ks_ptr<kc::DataCache<km::SpatialVector>> _gyroscopic_force_cache#
Data cache for the gyroscopic forces
-
kc::ks_ptr<kc::DataCache<km::Mat66>> _massmat_cache#
data cache for body spatial inertia transformed to the pnode
-
ATBIDataCaches _atbi_data_caches#
ATBI data caches
-
kc::ks_ptr<kc::DataCache<InvDynVectors>> _invdyn_data_cache = nullptr#
Inverse dynamics data cache
-
km::Mat66 _apparent_mass_data#
the parent body’s apparent mass data transformed to the pnode
-
kc::ks_ptr<kc::DataCache<km::Mat>> _crb_inertia_matrix_cache = nullptr#
CRB inertia data cache
-
struct ATBIDataCaches#
Overall set of ATBI data caches for the HingePnode.
Public Members
-
kc::ks_ptr<kc::DataCache<ATBIMatrices>> matrix_cache = nullptr#
data cache for ATBI matrices
-
kc::ks_ptr<kc::DataCache<ATBIFilterVectors>> filter_cache = nullptr#
data cache for ATBI filter vectors
-
kc::ks_ptr<kc::DataCache<ATBISmootherVectors>> smoother_cache = nullptr#
data cache for ATBI smoother vectors
-
kc::ks_ptr<kc::DataCache<UpsilonMatrices>> upsilon_matrix_cache = nullptr#
data cache for Upsilon matrices
-
kc::ks_ptr<kc::DataCache<ATBIMatrices>> matrix_cache = nullptr#
-
struct ATBIFilterVectors#
Struct for ATBI dynamics filter vector quantities for a HingePnode.
Public Members
-
km::SpatialVector z#
Rigid 6 vector of z for the body about the pnode location and represented in the pnode frame.
-
km::SpatialVector z#
-
struct ATBIMatrices#
Struct for ATBI dynamics matrix quantities for a HingePnode.
Public Members
-
km::Mat66 P#
Rigid body 6x6 ATBI P matrix for the body about the pnode location and represented in the pnode frame.
-
km::Mat66 P#
-
struct ATBISmootherVectors#
Struct for ATBI dynamics smoother vector quantities for a HingePnode.
-
struct InvDynVectors#
Struct for inverse dynamics vector quantities for a HingePnode.
Public Members
-
km::SpatialVector f#
the inter-body spatial interaction force for the body about the pnode location and represented in the body frame.
-
km::SpatialVector f#
-
struct UpsilonMatrices#
Struct for onode OSI matrix quantities at the HingePnode.
Public Members
-
km::Mat66 Upsilon#
OSI Upsilon matrix for the child body about and in the pnode frame
-
km::Mat66 Upsilon#
-
HingePnode(kc::ks_ptr<PhysicalBody> bd)#