ControlledDynamicalSystem class
The ControlledDynamicalSystem class allows to easily connect a DynamicalSystem with a Controller.
It defines a controlled dynamical system that can be integrated using an Integrator class.
Constructors, destructors, conversion operators
- ControlledDynamicalSystem()
 - ControlledDynamicalSystem(const ControlledDynamicalSystem& other) deleted
 - ~ControlledDynamicalSystem()
 
Public functions
- auto setDynamicalSystem(std::shared_ptr<DynamicalSystem> autonomousSystem, bool usePreviousController = false) -> bool
 - Set the DynamicalSystem pointer.
 - auto setController(std::shared_ptr<Controller> controller) -> bool
 - Set the controller pointer.
 - auto asDynamicalSystem() -> std::shared_ptr<DynamicalSystem>
 - Returns a pointer to a DynamicalSystem object.
 
Function documentation
              bool iDynTree:: optimalcontrol:: ControlledDynamicalSystem:: setDynamicalSystem(std::shared_ptr<DynamicalSystem> autonomousSystem,
              bool usePreviousController = false)
            
            Set the DynamicalSystem pointer.
| Parameters | |
|---|---|
| autonomousSystem in | The DynamicalSystem pointer. | 
| usePreviousController | A flag specifying whether the previously specified controller should be used. Default is false. | 
| Returns | True if successfull. Possible sources of failures: empty pointer, usePreviouController is true and the dynamicalSystem and the previous controller are not compatible. | 
The usePreviousController flag allows to use again the controller stored in memory after a previous call to setController. This allow to call the method setController before setting the dynamical system.
              bool iDynTree:: optimalcontrol:: ControlledDynamicalSystem:: setController(std::shared_ptr<Controller> controller)
            
            Set the controller pointer.
| Parameters | |
|---|---|
| controller in | Controller pointer. | 
| Returns | True if successfull. Possible causes of failures: empty pointer, the controller is not compatible with the already specified dynamical system. | 
              std::shared_ptr<DynamicalSystem> iDynTree:: optimalcontrol:: ControlledDynamicalSystem:: asDynamicalSystem()
            
            Returns a pointer to a DynamicalSystem object.
| Returns | A pointer to a DynamicalSystem object. | 
|---|
The DynamicalSystem pointer can be used inside an Integrator.