Class MotionModel

Inheritance Relationships

Derived Types

Class Documentation

class MotionModel

Abstract motion model for modeling a vehicle.

Subclassed by mppi::AckermannMotionModel, mppi::DiffDriveMotionModel, mppi::OmniMotionModel

Public Functions

MotionModel() = default

Constructor for mppi::MotionModel.

virtual ~MotionModel() = default

Destructor for mppi::MotionModel.

inline void initialize(const models::ControlConstraints &control_constraints, float model_dt)

Initialize motion model on bringup and set required variables.

Parameters:
  • control_constraints – Constraints on control

  • model_dt – duration of a time step

inline virtual void predict(models::State &state)

With input velocities, find the vehicle’s output velocities.

Parameters:

state – Contains control velocities to use to populate vehicle velocities

virtual bool isHolonomic() = 0

Whether the motion model is holonomic, using Y axis.

Returns:

Bool If holonomic

inline virtual void applyConstraints(models::ControlSequence&)

Apply hard vehicle constraints to a control sequence.

Parameters:

control_sequence – Control sequence to apply constraints to

Protected Attributes

float model_dt_ = {0.0}
models::ControlConstraints control_constraints_{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}