Class PhysicalSubhinge#
Defined in File PhysicalSubhinge.h
Nested Relationships#
Nested Types#
Inheritance Relationships#
Base Types#
public Karana::Frame::EdgeFrame2Frame(Class EdgeFrame2Frame)public Karana::Dynamics::SubhingeBase(Class SubhingeBase)
Derived Types#
public Karana::Dynamics::PhysicalSubhinge_T< 3, 3 >(Template Class PhysicalSubhinge_T)public Karana::Dynamics::PhysicalSubhinge_T< 0, 0 >(Template Class PhysicalSubhinge_T)public Karana::Dynamics::PhysicalSubhinge_T< 1, 1 >(Template Class PhysicalSubhinge_T)public Karana::Dynamics::PhysicalSubhinge_T< 4, 3 >(Template Class PhysicalSubhinge_T)public Karana::Dynamics::PhysicalSubhinge_T< NQ, NU >(Template Class PhysicalSubhinge_T)
Class Documentation#
-
class PhysicalSubhinge : public Karana::Frame::EdgeFrame2Frame, public Karana::Dynamics::SubhingeBase#
Represents the abstract base class for physical articulation subhinges.
This class is the base class for subhinges from which physical subhinge classes are derived. See Subhinges section for more information on physical subhinges.
Subclassed by Karana::Dynamics::PhysicalSubhinge_T< 3, 3 >, Karana::Dynamics::PhysicalSubhinge_T< 0, 0 >, Karana::Dynamics::PhysicalSubhinge_T< 1, 1 >, Karana::Dynamics::PhysicalSubhinge_T< 4, 3 >, Karana::Dynamics::PhysicalSubhinge_T< NQ, NU >
Public Functions
-
virtual ~PhysicalSubhinge()#
PhysicalSubhinge destructor.
-
inline virtual const std::string &typeString() const noexcept override#
Returns the type string of LockingBase.
- Returns:
The type string.
-
inline virtual const std::string &name() const override#
Return the object’s name.
- Returns:
The object’s string name.
-
inline virtual const kc::id_t &id() const override#
Return the object’s id.
- Returns:
The object’s id.
-
virtual kc::ks_ptr<kf::Frame2Frame> f2f() const override#
Return the frame to frame for the CoordBase.
The returned f2f helps locate the CoordBase in the frames tree. Its transform etc data does not however represent the relative transformation changes from the changes to this object’s coordinates.
- Returns:
Return the oframe Frame instance
-
virtual const km::Mat oframeCoordMapMatrix() const = 0#
Return matrix to map coord velocites to physical velocities.
The product of this matrix with the generalized veloicites vector (U) evaluates to the full relative spatial velocities contribution from this object.
For a PhysicalSubhinge, this is a 6xNU size matrix where NU is number of generalized velocity coordinates for the subhinge. For a physical subhinge, this matrix is uses oframe representation. The product with U returns the relative spatial velocity across the subhinge referenced in the oframe.
For a CompoundSubhinge, this matrix is (6*nbodies)xNU in size where NU is the overall number of generalized velocity coordinates for the aggregated body subhinges. This matrix is the Jacobian from the embedded physical body subhinges to the embedded body relative spatial velocity contribution from them.
For a PhysicalModalBody body, the size is 6xNU, where NU is the number of modal coordinates. It returns the modal matrix for the pnode.
- Returns:
coordinate map matrix
-
inline virtual bool sanitizeCoords()#
Method to recenter or otherwise sanitize the subhinge’s coordinates.
Some subhinge may have coordinates that need to be “sanitized” from time to time. An example if that of spherical subhinges, where the orientation coordinate representation may require recentering of the local charts when the values are nearing singularity. This method can specialized for subhinges that have this need. The return value should be true if any such sanitizatoin was done to modify the coordinate values.
- Returns:
true, is any sanitization was needed and carried out
-
inline virtual bool requiresCoordSanitization() const#
Return true if the subhinge has coordinate sanitization needs.
This method can be used to identify the subset of subhinges that have coordinate sanitization needs, so that sanitizeCoords() can be called for them when needed.
- Returns:
true if the subhinge has coordinate sanitization needs.
-
inline virtual void resetChart()#
Reset any sanitization related chart offsets etc that may have been applied.
-
virtual void setPrescribed(bool flag) override#
Set/unset the prescribed flag for the subhinge.
- Parameters:
flag – the prescribed state to set
-
inline size_t getIndex() const#
Return the slot index for the subhinge in the parent hinge’s list of subhinges.
- Returns:
the subhinge index
Protected Functions
-
virtual km::Mat _oframe2pframePsi() const override#
for flex bodies returns 6x(nU+6) ATBI psi matrix, for subhinges the size is 6x6. For a flex body, the lhs is at the pnode, and the rhs at the body frame. For a subhinge, the lhs/rhs are the subhinge’s oframe and pframe pair.
-
virtual km::Mat _oframe2pframePhi() const override#
for flex bodies returns 6x(nU+6) phi matrix, for subhinges the size is 6x6. For a flex body, the lhs is at the pnode, and the rhs at the body frame. For a subhinge, the lhs/rhs are the subhinge’s oframe and pframe pair.
-
virtual km::Mat _pframe2otherPhi(const kf::Frame &other) const override#
for flex bodies returns (nU+6)x6 psi matrix, for subhinges the size is 6x6. For a flex body, the lhs is at the body frame, and the rhs at the other frame. For a subhinge, the lhs is the pframe, and the rhs at teh other frame.
-
kc::ks_ptr<PhysicalSubhinge> getUpstreamSubhinge() const#
Return the previous inboard subhinge to this one
-
virtual km::Mat getUpsilonMatrix() override#
The Upsilon at the pframe (after crossing the ATBI dofs). For a subhinge, pframe is the regular subhinge pframe, and for a flex body it is the body frame. For a subhinge, this is a nU size square matrix, while for a flex body it is a (nU+6) size square matrix.
-
virtual kc::ks_ptr<PhysicalSubhingeParams> _getParams() const = 0#
Get/set params for a subhinge.
-
virtual void _fillCoordParams(PhysicalSubhingeParams ¶ms) const = 0#
-
virtual void _setParams(const PhysicalSubhingeParams ¶ms) = 0#
apply the params from the twin subhinge to this subhinge
-
virtual void _setReversedParams(const PhysicalSubhingeParams ¶ms) = 0#
apply the params from the original subhinge to the reversed version of this subhinge
-
virtual km::Mat66 _computeATBIMatrices(const km::Mat66 &P) = 0#
-
virtual km::SpatialVector _computeATBIFilterVectors(const km::SpatialVector &z) = 0#
-
virtual void _computeInvDynGenForce(const km::SpatialVector &pnode_invdyn_f) = 0#
Compute the subhinge’s generalized force value for inverse dynamics
-
virtual km::SpatialVector _computeATBISmootherVectors(const km::SpatialVector &alpha) = 0#
-
virtual km::Mat66 _computeUpsilonMatrices(const km::Mat66 &UpsilonPlus_oframe) = 0#
Propagate the UpsilonPlus from the oframe to the pframe
-
km::SpatialVector _coriolisAccel() const#
Return the Coriolis acceleration “a” that factors into the recursive acceleration propagation across the subhinge. This assumes that we are combining the oframe observed acceleration at the oframe with oframe observed subhinge relative spatial accel to compute the pframe observed pframe acceleration.
-
PhysicalSubhinge(kc::ks_ptr<kf::Frame> oframe, kc::ks_ptr<kf::Frame> pframe, const std::string &name, kc::ks_ptr<FramePairHinge> hge)#
Constructs a PhysicalSubhinge.
Protected Attributes
-
kc::ks_ptr<kf::OrientedChainedFrame2Frame> _oframe2pnode_f2f = nullptr#
the f2f from this subhinge’s oframe to the child body’s pnode
-
kc::ks_ptr<kf::OrientedChainedFrame2Frame> _newtonian2oframe_f2f = nullptr#
-
kc::ks_ptr<kf::OrientedChainedFrame2Frame> _newtonian2pframe_f2f = nullptr#
-
km::Mat66 _Upsilon_pframe#
the Upsilon value at the subinge in the pframe
-
size_t _index#
the slot index of the subhinge in the parent hinge’s subhinge list
-
struct PhysicalSubhingeParams#
Base class for physical subhinges that is specialized for each subhinge type. This is handy for creating new subhinges with matching params from existing subhinges (eg. when introducing cut-joints).
Subclassed by Karana::Dynamics::Physical1DofSubhinge::PhysicalSubhingeParams, Karana::Dynamics::SphericalSubhinge::PhysicalSubhingeParams
Public Functions
-
PhysicalSubhingeParams() = default#
-
inline PhysicalSubhingeParams(const PhysicalSubhinge::PhysicalSubhingeParams &p)#
-
inline PhysicalSubhingeParams &operator=(const PhysicalSubhinge::PhysicalSubhingeParams &p)#
-
PhysicalSubhingeParams() = default#
-
virtual ~PhysicalSubhinge()#