Class OrientedChainedFrameToFrame#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

Derived Type#

Class Documentation#

class OrientedChainedFrameToFrame : public Karana::Frame::FrameToFrame#

FrameToFrame class connecting an oframe with a downstream pframe.

The pframe can be arbitrary - as long as it is downstream of the oframe frames tree.

See Coordinate Frames for more discussion on the frames layer.

Subclassed by Karana::Dynamics::FramePairHinge

Public Functions

OrientedChainedFrameToFrame(const kc::ks_ptr<Frame> &oframe, const kc::ks_ptr<Frame> &pframe, std::string_view name = "")#

Constructor for OrientedChainedFrameToFrame.

Parameters:
size_t numEdges() const#

Return the number of edges in this oriented chain.

Returns:

the number of edges in the chain

std::string getPath() const#

Return the sequence of edge names in this chain as a string.

Returns:

string with the sequence of edge names

std::string dumpString(std::string_view prefix = "", const Base::DumpOptions *options = nullptr) 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.

Public Static Functions

static const kc::ks_ptr<OrientedChainedFrameToFrame> &lookupOrCreate(const kc::ks_ptr<Frame> &oframe, const kc::ks_ptr<Frame> &pframe)#

Looks up or creates an OrientedChainedFrameToFrame two frames.

Parameters:
  • oframe – - The oframe of the oriented chain.

  • pframe – - The pframe of the oriented chain.

Returns:

The OrientedChainedFrameToFrame that connects the oframe and pframe.

Protected Functions

virtual void _empty() override#

Empty out the OrientedChainedFrameToFrame completely. This happens when the oframe or pframe associated with the OrientedFrameToFrame is deleted.

virtual void _computeTransform(km::HomTran &T) override#

Compute the transformation between the oframe and pframe.

Parameters:

T – The buffer to place the computed homogeneous transformation in.

virtual void _computeVelocity(km::SpatialVector &V) override#

Compute the spatial velocity between the oframe and pframe.

This method uses Exercise 1.8 (Evaluating spatial velocities) to combine the oframe/pframe parent spatial velocity with the pframe edge spatial velocity.

Parameters:

V – The buffer to put the computed spatial velocity in.

virtual void _computeAccel(km::SpatialVector &a) override#

Compute the spatial acceleration between the oframe and pframe.

This method uses Exercise 1.15 (Evaluating spatial accelerations) to combine the oframe/pframe parent spatial acceleration with the pframe edge spatial acceleration and in the Coriolis contribution.

Parameters:

a – The buffer to put the computed spatial acceleration in.

virtual void _makeCurrent() override#

Used to lock the OrientedChainedFrameToFrame.

virtual void _makeStale() override#

Used to unlock the OrientedChainedFrameToFrame.

void _setup()#

Used to setup the OrientedChainedFrameToFrame.

void _discard(kc::ks_ptr<Base> &base) override#

Discard the provided OrientedChainedFrameToFrame.

Parameters:

base – - Base pointer to the OrientedChainedFrameToFrame to discard.

Protected Attributes

kc::ks_ptr<Frame> _pframe_parent = nullptr#

The pframe’s parent frame.

kc::ks_ptr<EdgeFrameToFrame> _pframe_edge_f2f = nullptr#

The pframe’s edge.

kc::ks_ptr<OrientedChainedFrameToFrame> _to_parent_f2f = nullptr#

The OrientedChainedFrameToFrame that goes from the oframe to the pframe’s parent.

struct DumpOptions : public Karana::Frame::FrameToFrame::DumpOptions#

options struct for dumpString

Public Functions

inline DumpOptions &operator=(const DumpOptions &p)#

Assignment operator.

Parameters:

p – The DumpOptions to copy from.

Returns:

A reference to the newly assigned DumpOptions.

Public Members

bool path = true#

Display the edges that make up the path for this chain.