orwell
0.0.0
AdmittanceController.hxx
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 <sackmesser/Configurations.hpp>
23
//
24
#include <orwell/torque/AdmittanceController.hpp>
25
26
namespace
orwell
27
{
28
29
template
<
int
dof,
class
Reference>
30
AdmittanceController<dof, Reference>::AdmittanceController
(
const
sackmesser::Interface::Ptr &interface,
const
std::string &name)
31
:
TorqueReferenceController
<dof, Reference>(interface, name)
32
{}
33
34
template
<
int
dof,
class
Reference>
35
AdmittanceController<dof, Reference>::~AdmittanceController
() =
default
;
36
37
template
<
int
dof,
class
Reference>
38
typename
RobotState<dof>::Vector
AdmittanceController<dof, Reference>::computeCommand
()
39
{
40
const
typename
RobotState<dof>::Vector
&position = this->getRobotState().getPosition();
41
const
typename
RobotState<dof>::Vector
&velocity = this->getRobotState().getVelocity();
42
typename
RobotState<dof>::Vector
acceleration = computeDesiredJointAcceleration();
43
44
return
this->getRobotModel()->computeForwardDynamics(position, velocity, acceleration, 0.0);
45
}
46
47
}
// namespace orwell
orwell::AdmittanceController
base class for an admittance controller derived from TorqueController
Definition
AdmittanceController.hpp:36
orwell::AdmittanceController::computeCommand
RobotState< dof >::Vector computeCommand()
computes the joint torque using forward dynamics
Definition
AdmittanceController.hxx:38
orwell::AdmittanceController::AdmittanceController
AdmittanceController(const sackmesser::Interface::Ptr &interface, const std::string &name)
loads configuration parameters
Definition
AdmittanceController.hxx:30
orwell::ReferenceController
base implementation of a Controller tracking a given Reference
Definition
ReferenceController.hpp:36
orwell::RobotState::Vector
Eigen::Vector< double, dof > Vector
typedef
Definition
RobotState.hpp:38
src
orwell
torque
AdmittanceController.hxx
Generated by
1.11.0