3 #include "drake/systems/framework/leaf_system.h"
7 namespace mimpc::simulation {
8 template<
class MPCType> requires std::derived_from<MPCType, MPC<typename MPCType::SYSTEM_TYPE, typename MPCType::SOLVER_TYPE>>
13 const MPCType::SYSTEM_TYPE::StateVec &state_constraints_lb,
14 const MPCType::SYSTEM_TYPE::StateVec &state_constraints_ub);
19 MPCType &reacsa_solver_;
21 MPCType::SYSTEM_TYPE::StateVec state_constraints_lb_;
22 MPCType::SYSTEM_TYPE::StateVec state_constraints_ub_;
24 drake::systems::InputPort<double> *plant_out_port_;
25 drake::systems::OutputPort<double> *mpc_time_port_;
26 drake::systems::OutputPort<double> *control_out_port_;
27 drake::systems::DiscreteStateIndex control_out_state_;
28 drake::systems::DiscreteStateIndex mpc_time_out_state_;
30 drake::systems::EventStatus discreteUpdate(
const drake::systems::Context<double> &context,
31 drake::systems::DiscreteValues<double> *discrete_state)
const;
35 #include "MPCLeafSystem.tpp"
Abstract class to represent system dynamics.
Definition: MPCLeafSystem.hpp:9