Class SphericalQuatSubhinge#
Defined in File PinSubhinge.h
Inheritance Relationships#
Base Type#
public Karana::Dynamics::PhysicalSubhinge_T< 4, 3 >(Template Class PhysicalSubhinge_T)
Class Documentation#
-
class SphericalQuatSubhinge : public Karana::Dynamics::PhysicalSubhinge_T<4, 3>#
Represents a 3 dof rotational subhinge using unit quaternion for generalized coords.
See Subhinges section for more information on physical subhinges.
Public Functions
-
virtual ~SphericalQuatSubhinge()#
SphericalQuatSubhinge destructor.
-
inline virtual std::string_view typeString() const noexcept override#
Returns the type string of the SubTree.
- Returns:
The type string.
-
virtual SubhingeBase::SubhingeType subhingeType() const override#
Helper method to return the subhinge type.
- Returns:
the subhinge type
-
SphericalQuatSubhinge(kc::ks_ptr<kf::Frame> oframe, kc::ks_ptr<kf::Frame> pframe, std::string_view name, kc::ks_ptr<FramePairHinge> hge)#
Constructs a SphericalQuatSubhinge_T.
-
virtual void setU(const Eigen::Ref<const km::Vec> &val) override#
Set the U velocity coordinates.
See Generalized Q, U etc coordinates section for discussion on Q, U etc coordinates.
- Parameters:
val – Array of values.
-
virtual const km::Vec &getQdot() const override#
Return the Qdot rate coordinates.
See Generalized Q, U etc coordinates section for discussion on Q, U etc coordinates.
- Returns:
Array of values.
-
virtual std::string dumpString(std::string_view prefix, const Karana::Core::Base::DumpOptions *options) const override#
Return a formatted string containing information about this object.
- Parameters:
prefix – String prefix to use for formatting.
options – Dump options (if null, defaults will be used).
- Returns:
A string representation of the object.
Protected Functions
-
virtual void _localChartSetQ(const Eigen::Ref<const km::Vec> &val) override#
Set the local chart Q coordinates.
See Generalized Q, U etc coordinates section for discussion on Q, U etc coordinates.
- Parameters:
val – Array of values.
-
virtual void _computeTransform(km::HomTran&) override#
Compute the transformation between the oframe and pframe.
This the relTransform data cache callback.
- Parameters:
T – The buffer to place the computed homogeneous transformation in.
-
virtual void _computeVelocity(km::SpatialVector&) override#
Compute the spatial velocity between the oframe and pframe.
This the relSpVel data cache callback.
- Parameters:
V – The buffer to put the computed spatial velocity in.
-
virtual void _computeAccel(km::SpatialVector&) override#
Compute the spatial acceleration between the oframe and pframe.
This the relSpAccel data cache callback.
- Parameters:
a – The buffer to put the computed spatial acceleration in.
-
void _computeQdot(km::Vec&) const#
-
virtual km::Mat poseGradient(const kf::FrameToFrame &f2f, bool oriented) const override#
Return the pose gradient matrix for a Karana::Frame::FrameToFrame.
Return the 6xnU gradient matrix for the pose of a Karana::Frame::FrameToFrame’s pframe with respect to its oframe with respect to the generalized coordinates Q using analytical methods. The relative orientation is expressed using RotationVectors for a minimal coordinates representation. Though closely related to the Jacobian, the gradient matrix is a coordinate space mapping, while the Jacobian is a velocity space mapping. The gradient matrix is handy for inverse kinematics computations. If oriented is false, the returned value is negated first.
See Coordinate Frames section for more information on frames, and Jacobians section for more on Jacobians.
- Parameters:
f_to_f – the FrameToFrame defining the relative from/to frames
oriented – the orientation of the coordinates provider
- Returns:
the gradient matrix
-
km::Mat _genvelToQdotMap() const#
-
km::Mat _qdotToGenvelMap() const#
-
virtual kc::ks_ptr<PhysicalSubhingeParams> _getParams() const override#
Get/set params for a subhinge.
-
virtual ~SphericalQuatSubhinge()#