orwell 0.0.0
RobotModel.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 <memory>
23//
24#include <orwell/RobotState.hpp>
25
26namespace orwell
27{
28
35 template <int dof>
37 {
38 public:
43 RobotModel() = default;
44
49 virtual ~RobotModel() = default;
50
53
60 virtual void computeCartesianState(const orwell::RobotState<dof> &robot_state) = 0;
61
72 virtual Vector computeForwardDynamics(const Vector &position, const Vector &velocity, const Vector &acceleration, const double &gravity) = 0;
73
80 virtual const Eigen::Matrix<double, 6, dof> &getJacobian() const = 0;
81
82 public:
84 using Ptr = std::shared_ptr<RobotModel>;
85 };
86
87} // namespace orwell
88
89#include <orwell/RobotModel.hxx>
base class for a RobotModel to interface different kinematics/dynamics libraries
virtual const Eigen::Matrix< double, 6, dof > & getJacobian() const =0
access the Jacobian Matrix
virtual void computeCartesianState(const orwell::RobotState< dof > &robot_state)=0
precompute robot specific quantities for the given RobotState
virtual Vector computeForwardDynamics(const Vector &position, const Vector &velocity, const Vector &acceleration, const double &gravity)=0
interface the computation of the forward dynamics for the used kinematics/dynamics library
typename RobotState< dof >::Vector Vector
typedef
std::shared_ptr< RobotModel > Ptr
typedef
describes the RobotState
Eigen::Vector< double, dof > Vector
typedef