orwell 0.0.0
ControllerManager.hpp
1/*
2 Copyright (c) Tobias Löw
3 Written by Tobias Löw <https://tobiloew.ch>
4
5 This file is part of orwell.
6
7 gafro is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 3 as
9 published by the Free Software Foundation.
10
11 gafro is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with gafro. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include <orwell/ReferenceController.hpp>
23#include <orwell/position/PositionController.hpp>
24#include <orwell/torque/TorqueController.hpp>
25#include <orwell/velocity/VelocityController.hpp>
26
27namespace orwell
28{
29
36 template <int dof>
37 class ControllerManager : private TorqueController<dof>::SharedGroup,
38 private VelocityController<dof>::SharedGroup,
39 private PositionController<dof>::SharedGroup
40 {
41 public:
50 ControllerManager(const sackmesser::Interface::Ptr &interface, const typename RobotModel<dof>::Ptr &robot_model,
51 const std::string &name = "controller_manager");
52
56 virtual ~ControllerManager();
57
65 typename TorqueController<dof>::Ptr getTorqueController(const std::string &name);
66
74 typename VelocityController<dof>::Ptr getVelocityController(const std::string &name);
75
83 typename PositionController<dof>::Ptr getPositionController(const std::string &name);
84
85 protected:
86 private:
88 typename RobotModel<dof>::Ptr robot_model_;
89 };
90
91} // namespace orwell
92
93#include <orwell/ControllerManager.hxx>
VelocityController< dof >::Ptr getVelocityController(const std::string &name)
obtain a specific VelocityController
ControllerManager(const sackmesser::Interface::Ptr &interface, const typename RobotModel< dof >::Ptr &robot_model, const std::string &name="controller_manager")
loads configuration parameters
TorqueController< dof >::Ptr getTorqueController(const std::string &name)
obtain a specific TorqueController
PositionController< dof >::Ptr getPositionController(const std::string &name)
obtain a specific PositionController
std::shared_ptr< PositionController > Ptr
typedef
std::shared_ptr< RobotModel > Ptr
typedef
std::shared_ptr< TorqueController > Ptr
typedef
std::shared_ptr< VelocityController > Ptr
typedef