|
Nav2 Navigation Stack - lyrical
lyrical
ROS 2 Navigation Stack
|
Abstract pluginlib class for modeling a vehicle. More...
#include <nav2_mppi_controller/include/nav2_mppi_controller/motion_models.hpp>


Public Member Functions | |
| MotionModel ()=default | |
| Constructor for mppi::MotionModel. | |
| virtual | ~MotionModel ()=default |
| Destructor for mppi::MotionModel. | |
| virtual void | initialize (ParametersHandler *, const std::string &) |
| Initialize motion model on bringup. More... | |
| 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... | |
| virtual bool | isHolonomic () const =0 |
| Whether the motion model is holonomic, using Y axis. More... | |
| virtual void | applyConstraints (models::ControlSequence &) |
| Apply hard vehicle constraints to a control sequence. More... | |
Protected Member Functions | |
| 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 | |
| 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 | |
| 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_ |
Abstract pluginlib class for modeling a vehicle.
Definition at line 39 of file motion_models.hpp.
|
inlinevirtual |
Apply hard vehicle constraints to a control sequence.
| control_sequence | Control sequence to apply constraints to |
Reimplemented in mppi::AckermannMotionModel.
Definition at line 179 of file motion_models.hpp.
|
inlineprotected |
Apply the per-axis input-delay shift to velocity rollout.
For j in [1, offset) — the delay window — fill dst with history[j]
Definition at line 187 of file motion_models.hpp.
Referenced by predict().

|
inlinevirtual |
Initialize motion model on bringup.
| param_handler | Pointer to the shared parameters handler |
| plugin_name | Namespaced name of this plugin instance |
Reimplemented in mppi::AckermannMotionModel.
Definition at line 57 of file motion_models.hpp.
|
pure virtual |
Whether the motion model is holonomic, using Y axis.
Implemented in mppi::OmniMotionModel, mppi::DiffDriveMotionModel, and mppi::AckermannMotionModel.
Referenced by predict().

|
inlinevirtual |
With input velocities, find the vehicle's output velocities.
| state | Contains control velocities to use to populate vehicle velocities |
Definition at line 108 of file motion_models.hpp.
References applyDelayShift(), and isHolonomic().

|
inline |
Initialize motion model on bringup and set required variables.
| control_constraints | Constraints on control |
| model_dt | duration of a time step |
Definition at line 67 of file motion_models.hpp.
References offsetSteps().

|
protected |
Definition at line 250 of file motion_models.hpp.