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, std::string_view name, HingeBase::HingeType htype, const std::vector<SubhingeBase::SubhingeType> &subhinge_types = std::vector<SubhingeBase::SubhingeType>())#

Hinge Constructor.

inline virtual std::string_view 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(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.

Public Static Functions

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

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 _changeActionT() override#
km::SpatialVector _acorPrime(const km::Vec &x_dot_u) 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. The XdotU vector is non-null (i.e. non-zero size) only for constraint-embedding compound bodies - where the XdotU term is a contribution from the configuraton dependency of the independent to dependent coordinates

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.