Description
Wrapper class for a joint in a Chrono system which can be either a kinematic joint or a bushing.
#include <ChJoint.h>
Classes | |
struct | BushingData |
Stiffness and damping data for a bushing specification. More... | |
Public Types | |
enum | Type { LOCK, SPHERICAL, REVOLUTE, PRISMATIC, UNIVERSAL, POINTLINE, POINTPLANE } |
Supported types of joints. More... | |
typedef std::shared_ptr< ChLink > | Link |
typedef std::shared_ptr< ChLoadBodyBodyBushingGeneric > | Bushing |
Public Member Functions | |
ChJoint (Type type, const std::string &name, std::shared_ptr< ChBody > body1, std::shared_ptr< ChBody > body2, ChFrame<> joint_frame, std::shared_ptr< BushingData > bushing_data=nullptr) | |
Construct a joint wrapper of the specified type, name, connecting the specified bodies. More... | |
void | SetTag (int tag) |
Set object tag. | |
ChVector3d | GetPos () const |
Get the current absolute position of the joint. More... | |
ChVectorDynamic | GetConstraintViolation () const |
Get the current constraint violation. More... | |
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. | |
static void | Remove (std::shared_ptr< ChJoint > joint) |
Utility function to remove a joint (kinematic or bushing) from its containing Chrono system. | |
Member Enumeration Documentation
◆ Type
|
strong |
Supported types of joints.
- 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).
- A bushing of type PRISMATIC, POINTLINE, or POINTPLANE is prohibited.
Constructor & Destructor Documentation
◆ ChJoint()
chrono::ChJoint::ChJoint | ( | Type | type, |
const std::string & | name, | ||
std::shared_ptr< ChBody > | body1, | ||
std::shared_ptr< ChBody > | body2, | ||
ChFrame<> | joint_frame, | ||
std::shared_ptr< BushingData > | bushing_data = nullptr |
||
) |
Construct a joint wrapper of the specified type, name, connecting the specified bodies.
The joint is constructed at the specified location (expressed in the absolute reference frame). If no bushing data is provided (default), a kinematic joint is created; otherwise, this function creates a bushing.
Member Function Documentation
◆ GetAsBushing()
ChJoint::Bushing chrono::ChJoint::GetAsBushing | ( | ) | const |
Get the underlying bushing.
A null pointer is returned if the vehicle joint is in fact a kinematic joint.
◆ GetAsLink()
ChJoint::Link chrono::ChJoint::GetAsLink | ( | ) | const |
Get the underlying kinematic joint.
A null pointer is returned if the vehicle joint is in fact a bushing.
◆ GetConstraintViolation()
ChVectorDynamic chrono::ChJoint::GetConstraintViolation | ( | ) | const |
Get the current constraint violation.
This will return an empty vector for a bushing element.
◆ GetForce()
ChVector3d chrono::ChJoint::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::ChJoint::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/physics/ChJoint.h
- /builds/uwsbel/chrono/src/chrono/physics/ChJoint.cpp