Nav2 Navigation Stack - lyrical  lyrical
ROS 2 Navigation Stack
Public Member Functions | List of all members
mppi::AckermannMotionModel Class Reference

Ackermann motion model. More...

#include <nav2_mppi_controller/include/nav2_mppi_controller/motion_models.hpp>

Inheritance diagram for mppi::AckermannMotionModel:
Inheritance graph
[legend]
Collaboration diagram for mppi::AckermannMotionModel:
Collaboration graph
[legend]

Public Member Functions

 AckermannMotionModel ()=default
 Constructor for mppi::AckermannMotionModel.
 
void initialize (ParametersHandler *param_handler, const std::string &plugin_name) override
 Initialize motion model. More...
 
bool isHolonomic () const override
 Whether the motion model is holonomic, using Y axis. More...
 
void applyConstraints (models::ControlSequence &control_sequence) override
 Apply hard vehicle constraints to a control sequence. More...
 
float getMinTurningRadius () const
 Get minimum turning radius of ackermann drive. More...
 
- Public Member Functions inherited from mppi::MotionModel
 MotionModel ()=default
 Constructor for mppi::MotionModel.
 
virtual ~MotionModel ()=default
 Destructor for mppi::MotionModel.
 
void setConstraints (const models::ControlConstraints &control_constraints, float model_dt, float model_delay_vx, float model_delay_vy, float model_delay_wz, bool clamp_raw_controls)
 Initialize motion model on bringup and set required variables. More...
 
void pushCommandHistory (float vx, float vy, float wz)
 Push the most recently published command to the per-axis history ring buffers. Called once per controller cycle from the optimizer.
 
void clearCommandHistory ()
 Zero the ring buffers.
 
virtual void predict (models::State &state)
 With input velocities, find the vehicle's output velocities. More...
 

Additional Inherited Members

- Protected Member Functions inherited from mppi::MotionModel
void applyDelayShift (models::State &state, bool is_holo, unsigned int offset_vx, unsigned int offset_vy, unsigned int offset_wz) const
 Apply the per-axis input-delay shift to velocity rollout. More...
 
std::size_t offsetSteps (float delay) const
 Convert a delay in seconds to an offset in number of rollout steps, rounding to the nearest step.
 
- Static Protected Member Functions inherited from mppi::MotionModel
static void pushOne (std::vector< float > &buf, float v)
 Push a value to the back of a ring buffer and rotate the elements.
 
- Protected Attributes inherited from mppi::MotionModel
float model_dt_ {0.0}
 
float model_delay_vx_ {0.0}
 
float model_delay_vy_ {0.0}
 
float model_delay_wz_ {0.0}
 
bool clamp_raw_controls_ {false}
 
std::vector< float > cmd_history_vx_
 
std::vector< float > cmd_history_vy_
 
std::vector< float > cmd_history_wz_
 
models::ControlConstraints control_constraints_
 

Detailed Description

Ackermann motion model.

Definition at line 258 of file motion_models.hpp.

Member Function Documentation

◆ applyConstraints()

void mppi::AckermannMotionModel::applyConstraints ( models::ControlSequence control_sequence)
inlineoverridevirtual

Apply hard vehicle constraints to a control sequence.

Parameters
control_sequenceControl sequence to apply constraints to

Reimplemented from mppi::MotionModel.

Definition at line 292 of file motion_models.hpp.

◆ getMinTurningRadius()

float mppi::AckermannMotionModel::getMinTurningRadius ( ) const
inline

Get minimum turning radius of ackermann drive.

Returns
Minimum turning radius

Definition at line 303 of file motion_models.hpp.

◆ initialize()

void mppi::AckermannMotionModel::initialize ( ParametersHandler param_handler,
const std::string &  plugin_name 
)
inlineoverridevirtual

Initialize motion model.

Parameters
param_handlerPointer to the shared parameters handler
plugin_nameNamespaced name of this plugin instance

Reimplemented from mppi::MotionModel.

Definition at line 271 of file motion_models.hpp.

References mppi::ParametersHandler::getParamGetter().

Here is the call graph for this function:

◆ isHolonomic()

bool mppi::AckermannMotionModel::isHolonomic ( ) const
inlineoverridevirtual

Whether the motion model is holonomic, using Y axis.

Returns
Bool If holonomic

Implements mppi::MotionModel.

Definition at line 283 of file motion_models.hpp.


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