Autoware.Auto
|
|
A wrapper around an autogenerated mpc solver for vehicle dynamics control. More...
#include <mpc_controller.hpp>
Public Types | |
using | Command = autoware_auto_vehicle_msgs::msg::VehicleControlCommand |
using | State = autoware_auto_vehicle_msgs::msg::VehicleKinematicState |
using | Trajectory = autoware_auto_planning_msgs::msg::Trajectory |
Public Member Functions | |
MpcController (const MpcController &)=delete | |
MpcController (MpcController &&) noexcept=delete | |
MpcController & | operator= (const MpcController &)=delete |
MpcController & | operator= (MpcController &&) noexcept=delete |
MpcController (const Config &config) | |
Constructor. More... | |
~MpcController () override=default | |
const Config & | get_config () const |
Getter for config class. More... | |
void | set_config (const Config &config) |
Setter for config class. More... | |
const Trajectory & | get_computed_trajectory () const noexcept |
ControlDerivatives | get_computed_control_derivatives () const noexcept |
Get derivatives computed from the control problem. More... | |
void | debug_print (std::ostream &out) const |
Debug printing. More... | |
std::string | name () const override |
Get name of algorithm, for debugging or diagnostic purposes. More... | |
Index | get_compute_iterations () const override |
Get name of algorithm, for debugging or diagnostic purposes. More... | |
Public Member Functions inherited from motion::control::controller_common::ControllerBase | |
ControllerBase (const BehaviorConfig &config) | |
Constructors. More... | |
ControllerBase (const ControllerBase &)=default | |
ControllerBase (ControllerBase &&)=default | |
ControllerBase & | operator= (const ControllerBase &)=default |
ControllerBase & | operator= (ControllerBase &&)=default |
virtual | ~ControllerBase () noexcept=default |
void | set_trajectory (const Trajectory &trajectory) |
const Trajectory & | get_reference_trajectory () const noexcept |
Getter for reference trajectory. More... | |
Command | compute_command (const State &state) |
Command | compute_stop_command (const State &state) const noexcept |
Computes stopping control command. More... | |
Index | get_current_state_spatial_index () const |
Index | get_current_state_temporal_index () const |
const BehaviorConfig & | get_base_config () const noexcept |
Static Public Attributes | |
constexpr static std::chrono::nanoseconds | solver_time_step {std::chrono::milliseconds{100LL}} |
Protected Member Functions | |
bool | check_new_trajectory (const Trajectory &trajectory) const override |
Checks trajectory. More... | |
const Trajectory & | handle_new_trajectory (const Trajectory &trajectory) override |
Sets reference trajectory. More... | |
Command | compute_command_impl (const State &state) override |
Actually compute the control command. More... | |
Protected Member Functions inherited from motion::control::controller_common::ControllerBase | |
virtual bool | check_new_trajectory (const Trajectory &trajectory) const |
virtual const Trajectory & | handle_new_trajectory (const Trajectory &trajectory) |
virtual Command | compute_command_impl (const State &state)=0 |
Actually compute the control command. More... | |
Point | predict (const Point &point, std::chrono::nanoseconds dt) noexcept |
Get a predicted state based on given state. More... | |
void | set_base_config (const BehaviorConfig &config) noexcept |
Config getters and setters. More... | |
A wrapper around an autogenerated mpc solver for vehicle dynamics control.
using motion::control::mpc_controller::MpcController::Command = autoware_auto_vehicle_msgs::msg::VehicleControlCommand |
using motion::control::mpc_controller::MpcController::State = autoware_auto_vehicle_msgs::msg::VehicleKinematicState |
using motion::control::mpc_controller::MpcController::Trajectory = autoware_auto_planning_msgs::msg::Trajectory |
|
delete |
|
deletenoexcept |
|
explicit |
Constructor.
|
overridedefault |
|
overrideprotected |
Checks trajectory.
|
overrideprotected |
Actually compute the control command.
void motion::control::mpc_controller::MpcController::debug_print | ( | std::ostream & | out | ) | const |
Debug printing.
|
overridevirtual |
Get name of algorithm, for debugging or diagnostic purposes.
Reimplemented from motion::control::controller_common::ControllerBase.
|
noexcept |
Get derivatives computed from the control problem.
|
noexcept |
Get trajectory plan computed as a result of solving the optimization problem. This method triggers the rather expensive copy from the solved vector to the trajectory representation
const Config & motion::control::mpc_controller::MpcController::get_config | ( | ) | const |
Getter for config class.
|
overrideprotected |
Sets reference trajectory.
|
overridevirtual |
Get name of algorithm, for debugging or diagnostic purposes.
Reimplemented from motion::control::controller_common::ControllerBase.
|
delete |
|
deletenoexcept |
void motion::control::mpc_controller::MpcController::set_config | ( | const Config & | config | ) |
Setter for config class.
|
staticconstexpr |