FSimpleWheelSim

Wheel instance data changes during the simulation

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

TVehicleSystem

FSimpleWheelSim

References

Module

ChaosVehiclesCore

Header

/Engine/Source/Runtime/Experimental/ChaosVehicles/ChaosVehiclesCore/Public/WheelSystem.h

Include

#include "WheelSystem.h"

Syntax

class FSimpleWheelSim : public TVehicleSystem< FSimpleWheelConfig >

Remarks

Wheel instance data changes during the simulation

Variables

Name Description

Public variable

bool

 

ABSEnabled

Public variable

float

 

AngularPosition

Public variable

float

 

AppliedLinearBrakeForce

Public variable

float

 

AppliedLinearDriveForce

Debug for now

Public variable

float

 

AvailableGrip

Public variable

bool

 

bClipping

Public variable

bool

 

bEngineBraking

Public variable

bool

 

bInContact

Public variable

bool

 

BrakeEnabled

Public variable

float

 

BrakeTorque

Public variable

float

 

CorneringStiffness

Public variable

float

 

DriveTorque

In.

Public variable

bool

 

EngineEnabled

Public variable

FVector

 

ForceFromFriction

Public variable

float

 

ForceIntoSurface

Public variable

float

 

FrictionMultiplier

Public variable

FVector

 

GroundVelocityVector

Public variable

bool

 

HandbrakeEnabled

Public variable

float

 

HandbrakeTorque

Public variable

float

 

Inertia

Public variable

FVector

 

InputForces

Public variable

float

 

LateralAdhesiveLimit

Public variable

float

 

LateralSlipGraphMultiplier

Public variable

float

 

LongitudinalAdhesiveLimit

Public variable

float

 

MassPerWheel

Public variable

float

 

MaxBrakeTorque

Public variable

float

 

MaxOmega

Public variable

float

 

MaxSteeringAngle

Public variable

float

 

Omega

Public variable

float

 

Re

Public variable

float

 

SideSlipModifier

Public variable

float

 

SlipAngle

Public variable

float

 

SlipVelocity

Public variable

float

 

Spin

Public variable

float

 

SteeringAngle

Public variable

bool

 

SteeringEnabled

Public variable

float

 

SurfaceFriction

Public variable

float

 

Sx

Public variable

bool

 

TractionControlEnabled

Public variable

uint32

 

WheelIndex

Constructors

Name Description

Public function

FSimpleWheelSim

(
    const FSimpleWheelConfig* Setu...
)

Functions

Name Description

Public function Const

float

 

GetAngularPosition()

Get the angular position of the wheel [radians]

Public function Const

float

 

GetAngularVelocity()

Get the angular velocity of the wheel [radians/sec]

Public function Const

float

 

GetBrakeTorque()

Get the braking torque being applied to the wheel [N.m]

Public function Const

float

 

GetDriveTorque()

Get the drive torque being applied to the wheel [N.m]

Public function Const

float

 

GetEffectiveRadius()

Get the radius of the wheel [cm]

Public function Const

FVector

 

GetForceFromFriction()

Return the calculated available friction force

Public function Static

float

 

GetNormalisedFrictionFromSlipAngle

(
    float SlipIn
)

Amount of friction we can expect after taking into account the amount the wheel slips

Public function Const

float

 

GetNormalizedLateralSlip()

Public function Const

float

 

GetNormalizedLongitudinalSlip()

Get the current longitudinal slip value [0 no slip - using static friction, 1 full slip - using dynamic friction]

Public function Const

float

 

GetRoadSpeed()

Get the road speed at the wheel

Public function Const

float

 

GetSkidMagnitude()

Get the effective ground speed along the lateral wheel axis positive if wheel is faster than effective ground speed, negative if wheel is slower

Public function Const

float

 

GetSlipAngle()

Get the slip angle for this wheel - angle between wheel forward axis and velocity vector [degrees]

Public function Const

float

 

GetSlipMagnitude()

Get the difference between the wheel speed and the effective ground speed of the vehicle at the wheel positive if wheel is faster than effective ground speed, negative if wheel is slower

Public function Const

float

 

GetSteeringAngle()

Public function Const

float

 

GetSurfaceFriction()

Get the friction coefficient of the surface in contact with the wheel

Public function Const

float

 

GetWheelGroundSpeed()

Get the linear ground speed of the wheel based on its current rotational speed

Public function Const

float

 

GetWheelLoadForce()

Get the magnitude of the force pressing the wheel into the terrain

Public function

float

 

GetWheelRPM()

Get the wheel RPM [revolutions per minute]

Public function Const

bool

 

InContact()

Is the wheel in contact with the terrain or another object

Public function Const

bool

 

IsSkidding()

Public function Const

bool

 

IsSlipping()

Public function

void

 

SetAngularPosition

(
    float PositionIn
)

Set the angular position in radians

Public function

void

 

SetAngularVelocity

(
    float AngularVelocityIn
)

Set the angular position in radians/sec

Public function

void

 

SetBrakeTorque

(
    float BrakeTorqueIn,
    bool bEngineBrakingIn
)

Set the braking torque - decelerating rotational force

Public function

void

 

SetDriveTorque

(
    float EngineTorqueIn
)

Set the drive torque - accelerating rotational force

Public function

void

 

SetMassPerWheel

(
    float VehicleMassPerWheel
)

Public function

void

 

SetMatchingSpeed

(
    float LinearMetersPerSecondIn
)

Set wheel rotational speed to match the specified linear forwards speed

Public function

void

 

SetMaxOmega

(
    float InMaxOmega
)

Public function

void

 

SetOnGround

(
    bool OnGround
)

Public function

void

 

SetSteeringAngle

(
    float InAngle
)

Public function

void

 

SetSurfaceFriction

(
    float InFriction
)

Set the friction coefficient of the surface under the wheel

Public function

void

 

SetVehicleGroundSpeed

(
    const FVector& VIn
)

Set the vehicle's speed at the wheels location in local wheel coords

Public function

void

 

SetWheelIndex

(
    uint32 InIndex
)

Public function

void

 

SetWheelLoadForce

(
    float WheelLoadForceIn
)

Set the force pressing the wheel into the terrain - from suspension

Public function

void

 

SetWheelRadius

(
    float NewRadius
)

Set the wheel radius - can change dynamically during simulation if desired

Public function

void

 

Simulate

(
    float DeltaTime
)

Simulate - figure out wheel lateral and longitudinal forces based on available friction at the wheel Wheel load force from body weight and the surface friction together determine the grip available at the wheel DriveTorque accelerates the wheel BrakeTorque decelerates the wheel