Abstract class for turning vehicle inputs into behavior of wheels and steering elements. More...
#include <DriveModel.h>
Inherited by ROS2::VehicleDynamics::AckermannDriveModel, and ROS2::VehicleDynamics::SkidSteeringDriveModel.
Public Types | |
enum class | DriveModelType { SimplifiedDriveModelType } |
Public Member Functions | |
AZ_RTTI (DriveModel, "{1B57E83D-19BF-4403-8712-1AE98A12F0CD}") | |
virtual void | Activate (const VehicleConfiguration &vehicleConfig)=0 |
void | ApplyInputState (const VehicleInputs &inputs, AZ::u64 deltaTimeNs) |
virtual AZStd::pair< AZ::Vector3, AZ::Vector3 > | GetVelocityFromModel ()=0 |
void | SetDisabled (bool isDisable) |
VehicleInputs | GetMaximumPossibleInputs () const |
Get vehicle maximum limits. | |
Static Public Member Functions | |
static void | Reflect (AZ::ReflectContext *context) |
Protected Member Functions | |
virtual const VehicleModelLimits * | GetVehicleLimitPtr () const =0 |
Returns pointer to implementation specific Vehicle limits. | |
virtual void | ApplyState (const VehicleInputs &inputs, AZ::u64 deltaTimeNs)=0 |
Apply input to implemented vehicle model. | |
Protected Attributes | |
bool | m_disabled { false } |
True if model is disabled. | |
Abstract class for turning vehicle inputs into behavior of wheels and steering elements.
|
pure virtual |
Activate the model. Vehicle configuration is to remain the same until another Activate is called.
vehicleConfig | configuration containing axes and wheels information |
Implemented in ROS2::VehicleDynamics::AckermannDriveModel, and ROS2::VehicleDynamics::SkidSteeringDriveModel.
void ROS2::VehicleDynamics::DriveModel::ApplyInputState | ( | const VehicleInputs & | inputs, |
AZ::u64 | deltaTimeNs | ||
) |
Applies inputs to the drive. This model will calculate and apply physical forces.
inputs | captured state of inputs to use. |
deltaTimeNs | nanoseconds passed since last call of this function. |
|
protectedpure virtual |
Apply input to implemented vehicle model.
Implemented in ROS2::VehicleDynamics::AckermannDriveModel, and ROS2::VehicleDynamics::SkidSteeringDriveModel.
|
protectedpure virtual |
Returns pointer to implementation specific Vehicle limits.
Implemented in ROS2::VehicleDynamics::AckermannDriveModel, and ROS2::VehicleDynamics::SkidSteeringDriveModel.
|
pure virtual |
Computes expected velocity from individual wheels velocity. The method queries all wheels for rotation speed, and computes vehicle's expected velocity in its coordinate frame.
Implemented in ROS2::VehicleDynamics::AckermannDriveModel, and ROS2::VehicleDynamics::SkidSteeringDriveModel.
void ROS2::VehicleDynamics::DriveModel::SetDisabled | ( | bool | isDisable | ) |
Allows to disable vehicle dynamics.
isDisable | true if drive model should be disabled. |