AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxTerrain::TerrainWheelQuantities Class Reference

Class that contains TerrainWheel "quantities". More...

#include <TerrainWheelQuantities.h>

+ Inheritance diagram for agxTerrain::TerrainWheelQuantities:

Public Member Functions

 TerrainWheelQuantities (TerrainWheel *wheel)
 
agx::Real getDestructiveAngle () const
 Return the current destructive (failure) angle Xc.
 
agx::Real getFrontAngle () const
 Return the current front contact angle theta_f.
 
agx::Real getMaximumNormalStressAngle () const
 Return the current maximum normal stress angle theta_m.
 
agx::Real getRearAngle () const
 Return the current rear contact angle theta_r.
 
agx::Real getshearModulusLateral () const
 
agx::Real getshearModulusTangential () const
 
agx::Real getSinkageExponent () const
 Return the current sinkage exponent n (used in p = k * z^n).
 
agx::Real getSlipAngle () const
 Return the current slip angle (also known as sideslip angle).
 
agx::Real getSlipRatio () const
 
agx::Vec3 getWheelFrameAngVel () const
 
agx::Vec3 getWheelFrameVel () const
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 

Public Attributes

 AGXTERRAIN_TERRAINWHEEL_STORE_RESTORE_INTERFACE
 

Protected Member Functions

 TerrainWheelQuantities ()
 
void updateDistanceToForceFeedbackHeightField (const agx::AffineMatrix4x4 &wheelTransform, const agx::Vec3 &wheelCenter, const agx::Vec3 &normal, const agx::Vec3 &point)
 Update the distance to the force feedback heightfield, which is the user-specified nominal radius minus the contact overlap distance.
 
void updateIsDriving ()
 Update the cached driving/braking state of the wheel.
 
void updateRearAngleFromFrontAngle (agx::Real rearAngleParameterA, agx::Real rearAngleParameterB)
 Update the cached rear contact angle theta_r from the current front contact angle.
 
void updateSlipAngle ()
 Update the cached wheel slip angle for the current simulation step.
 
void updateSlipRatio ()
 Update the cached longitudinal slip ratio.
 
void updateWheelFrameVelocities (const agx::AffineMatrix4x4 &transform)
 Update cached wheel-frame velocities for the current simulation step.
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

agx::Real m_destructiveAngle {0.0}
 
agx::Real m_distanceToForceFeedbackHeightfield {0.0}
 
agx::Real m_frontAngle {0.0}
 
agx::Bool m_isDriving {true}
 
agx::Real m_maximumNormalStressAngle {0.0}
 
agx::Real m_rearAngle {0.0}
 
agx::Real m_shearModulusLateral {0.0}
 
agx::Real m_shearModulusTangential {0.0}
 
agx::Real m_sinkageExponent {0.0}
 
agx::Real m_slipAngle {0.0}
 
agx::Real m_slipRatio {0.0}
 
TerrainWheel * m_wheel
 
agx::Vec3 m_wheelFrameAngVel
 
agx::Vec3 m_wheelFrameVel
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 

Detailed Description

Class that contains TerrainWheel "quantities".

A quantity is a derived physical property associated with the wheel, such as slip velocity, slip ratio, slip angle, front angle, rear angle, and similar measures.

These quantities are computed from the wheel state and contact geometry and are used as inputs to the force, torque, and terrain interaction models that govern the wheel dynamics.

Definition at line 42 of file TerrainWheelQuantities.h.

Constructor & Destructor Documentation

◆ TerrainWheelQuantities() [1/2]

agxTerrain::TerrainWheelQuantities::TerrainWheelQuantities ( TerrainWheel *  wheel)

◆ TerrainWheelQuantities() [2/2]

agxTerrain::TerrainWheelQuantities::TerrainWheelQuantities ( )
protected

Member Function Documentation

◆ getDestructiveAngle()

agx::Real agxTerrain::TerrainWheelQuantities::getDestructiveAngle ( ) const

Return the current destructive (failure) angle Xc.

Xc is a soil parameter used by the bulldozing resistance formulation (e.g., in lateral force contributions). It is updated each simulation step from the terrain material angle of internal friction phi:

Xc = pi/4 - phi/2

Returns
Destructive angle Xc [rad].

◆ getFrontAngle()

agx::Real agxTerrain::TerrainWheelQuantities::getFrontAngle ( ) const

Return the current front contact angle theta_f.

The front angle defines the angular position (about the wheel axle) of the leading edge of the wheel-terrain contact patch and is used as an integration bound in force computations.

Returns
Front contact angle theta_f [rad].

◆ getMaximumNormalStressAngle()

agx::Real agxTerrain::TerrainWheelQuantities::getMaximumNormalStressAngle ( ) const

Return the current maximum normal stress angle theta_m.

setEnableComputeMaximumNormalStressAngleFromFrontAngle() specifies how theta_m is computed.

Returns
Maximum normal stress angle theta_m [rad].

◆ getRearAngle()

agx::Real agxTerrain::TerrainWheelQuantities::getRearAngle ( ) const

Return the current rear contact angle theta_r.

The rear angle defines the angular position (about the wheel axle) of the trailing edge of the wheel-terrain contact patch and is used as an integration bound in force computations.

Returns
Rear contact angle theta_r [rad].

◆ getshearModulusLateral()

agx::Real agxTerrain::TerrainWheelQuantities::getshearModulusLateral ( ) const
Returns
the current lateral shear displacement modulus. [m]

◆ getshearModulusTangential()

agx::Real agxTerrain::TerrainWheelQuantities::getshearModulusTangential ( ) const
Returns
the current tangential shear displacement modulus. [m]

◆ getSinkageExponent()

agx::Real agxTerrain::TerrainWheelQuantities::getSinkageExponent ( ) const

Return the current sinkage exponent n (used in p = k * z^n).

n is evaluated as a slip-dependent quantity (e.g., n = a + b * slipRatio) and updated each simulation step from terrain material parameters and wheel slip ratio.

Returns
Sinkage exponent n [-]

◆ getSlipAngle()

agx::Real agxTerrain::TerrainWheelQuantities::getSlipAngle ( ) const

Return the current slip angle (also known as sideslip angle).

Returns
the current slip angle [rad].

◆ getSlipRatio()

agx::Real agxTerrain::TerrainWheelQuantities::getSlipRatio ( ) const
Returns
the current longitudinal slip ratio. [-]

◆ getWheelFrameAngVel()

agx::Vec3 agxTerrain::TerrainWheelQuantities::getWheelFrameAngVel ( ) const
Returns
the wheel-frame angular velocity of the wheel rigid body. [rad/s]

◆ getWheelFrameVel()

agx::Vec3 agxTerrain::TerrainWheelQuantities::getWheelFrameVel ( ) const
Returns
the wheel-frame linear velocity of the wheel rigid body. [m/s]

◆ updateDistanceToForceFeedbackHeightField()

void agxTerrain::TerrainWheelQuantities::updateDistanceToForceFeedbackHeightField ( const agx::AffineMatrix4x4 &  wheelTransform,
const agx::Vec3 &  wheelCenter,
const agx::Vec3 &  normal,
const agx::Vec3 &  point 
)
protected

Update the distance to the force feedback heightfield, which is the user-specified nominal radius minus the contact overlap distance.

Parameters
wheelTransformtransform of the wheel shape
wheelCenterThe wheel body center position.
normalnormal (of plane associated with the heightfield)
pointPoint (of plane associated with the heightfield)

◆ updateIsDriving()

void agxTerrain::TerrainWheelQuantities::updateIsDriving ( )
protected

Update the cached driving/braking state of the wheel.

Computes the current driving/braking classification from the wheel-frame longitudinal velocity, wheel-frame angular velocity, wheel radius, and the configured rolling-mode thresholds (see computeIsDriving()). The result is stored in m_isDriving.

◆ updateRearAngleFromFrontAngle()

void agxTerrain::TerrainWheelQuantities::updateRearAngleFromFrontAngle ( agx::Real  rearAngleParameterA,
agx::Real  rearAngleParameterB 
)
protected

Update the cached rear contact angle theta_r from the current front contact angle.

Uses computeRearAngleFromFrontAngle() together with the current terrain material rear-angle parameters and the current (longitudinal) slip ratio to update m_rearAngle. Intended to be called once per simulation step when enableComputeRearAngleFromFrontAngle is set.

◆ updateSlipAngle()

void agxTerrain::TerrainWheelQuantities::updateSlipAngle ( )
protected

Update the cached wheel slip angle for the current simulation step.

This computes the slip angle from the current wheel-frame linear velocity components (m_wheelFrameVel.x(), m_wheelFrameVel.y()) using computeSlipAngle(), applying the configured thresholds and magnitude clamp. The result is stored in m_slipAngle and used by subsequent force/terrain interaction computations.

◆ updateSlipRatio()

void agxTerrain::TerrainWheelQuantities::updateSlipRatio ( )
protected

Update the cached longitudinal slip ratio.

Computes the slip ratio from the current wheel radius, wheel-frame angular velocity, wheel-frame longitudinal velocity, and the configured slip-ratio settings, then stores the result in m_slipRatio.

◆ updateWheelFrameVelocities()

void agxTerrain::TerrainWheelQuantities::updateWheelFrameVelocities ( const agx::AffineMatrix4x4 &  transform)
protected

Update cached wheel-frame velocities for the current simulation step.

Computes m_wheelFrameVel and m_wheelFrameAngVel by resolving the wheel body's world-space linear and angular velocities into the wheel frame defined by transform. The provided matrix is assumed to map from wheel frame to world (so its inverse is used for the velocity transform).

Parameters
transformTransform from wheel frame to world frame.

Member Data Documentation

◆ AGXTERRAIN_TERRAINWHEEL_STORE_RESTORE_INTERFACE

agxTerrain::TerrainWheelQuantities::AGXTERRAIN_TERRAINWHEEL_STORE_RESTORE_INTERFACE

Definition at line 145 of file TerrainWheelQuantities.h.

◆ m_destructiveAngle

agx::Real agxTerrain::TerrainWheelQuantities::m_destructiveAngle {0.0}
protected

Definition at line 271 of file TerrainWheelQuantities.h.

◆ m_distanceToForceFeedbackHeightfield

agx::Real agxTerrain::TerrainWheelQuantities::m_distanceToForceFeedbackHeightfield {0.0}
protected

Definition at line 325 of file TerrainWheelQuantities.h.

◆ m_frontAngle

agx::Real agxTerrain::TerrainWheelQuantities::m_frontAngle {0.0}
protected

Definition at line 306 of file TerrainWheelQuantities.h.

◆ m_isDriving

agx::Bool agxTerrain::TerrainWheelQuantities::m_isDriving {true}
protected

Definition at line 368 of file TerrainWheelQuantities.h.

◆ m_maximumNormalStressAngle

agx::Real agxTerrain::TerrainWheelQuantities::m_maximumNormalStressAngle {0.0}
protected

Definition at line 283 of file TerrainWheelQuantities.h.

◆ m_rearAngle

agx::Real agxTerrain::TerrainWheelQuantities::m_rearAngle {0.0}
protected

Definition at line 317 of file TerrainWheelQuantities.h.

◆ m_shearModulusLateral

agx::Real agxTerrain::TerrainWheelQuantities::m_shearModulusLateral {0.0}
protected

Definition at line 384 of file TerrainWheelQuantities.h.

◆ m_shearModulusTangential

agx::Real agxTerrain::TerrainWheelQuantities::m_shearModulusTangential {0.0}
protected

Definition at line 376 of file TerrainWheelQuantities.h.

◆ m_sinkageExponent

agx::Real agxTerrain::TerrainWheelQuantities::m_sinkageExponent {0.0}
protected

Definition at line 251 of file TerrainWheelQuantities.h.

◆ m_slipAngle

agx::Real agxTerrain::TerrainWheelQuantities::m_slipAngle {0.0}
protected

Definition at line 296 of file TerrainWheelQuantities.h.

◆ m_slipRatio

agx::Real agxTerrain::TerrainWheelQuantities::m_slipRatio {0.0}
protected

Definition at line 349 of file TerrainWheelQuantities.h.

◆ m_wheel

TerrainWheel* agxTerrain::TerrainWheelQuantities::m_wheel
protected

Definition at line 228 of file TerrainWheelQuantities.h.

◆ m_wheelFrameAngVel

agx::Vec3 agxTerrain::TerrainWheelQuantities::m_wheelFrameAngVel
protected

Definition at line 341 of file TerrainWheelQuantities.h.

◆ m_wheelFrameVel

agx::Vec3 agxTerrain::TerrainWheelQuantities::m_wheelFrameVel
protected

Definition at line 333 of file TerrainWheelQuantities.h.


The documentation for this class was generated from the following file: