chrono::vehicle::ChVehicleJoint Class Reference

## Description

Wrapper class for a joint in a vehicle system which can be either a kinematic joint or a bushing.

#include <ChVehicleJoint.h>

## Public Types

enum  Type {
LOCK, SPHERICAL, REVOLUTE, UNIVERSAL,
POINTLINE, POINTPLANE
}
Supported types of vehicle joint. More...

## Public Member Functions

ChVehicleJoint (Type type, const std::string &name, std::shared_ptr< ChBody > body1, std::shared_ptr< ChBody > body2, ChCoordsys<> pos, std::shared_ptr< ChVehicleBushingData > bushing_data=nullptr)
Construct a vehicle joint wrapper of the specified type, with the given name, connecting the specified bodies at the given position (expressed in the absolute reference frame). More...

ChVector GetPos () const
Get the current absolute position of the joint. More...

ChVectorDynamic GetConstraintViolation () const
Get the current constraint violation. This will return an empty vector for a bushing element.

ChVector GetForce () const
Get the force in the vehicle joint. More...

bool IsKinematic () const
Return true if wrapping a kinematic joint and false if wrapping a bushing.

Get the underlying kinematic joint. More...

Bushing GetAsBushing () const
Get the underlying bushing. More...

## Static Public Member Functions

static std::string GetTypeString (Type type)
Return a string describing the specified joint type.

class ChChassis

## ◆ Type

 strong

Supported types of vehicle joint.

For a kinematic joint, the wrapped element will be a ChLink of the appropriate type. For a bushing, the stiffness and damping in the appropriate directions (as defined by the DOFs of the joint type) are set to a different value (typically 0).

## ◆ ChVehicleJoint()

 chrono::vehicle::ChVehicleJoint::ChVehicleJoint ( Type type, const std::string & name, std::shared_ptr< ChBody > body1, std::shared_ptr< ChBody > body2, ChCoordsys<> pos, std::shared_ptr< ChVehicleBushingData > bushing_data = nullptr )

Construct a vehicle joint wrapper of the specified type, with the given name, connecting the specified bodies at the given position (expressed in the absolute reference frame).

If no bushing data is provided (default), a kinematic joint is created; otherwise, this function creates a bushing. Note that the constructed element is not included in the simulation; for that, pass the joint to the ChChassis::AddJoint function which adds the joint to its appropriate container (the containing Chrono system for a kinematic joint or a load container managed by the chassis subsystem for a bushing).

## ◆ GetAsBushing()

 ChVehicleJoint::Bushing chrono::vehicle::ChVehicleJoint::GetAsBushing ( ) const

Get the underlying bushing.

A null pointer is returned if the vehicle joint is in fact a kinematic joint.

Get the underlying kinematic joint.

A null pointer is returned if the vehicle joint is in fact a bushing.

## ◆ GetForce()

 ChVector chrono::vehicle::ChVehicleJoint::GetForce ( ) const

Get the force in the vehicle joint.

If this is a kinematic joint, the returned force represent the constraint force. For a bushing this is the force applied by the bushing element. The returned force is assumed applied to the second body (body2) and expressed in the body2 frame.

## ◆ GetPos()

 ChVector chrono::vehicle::ChVehicleJoint::GetPos ( ) const

Get the current absolute position of the joint.

This is the current absolute location of the underling marker on the 2nd connected body.

The documentation for this class was generated from the following files:
• /builds/uwsbel/chrono/src/chrono_vehicle/ChVehicleJoint.h
• /builds/uwsbel/chrono/src/chrono_vehicle/ChVehicleJoint.cpp