- 3.0.2 models module.
MPCSimulator Class Reference
Inheritance diagram for MPCSimulator:
ct::core::ControlSimulator< IPSystem >

Public Member Functions

 MPCSimulator (ct::core::Time sim_dt, ct::core::Time control_dt, const RobotState_t &x0, std::shared_ptr< IPSystem > ip_system, ct::optcon::MPC< ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM >> &mpc)
 
void finishSystemIteration (ct::core::Time sim_time) override
 
void prepareControllerIteration (ct::core::Time sim_time) override
 
void finishControllerIteration (ct::core::Time sim_time) override
 
- Public Member Functions inherited from ct::core::ControlSimulator< IPSystem >
 ControlSimulator ()=default
 
 ControlSimulator (Time sim_dt, Time control_dt, const StateVector< STATE_DIM > &x0, std::shared_ptr< CONTROLLED_SYSTEM > controlled_system, bool verbose=false)
 
 ControlSimulator (const ControlSimulator &arg)
 
virtual ~ControlSimulator ()
 
void simulate (Time duration, const IntegrationType &intType=IntegrationType::EULERCT)
 
void finish ()
 
void stop ()
 

Additional Inherited Members

- Public Types inherited from ct::core::ControlSimulator< IPSystem >
typedef typename CONTROLLED_SYSTEM::SCALAR SCALAR
 
- Static Public Attributes inherited from ct::core::ControlSimulator< IPSystem >
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW const size_t STATE_DIM
 
static const size_t CONTROL_DIM
 
- Protected Member Functions inherited from ct::core::ControlSimulator< IPSystem >
virtual void simulateSystem (Time duration, const IntegrationType &intType=IntegrationType::EULERCT)
 
virtual void simulateController (Time duration)
 
- Protected Attributes inherited from ct::core::ControlSimulator< IPSystem >
Time sim_dt_
 
Time control_dt_
 
std::shared_ptr< CONTROLLED_SYSTEM > system_
 
std::shared_ptr< Controller< STATE_DIM, CONTROL_DIM, SCALAR > > controller_
 
std::chrono::time_point< std::chrono::high_resolution_clock > sim_start_time_
 
StateVector< STATE_DIMx0_
 
StateVector< STATE_DIMx_
 
std::thread sys_thread_
 
std::thread control_thread_
 
std::mutex state_mtx_
 
std::mutex control_mtx_
 
std::atomic< bool > stop_
 
bool verbose_
 

Constructor & Destructor Documentation

◆ MPCSimulator()

MPCSimulator::MPCSimulator ( ct::core::Time  sim_dt,
ct::core::Time  control_dt,
const RobotState_t x0,
std::shared_ptr< IPSystem ip_system,
ct::optcon::MPC< ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM >> &  mpc 
)
inline

Member Function Documentation

◆ finishSystemIteration()

void MPCSimulator::finishSystemIteration ( ct::core::Time  sim_time)
inlineoverridevirtual

◆ prepareControllerIteration()

void MPCSimulator::prepareControllerIteration ( ct::core::Time  sim_time)
inlineoverridevirtual

◆ finishControllerIteration()

void MPCSimulator::finishControllerIteration ( ct::core::Time  sim_time)
inlineoverridevirtual

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