Control Libraries 7.4.0
Loading...
Searching...
No Matches
ControllerFactory.hpp
1#pragma once
2
3#include "controllers/IController.hpp"
4#include "controllers/ControllerType.hpp"
5#include "robot_model/Model.hpp"
6
7#include "state_representation/space/cartesian/CartesianState.hpp"
8#include "state_representation/space/joint/JointState.hpp"
9
10namespace controllers {
11
17template<class S>
19public:
20
27 static std::shared_ptr<IController<S>> create_controller(CONTROLLER_TYPE type, unsigned int dimensions = 6);
28
36 static std::shared_ptr<IController<S>> create_controller(
37 CONTROLLER_TYPE type, const std::list<std::shared_ptr<state_representation::ParameterInterface>>& parameters,
38 unsigned int dimensions = 6
39 );
40
48 static std::shared_ptr<IController<S>> create_controller(
50 );
51
59 static std::shared_ptr<IController<S>> create_controller(
60 CONTROLLER_TYPE type, const std::list<std::shared_ptr<state_representation::ParameterInterface>>& parameters,
62 );
63};
64
65template<class S>
66std::shared_ptr<IController<S>> ControllerFactory<S>::create_controller(CONTROLLER_TYPE type, unsigned int dimensions) {
67 std::list<std::shared_ptr<state_representation::ParameterInterface>> parameters;
68 return ControllerFactory<S>::create_controller(type, parameters, dimensions);
69}
70
71template<class S>
72std::shared_ptr<IController<S>>
74 std::list<std::shared_ptr<state_representation::ParameterInterface>> parameters;
76}
77
80
81}// namespace controllers
Factory to create a shared pointer to a controller.
static std::shared_ptr< IController< S > > create_controller(CONTROLLER_TYPE type, const std::list< std::shared_ptr< state_representation::ParameterInterface > > &parameters, unsigned int dimensions=6)
Create a controller of the desired type with initial parameters.
static std::shared_ptr< IController< S > > create_controller(CONTROLLER_TYPE type, unsigned int dimensions=6)
Create a controller of the desired type.
static std::shared_ptr< IController< S > > create_controller(CONTROLLER_TYPE type, const std::list< std::shared_ptr< state_representation::ParameterInterface > > &parameters, const robot_model::Model &robot_model)
Create a controller of the desired type with initial parameters and an associated robot model.
The Model class is a wrapper around pinocchio dynamic computation library with state_representation e...
Definition Model.hpp:62
Systems to determine a command output from measured and desired inputs.
CONTROLLER_TYPE
Enumeration of the implemented controllers.
Robot kinematics and dynamics.