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
}
 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, 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.
 
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...
 

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

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.

◆ 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