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...
 
typedef std::shared_ptr< ChLinkLink
 
typedef std::shared_ptr< ChLoadBodyBodyBushingGenericBushing
 

Public Member Functions

 ChVehicleJoint (Type type, const std::string &name, std::shared_ptr< ChBody > body1, std::shared_ptr< ChBody > body2, ChFrame<> joint_frame, 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...
 
ChVector3d 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.
 
ChVector3d 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.
 
Link GetAsLink () const
 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.
 

Friends

class ChChassis
 

Member Enumeration Documentation

◆ Type

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).

Constructor & Destructor Documentation

◆ ChVehicleJoint()

chrono::vehicle::ChVehicleJoint::ChVehicleJoint ( Type  type,
const std::string &  name,
std::shared_ptr< ChBody body1,
std::shared_ptr< ChBody body2,
ChFrame<>  joint_frame,
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).

Member Function Documentation

◆ 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.

◆ GetAsLink()

ChVehicleJoint::Link chrono::vehicle::ChVehicleJoint::GetAsLink ( ) const

Get the underlying kinematic joint.

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

◆ GetForce()

ChVector3d 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()

ChVector3d 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