AGX Dynamics  2.37.2.0
agxVehicle::TrackProperties Class Reference

Object containing properties of an agxVehicle::Track. More...

#include <TrackProperties.h>

+ Inheritance diagram for agxVehicle::TrackProperties:

Public Member Functions

 TrackProperties ()
 Default constructor - all flags and values are set do default. More...
 
const char * getClassName () const override
 
agx::Bool getEnableHingeRange () const
 
agx::Bool getEnableOnInitializeMergeNodesToWheels () const
 
agx::Bool getEnableOnInitializeTransformNodesToWheels () const
 
agx::Real getHingeCompliance (agx::Hinge::DOF dof) const
 
agx::Real getHingeDamping (agx::Hinge::DOF dof) const
 
agx::RangeReal getHingeRangeRange () const
 
agx::Real getMinStabilizingHingeNormalForce () const
 
agx::Real getNodesToWheelsMergeThreshold () const
 
agx::Real getNodesToWheelsSplitThreshold () const
 
agx::UInt getNumNodesIncludedInAverageDirection () const
 
agx::Real getStabilizingHingeFrictionParameter () const
 
agxStream::StorageAgent * getStorageAgent () const override
 
agx::Real getTransformNodesToWheelsOverlap () const
 
void resetToDefault ()
 Resets all flags and values to default. More...
 
virtual void restore (agxStream::InputArchive &in) override
 
void setEnableHingeRange (agx::Bool enable)
 True to enable the range in the hinges between the track nodes to define how the track may bend. More...
 
void setEnableOnInitializeMergeNodesToWheels (agx::Bool enable)
 When the track has been initialized some nodes are in contact with the wheels. More...
 
void setEnableOnInitializeTransformNodesToWheels (agx::Bool enable)
 True to position/transform the track nodes to the surface of the wheels after the track has been initialized. More...
 
void setHingeCompliance (agx::Real compliance)
 Assign compliance (for all hinge degrees of freedom) used in the hinges between track nodes. More...
 
void setHingeCompliance (agx::Real compliance, agx::Hinge::DOF dof)
 Assign compliance for a given degree of freedom in the hinges between track nodes. More...
 
void setHingeComplianceRotational (agx::Real compliance)
 Assign compliance for the rotational degrees of freedom in the hinges between track nodes. More...
 
void setHingeComplianceTranslational (agx::Real compliance)
 Assign compliance for the translational degrees of freedom in the hinges between track nodes. More...
 
void setHingeDamping (agx::Real damping)
 Assign damping (for all hinge degrees of freedom) used in the hinges between track nodes. More...
 
void setHingeDamping (agx::Real damping, agx::Hinge::DOF dof)
 Assign damping for a given degree of freedom in the hinges between track nodes. More...
 
void setHingeDampingRotational (agx::Real damping)
 Assign damping for the rotational degrees of freedom in the hinges between track nodes. More...
 
void setHingeDampingTranslational (agx::Real damping)
 Assign damping for the translational degrees of freedom in the hinges between track nodes. More...
 
void setHingeRangeRange (agx::Real lowerAngle, agx::Real upperAngle)
 Assign range used if the hinge range between the nodes are enabled. More...
 
void setMinStabilizingHingeNormalForce (agx::Real minNormalForce)
 Minimum value of the normal force (the hinge force along the track) used in "internal" friction calculations. More...
 
void setNodesToWheelsMergeThreshold (agx::Real mergeThreshold)
 Threshold when to merge a node to a wheel. More...
 
void setNodesToWheelsSplitThreshold (agx::Real splitThreshold)
 Threshold when to split a node from a wheel. More...
 
void setNumNodesIncludedInAverageDirection (agx::UInt numIncludedNodes)
 Average direction of non-merged nodes entering or exiting a wheel is used as reference direction to split of a merged node. More...
 
void setStabilizingHingeFrictionParameter (agx::Real frictionParameter)
 Friction parameter of the internal friction in the node hinges. More...
 
void setTransformNodesToWheelsOverlap (agx::Real overlap)
 When the nodes are transformed to the wheels, this is the final target overlap. More...
 
virtual void store (agxStream::OutputArchive &out) const override
 
void updateComplianceDamping (agx::Hinge &hinge) const
 Writes compliance and damping to the given hinge instance. More...
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor. More...
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object. More...
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings. More...
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object. More...
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More...
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 

Static Public Member Functions

static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 

Protected Types

using Flags = agx::BitState< FlagsEnum, agx::UInt32 >
 
enum  FlagsEnum : agx::UInt32 { ON_INITIALIZE_MERGE_NODES_TO_WHEELS = 1 << 0, ON_INITIALIZE_TRANSFORM_NODES_TO_WHEELS = 1 << 1, HINGE_RANGE_ENABLED = 1 << 2 }
 
enum  RealValue : agx::UInt {
  HINGE_RANGE_LOWER, HINGE_RANGE_UPPER, NODE_TO_WHEEL_OVERLAP, NODE_TO_WHEEL_MERGE_THRESHOLD,
  NODE_TO_WHEEL_SPLIT_THRESHOLD, NUM_NODES_IN_AVERAGE_DIRECTION, MIN_STABILIZING_NORMAL_FORCE, STABILIZING_FRICTION_PARAMETER,
  NUM_REAL_VALUES
}
 
using RealValues = agx::RealVector
 

Protected Member Functions

virtual ~TrackProperties ()
 Reference counted object - protected destructor. More...
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor. More...
 
 Serializable (const Serializable &other)
 Copy constructor. More...
 
void generateUuid ()
 

Additional Inherited Members

- 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. More...
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Object containing properties of an agxVehicle::Track.

Definition at line 32 of file TrackProperties.h.

Member Typedef Documentation

◆ Flags

using agxVehicle::TrackProperties::Flags = agx::BitState<FlagsEnum, agx::UInt32>
protected

Definition at line 254 of file TrackProperties.h.

◆ RealValues

Definition at line 268 of file TrackProperties.h.

Member Enumeration Documentation

◆ FlagsEnum

Enumerator
ON_INITIALIZE_MERGE_NODES_TO_WHEELS 
ON_INITIALIZE_TRANSFORM_NODES_TO_WHEELS 
HINGE_RANGE_ENABLED 

Definition at line 248 of file TrackProperties.h.

◆ RealValue

Enumerator
HINGE_RANGE_LOWER 
HINGE_RANGE_UPPER 
NODE_TO_WHEEL_OVERLAP 
NODE_TO_WHEEL_MERGE_THRESHOLD 
NODE_TO_WHEEL_SPLIT_THRESHOLD 
NUM_NODES_IN_AVERAGE_DIRECTION 
MIN_STABILIZING_NORMAL_FORCE 
STABILIZING_FRICTION_PARAMETER 
NUM_REAL_VALUES 

Definition at line 256 of file TrackProperties.h.

Constructor & Destructor Documentation

◆ TrackProperties()

agxVehicle::TrackProperties::TrackProperties ( )

Default constructor - all flags and values are set do default.

◆ ~TrackProperties()

virtual agxVehicle::TrackProperties::~TrackProperties ( )
protectedvirtual

Reference counted object - protected destructor.

Member Function Documentation

◆ create() [1/2]

static agxStream::Serializable* agxVehicle::TrackProperties::create ( )
inlinestatic

Definition at line 245 of file TrackProperties.h.

◆ create() [2/2]

static agxStream::Serializable* agxVehicle::TrackProperties::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 245 of file TrackProperties.h.

◆ getClassName()

const char* agxVehicle::TrackProperties::getClassName ( ) const
inlineoverridevirtual
Returns
the class name of this class.

Reimplemented from agxStream::Serializable.

Definition at line 245 of file TrackProperties.h.

◆ getConstructClassId()

static const char* agxVehicle::TrackProperties::getConstructClassId ( )
inlinestatic

Definition at line 245 of file TrackProperties.h.

◆ getEnableHingeRange()

agx::Bool agxVehicle::TrackProperties::getEnableHingeRange ( ) const
inline
Returns
true if the hinge ranges are enabled between the track nodes

Definition at line 293 of file TrackProperties.h.

◆ getEnableOnInitializeMergeNodesToWheels()

agx::Bool agxVehicle::TrackProperties::getEnableOnInitializeMergeNodesToWheels ( ) const
Returns
true if initial merge is enabled, false if disabled

◆ getEnableOnInitializeTransformNodesToWheels()

agx::Bool agxVehicle::TrackProperties::getEnableOnInitializeTransformNodesToWheels ( ) const
Returns
true if initial transform of nodes to wheels is enabled, false if disabled

◆ getHingeCompliance()

agx::Real agxVehicle::TrackProperties::getHingeCompliance ( agx::Hinge::DOF  dof) const
inline
Returns
the compliance used in the hinges between track nodes

Definition at line 283 of file TrackProperties.h.

◆ getHingeDamping()

agx::Real agxVehicle::TrackProperties::getHingeDamping ( agx::Hinge::DOF  dof) const
inline
Returns
the damping used in the hinges between track nodes

Definition at line 288 of file TrackProperties.h.

◆ getHingeRangeRange()

agx::RangeReal agxVehicle::TrackProperties::getHingeRangeRange ( ) const
inline
Returns
the hinge range

Definition at line 298 of file TrackProperties.h.

◆ getMinStabilizingHingeNormalForce()

agx::Real agxVehicle::TrackProperties::getMinStabilizingHingeNormalForce ( ) const
Returns
the minimum normal force to calculate internal friction in the node hinges (default: 100)

◆ getNodesToWheelsMergeThreshold()

agx::Real agxVehicle::TrackProperties::getNodesToWheelsMergeThreshold ( ) const
Returns
node to wheel merge threshold

◆ getNodesToWheelsSplitThreshold()

agx::Real agxVehicle::TrackProperties::getNodesToWheelsSplitThreshold ( ) const
Returns
node to wheel split threshold

◆ getNumNodesIncludedInAverageDirection()

agx::UInt agxVehicle::TrackProperties::getNumNodesIncludedInAverageDirection ( ) const
Returns
the number of nodes included in node average direction calculations

◆ getStabilizingHingeFrictionParameter()

agx::Real agxVehicle::TrackProperties::getStabilizingHingeFrictionParameter ( ) const
Returns
normal force scale parameter

◆ getStorageAgent()

agxStream::StorageAgent* agxVehicle::TrackProperties::getStorageAgent ( ) const
inlineoverridevirtual
Returns
the storage agent

Implements agxStream::Serializable.

Definition at line 245 of file TrackProperties.h.

◆ getTransformNodesToWheelsOverlap()

agx::Real agxVehicle::TrackProperties::getTransformNodesToWheelsOverlap ( ) const
Returns
the target overlap when transforming nodes to wheels

◆ resetToDefault()

void agxVehicle::TrackProperties::resetToDefault ( )

Resets all flags and values to default.

◆ restore()

virtual void agxVehicle::TrackProperties::restore ( agxStream::InputArchive &  in)
overridevirtual

◆ setEnableHingeRange()

void agxVehicle::TrackProperties::setEnableHingeRange ( agx::Bool  enable)

True to enable the range in the hinges between the track nodes to define how the track may bend.

Parameters
enable- true to enable, false to disable (default: true)

◆ setEnableOnInitializeMergeNodesToWheels()

void agxVehicle::TrackProperties::setEnableOnInitializeMergeNodesToWheels ( agx::Bool  enable)

When the track has been initialized some nodes are in contact with the wheels.

If this flag is true the interacting nodes will be merged to the wheel directly after initialize, if false the nodes will be merged during the first (or later) time step.

Parameters
enable- true to enable, false to disable (default: false)

◆ setEnableOnInitializeTransformNodesToWheels()

void agxVehicle::TrackProperties::setEnableOnInitializeTransformNodesToWheels ( agx::Bool  enable)

True to position/transform the track nodes to the surface of the wheels after the track has been initialized.

When false, the routing algorithm positions are used.

Parameters
enable- true to enable, false to disable (default: true)

◆ setHingeCompliance() [1/2]

void agxVehicle::TrackProperties::setHingeCompliance ( agx::Real  compliance)

Assign compliance (for all hinge degrees of freedom) used in the hinges between track nodes.

Parameters
compliance- new compliance (default: 1.0E-10)

◆ setHingeCompliance() [2/2]

void agxVehicle::TrackProperties::setHingeCompliance ( agx::Real  compliance,
agx::Hinge::DOF  dof 
)

Assign compliance for a given degree of freedom in the hinges between track nodes.

Parameters
compliance- new compliance (default: 1.0E-10)
dof- hinge degree of freedom

◆ setHingeComplianceRotational()

void agxVehicle::TrackProperties::setHingeComplianceRotational ( agx::Real  compliance)

Assign compliance for the rotational degrees of freedom in the hinges between track nodes.

Parameters
compliance- new compliance (default: 1.0E-10)

◆ setHingeComplianceTranslational()

void agxVehicle::TrackProperties::setHingeComplianceTranslational ( agx::Real  compliance)

Assign compliance for the translational degrees of freedom in the hinges between track nodes.

Parameters
compliance- new compliance (default: 1.0E-10)

◆ setHingeDamping() [1/2]

void agxVehicle::TrackProperties::setHingeDamping ( agx::Real  damping)

Assign damping (for all hinge degrees of freedom) used in the hinges between track nodes.

Parameters
damping- new damping (default: 0.0333)

◆ setHingeDamping() [2/2]

void agxVehicle::TrackProperties::setHingeDamping ( agx::Real  damping,
agx::Hinge::DOF  dof 
)

Assign damping for a given degree of freedom in the hinges between track nodes.

Parameters
damping- new damping (default: 0.0333)
dof- hinge degree of freedom

◆ setHingeDampingRotational()

void agxVehicle::TrackProperties::setHingeDampingRotational ( agx::Real  damping)

Assign damping for the rotational degrees of freedom in the hinges between track nodes.

Parameters
damping- new damping (default: 0.0333)

◆ setHingeDampingTranslational()

void agxVehicle::TrackProperties::setHingeDampingTranslational ( agx::Real  damping)

Assign damping for the translational degrees of freedom in the hinges between track nodes.

Parameters
damping- new damping (default: 0.0333)

◆ setHingeRangeRange()

void agxVehicle::TrackProperties::setHingeRangeRange ( agx::Real  lowerAngle,
agx::Real  upperAngle 
)

Assign range used if the hinge range between the nodes are enabled.

Parameters
lowerAngle- lower angle in radians, begin of range (default: -2 pi / 3)
upperAngle- upper angle in radians, end of range (default: degreesToRadians( 20 ))

◆ setMinStabilizingHingeNormalForce()

void agxVehicle::TrackProperties::setMinStabilizingHingeNormalForce ( agx::Real  minNormalForce)

Minimum value of the normal force (the hinge force along the track) used in "internal" friction calculations.

I.e., when the track is compressed, this value is used with the friction coefficient as a minimum stabilizing compliance. If this value is negative there will be stabilization when the track is compressed. Default: 100.

Parameters
minNormalForce- minimum normal force to calculate internal friction in the node hinges

◆ setNodesToWheelsMergeThreshold()

void agxVehicle::TrackProperties::setNodesToWheelsMergeThreshold ( agx::Real  mergeThreshold)

Threshold when to merge a node to a wheel.

Given a reference direction in the track, this value is the projection of the deviation (from the reference direction) of the node direction onto the wheel radial direction vector. I.e., when the projection is negative the node can be considered "wrapped" on the wheel. Default value: -0.1.

Parameters
mergeThreshold- merge threshold (default: -0.1)

◆ setNodesToWheelsSplitThreshold()

void agxVehicle::TrackProperties::setNodesToWheelsSplitThreshold ( agx::Real  splitThreshold)

Threshold when to split a node from a wheel.

Given a reference direction in the track, this value is the projection of the deviation (from the reference direction) of the node direction onto the wheel radial direction vector. I.e., when the projection is negative the node can be considered "wrapped" on the wheel. Default value: -0.05.

Parameters
splitThreshold- split threshold (default: -0.05)

◆ setNumNodesIncludedInAverageDirection()

void agxVehicle::TrackProperties::setNumNodesIncludedInAverageDirection ( agx::UInt  numIncludedNodes)

Average direction of non-merged nodes entering or exiting a wheel is used as reference direction to split of a merged node.

This is the number of nodes to include into this average direction.

Parameters
numIncludedNodes- number of nodes to include in average direction (default: 3)

◆ setStabilizingHingeFrictionParameter()

void agxVehicle::TrackProperties::setStabilizingHingeFrictionParameter ( agx::Real  frictionParameter)

Friction parameter of the internal friction in the node hinges.

This parameter scales the normal force in the hinge. Default: 1.0

Note
This parameter can not be identified as a real friction coefficient when it's used to stabilize tracks under tension.
Parameters
frictionParameter- normal force scale parameter

◆ setTransformNodesToWheelsOverlap()

void agxVehicle::TrackProperties::setTransformNodesToWheelsOverlap ( agx::Real  overlap)

When the nodes are transformed to the wheels, this is the final target overlap.

Parameters
overlap- target overlap (default: 1.0E-3)

◆ store()

virtual void agxVehicle::TrackProperties::store ( agxStream::OutputArchive &  out) const
overridevirtual

◆ updateComplianceDamping()

void agxVehicle::TrackProperties::updateComplianceDamping ( agx::Hinge &  hinge) const

Writes compliance and damping to the given hinge instance.

Parameters
hinge- hinge to write compliance and damping to

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