orwell 0.0.0
orwell::ParallelController< dof, DerivedController > Class Template Reference

invokes several controllers in parallel and combines their control command More...

#include <ParallelController.hpp>

Inheritance diagram for orwell::ParallelController< dof, DerivedController >:

Public Member Functions

 ParallelController (const sackmesser::Interface::Ptr &interface, const std::string &name)
 
Eigen::Vector< double, dof > computeCommand ()
 computation of the control command depending
 

Detailed Description

template<int dof, template< int > class DerivedController>
class orwell::ParallelController< dof, DerivedController >

invokes several controllers in parallel and combines their control command

Template Parameters
dofnumber of degrees of freedom of the controlled system
DerivedControllertype of the controller, i.e. TorqueController, PositionController or VelocityController

Definition at line 44 of file ParallelController.hpp.

Constructor & Destructor Documentation

◆ ParallelController()

template<int dof, template< int > class DerivedController>
orwell::ParallelController< dof, DerivedController >::ParallelController ( const sackmesser::Interface::Ptr & interface,
const std::string & name )

loads configuration parameters

Parameters
interfaceinterfaces the configuration server
nameparameter namespace

Definition at line 28 of file ParallelController.hxx.

29 : TorqueController<dof>(interface, name), TorqueController<dof>::SharedGroup(interface, name + "/controller")
30 {
31 this->forEach([this](typename TorqueController<dof>::Ptr controller) { controllers_.push_back(controller); });
32 }
std::shared_ptr< TorqueController > Ptr
typedef

Member Function Documentation

◆ computeCommand()

template<int dof, template< int > class DerivedController>
Eigen::Vector< double, dof > orwell::ParallelController< dof, DerivedController >::computeCommand ( )

computation of the control command depending

invokes computeCommand for all contained controllers

Returns
control command

Definition at line 38 of file ParallelController.hxx.

39 {
40 Eigen::Vector<double, dof> torque = Eigen::Vector<double, dof>::Zero();
41
42 for (const auto &controller : controllers_)
43 {
44 torque += controller->computeCommand();
45 }
46
47 return torque;
48 }

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