Creating User Defined Tire Models
This feature and its public interface are currently in development and have not yet been finalized. As a result, they may change between different releases of Vortex Studio.
We encourage you to keep an eye on this page and consult the release notes for updates regarding any modifications.
Users of Vortex Studio have the capability to create custom tire models by implementing the ITireModel
interface within an extension. If you are unfamiliar with the process of creating extensions in Vortex, we recommend reviewing the following resources for additional information: C++ Tutorial 1: Plugins and Vortex Studio SDK - Customizing Vortex.
Extensions that implement ITireModel
can be added to content in the editor from the toolbox and dragged under a tire type extension alongside other tire models.
User defined tire models are not supported with tire models in the legacy vehicle system.
Â
Two functions of the ITireModel
must be implemented: the getTireForces()
function, which calculates the forces and moments acting on a tire and the getMaterialNames()
function, which returns the names of the materials compatible with the tire model.
/// getTireForces function calculates the forces and moments acting on a tire from the wheelinfo and groundinfo
///
/// Required to implement when creating a custom tire model
///
TIREMODEL_SYMBOL virtual TireForces getTireForces(const WheelInfo& wheel, const GroundInfo& ground, const double normalForce) = 0;
/// getMaterialNames returns the materials compatible with the tire model
///
/// required to implement when creating a custom tire model
///
TIREMODEL_SYMBOL virtual Vx::VxArray<std::string> getMaterialNames() = 0;
Tire Forces
Tire forces are computed in the function getTireForces()
which must be implemented by the user. This function will be called for each wheel contact at every time step during the simulation. The forces will be applied to the wheel through constraint bounds.
Here is a code snippet of the TireForces
struct.
/// Struct for holding wheel forces information, for use in the calculateForces function
///
/// External users who implement a tire model will fill this function as output for the calculateForces function.
struct TireForces
{
double tractionForce = 0.0; // The traction force along the longitudinal axis of the wheel applied at the contact point.
double corneringForce = 0.0; // The cornering force along the laterial axis of the wheel applied at the contact point.
double resistanceForce = 0.0; // The resistance force along the logitudinal axis of the wheel applied at the wheel center.
double aligningMoment = 0.0; // The aligning moment along the vertical axis of the wheel.
double compactionResistanceTorque = 0.0; // The compaction resistance torque along the lateral axis of the wheel due to ground compaction.
double tireDeformationRollingResistance = 0.0; // The tire deformaction rolling resistance torque along the lateral axis of the wheel. Applied through residualResistanceTorque.
double residualResistanceTorque = 0.0; //The total residual torque rolling resistance from soil deformation along the lateral axis of the wheel.
};
To compute tire forces, the WheelInfo
, GroundInfo
and normalForce
are provided as parameters to the function.
Here is a code snippet of the WheelInfo
struct.
/// Struct for holding wheel information, for use in the calculateForces function
///
/// External users who implement a tire model will receive this struct as input to the calculateForces function.
struct WheelInfo
{
Vx::VxTransform transform; // The transform of the wheel part. It is assumed that the rolling axis of the wheel is the y axis.
VxMath::Vector3 worldLinearVelocity; // The linear velocity of the wheel center expressed in the world frame.
VxMath::Vector3 worldAngularVelocity; // The angular velocity of the wheel expressed in the world frame.
double radius; // The wheel radius.
double width; // The wheel width.
double tirePressure; // The tire pressure.
double tireStiffness; // The tire stiffness.
};
Here is a code snippet of the GroudInfoStruct.
The normal force is the total normal force from the previous time step.
Ground Materials
Each tire model is associated with a specific set of ground materials for which it is designed. Generally, an extension that implements the ITireModel
interface should provide an array of material fields as part of its inputs. The method getMaterialNames()
is expected to return a list of the names of these materials.
Â