Class PhysicalHinge#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

Class Documentation#

class PhysicalHinge : public Karana::Dynamics::FramePairHinge#

Represents the class for physical articulation hinges.

This class is the container for physical subhinges that define articulation for physical bodies. See Connecting bodies via hinges section for more information on physical hinges.

Public Functions

virtual ~PhysicalHinge()#

Hinge destructor.

PhysicalHinge(PhysicalBody &parent_body, PhysicalBody &child_body, const std::string &name, HingeBase::HINGE_TYPE htype, const std::vector<SubhingeBase::SUBHINGE_TYPE> &subhinge_types = std::vector<SubhingeBase::SUBHINGE_TYPE>())#

Hinge Constructor.

inline virtual const std::string &typeString() const noexcept override#

Returns the type string of the HingeBase.

Returns:

The type string.

const kc::ks_ptr<HingePnode> &pnode() const#

Return the pnode for the hinge See.

Connecting bodies via hinges section for more information on onodes and pnodes.

Returns:

the HingePnode instance

const kc::ks_ptr<HingeOnode> &onode() const#

Return the onode for the hinge See.

Connecting bodies via hinges section for more information on onodes and pnodes.

Returns:

the HingeOnode instance

virtual std::string dumpString(const std::string &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.

Public Static Functions

static const kc::ks_ptr<PhysicalHinge> create(PhysicalBody &parent, PhysicalBody &child, HingeBase::HINGE_TYPE htype, const std::vector<SubhingeBase::SUBHINGE_TYPE> &subhinge_types = std::vector<SubhingeBase::SUBHINGE_TYPE>())#

Factory method to create a PhysicalHinge instance.

Parameters:
  • parent – The parent body

  • child – The child body

  • htype – The hinge type

  • subhinge_types – The list of subhinge types for a custom hinge type

Returns:

A new PhysicalHinge instance

Protected Functions

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

Parameters:

base – - Pointer to the PhysicalHinge.

void _setupATBIDataCaches()#
void _teardownATBIDataCaches()#
void _setupInvDynDataCaches()#
void _teardownInvDynDataCaches()#
void _oneTimeTeardown()#
virtual void _TChangeAction() override#
km::SpatialVector _acorPrime() const#

Compute the overall Coriolis accel term for all of the subhinges about and in the pnode frame. This is needed for compound bodies ATBI filter step.

struct InterBodyForce#

Struct for inter-body force data at the hinge.

Public Functions

virtual ~InterBodyForce() = default#

Public Members

bool _enable_interbody_force = false#

flag that indicates whether inter-body forces should be computed for this hinge during the forward dynamics computation. Disabled by default.

km::SpatialVector _interbody_spforce#

The interbody spatial force when computed by the forward dynamics algorithm (when the interbody force computation for this hinge has been enabled. The value is at the subhinge’s pframe (but expressed in the child body’s pnode frame. The getInterBodyForce() subhinge method make uses of this value when called.