TrajectoryController.h
Go to the documentation of this file.
1
/**
2
* This file is part of ArmarX.
3
*
4
* ArmarX is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation.
7
*
8
* ArmarX is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* @author Fabian Reister ( fabian dot reister at kit dot edu )
17
* @author Christian R. G. Dreher ( c dot dreher at kit dot edu )
18
* @date 2021
19
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20
* GNU General Public License
21
*/
22
23
#pragma once
24
25
#include <math.h>
26
27
#include <cmath>
28
#include <memory>
29
30
#include <
RobotAPI/libraries/aron/core/data/variant/forward_declarations.h
>
31
32
#include <
armarx/navigation/core/Trajectory.h
>
33
#include <
armarx/navigation/core/basic_types.h
>
34
#include <
armarx/navigation/core/types.h
>
35
#include <
armarx/navigation/trajectory_control/global/core.h
>
36
37
namespace
armarx::navigation::traj_ctrl::global
38
{
39
40
struct
TrajectoryControllerResult
41
{
42
core::Twist
twist
;
43
core::GlobalTrajectoryPoint
dropPoint
;
44
bool
isFinalSegment
;
45
float
currentOrientation
;
46
float
desiredOrientation
;
47
float
orientationError
;
48
float
positionError
;
49
};
50
51
struct
TrajectoryControllerParams
52
{
53
// fixme get rid of these defaults / magic numbers
54
core::TwistLimits
limits
{
55
.
linear
= 500.F,
// [mm/s]
56
.angular = 2.F * M_PIf32 / 10.F
// [rad/s]
57
};
58
59
virtual
~TrajectoryControllerParams
() =
default
;
60
61
virtual
Algorithms
algorithm
()
const
= 0;
62
virtual
aron::data::DictPtr
toAron
()
const
= 0;
63
};
64
65
class
TrajectoryController
66
{
67
public
:
68
TrajectoryController
() =
default
;
69
virtual
~TrajectoryController
() =
default
;
70
71
virtual
TrajectoryControllerResult
control
(
const
core::GlobalTrajectory
& goal,
72
const
core::Pose
& global_T_robot) = 0;
73
};
74
75
using
TrajectoryControllerPtr
= std::shared_ptr<TrajectoryController>;
76
77
}
// namespace armarx::navigation::traj_ctrl::global
armarx::navigation::core::GlobalTrajectory
Definition:
Trajectory.h:70
armarx::navigation::traj_ctrl::global::TrajectoryControllerResult::currentOrientation
float currentOrientation
Definition:
TrajectoryController.h:45
armarx::navigation::traj_ctrl::global::TrajectoryControllerResult
Definition:
TrajectoryController.h:40
armarx::navigation::traj_ctrl::global::TrajectoryControllerParams::algorithm
virtual Algorithms algorithm() const =0
armarx::navigation::traj_ctrl::global::TrajectoryController::control
virtual TrajectoryControllerResult control(const core::GlobalTrajectory &goal, const core::Pose &global_T_robot)=0
armarx::navigation::core::Pose
Eigen::Isometry3f Pose
Definition:
basic_types.h:31
armarx::navigation::traj_ctrl::global::TrajectoryControllerResult::desiredOrientation
float desiredOrientation
Definition:
TrajectoryController.h:46
basic_types.h
armarx::navigation::traj_ctrl::global::Algorithms
Algorithms
Definition:
core.h:30
armarx::navigation::traj_ctrl::global::TrajectoryControllerParams::toAron
virtual aron::data::DictPtr toAron() const =0
armarx::navigation::core::TwistLimits::linear
float linear
Definition:
types.h:82
armarx::navigation::traj_ctrl::global::TrajectoryControllerResult::dropPoint
core::GlobalTrajectoryPoint dropPoint
Definition:
TrajectoryController.h:43
armarx::navigation::traj_ctrl::global::TrajectoryControllerParams::~TrajectoryControllerParams
virtual ~TrajectoryControllerParams()=default
armarx::navigation::traj_ctrl::global::TrajectoryController::TrajectoryController
TrajectoryController()=default
armarx::navigation::core::GlobalTrajectoryPoint
Definition:
Trajectory.h:37
armarx::navigation::core::Twist
Definition:
basic_types.h:53
armarx::navigation::traj_ctrl::global::TrajectoryControllerResult::isFinalSegment
bool isFinalSegment
Definition:
TrajectoryController.h:44
core.h
armarx::navigation::traj_ctrl::global::TrajectoryControllerResult::orientationError
float orientationError
Definition:
TrajectoryController.h:47
forward_declarations.h
armarx::navigation::core::TwistLimits
Definition:
types.h:80
armarx::aron::data::DictPtr
std::shared_ptr< Dict > DictPtr
Definition:
Dict.h:41
armarx::navigation::traj_ctrl::global::TrajectoryControllerResult::twist
core::Twist twist
Definition:
TrajectoryController.h:42
armarx::navigation::traj_ctrl::global::TrajectoryControllerResult::positionError
float positionError
Definition:
TrajectoryController.h:48
armarx::navigation::traj_ctrl::global::TrajectoryControllerParams::limits
core::TwistLimits limits
Definition:
TrajectoryController.h:54
Trajectory.h
armarx::navigation::traj_ctrl::global::TrajectoryController::~TrajectoryController
virtual ~TrajectoryController()=default
armarx::navigation::traj_ctrl::global
This file is part of ArmarX.
Definition:
aron_conversions.cpp:11
types.h
armarx::navigation::traj_ctrl::global::TrajectoryControllerPtr
std::shared_ptr< TrajectoryController > TrajectoryControllerPtr
Definition:
TrajectoryController.h:75
armarx::navigation::traj_ctrl::global::TrajectoryControllerParams
Definition:
TrajectoryController.h:51
armarx::navigation::traj_ctrl::global::TrajectoryController
Definition:
TrajectoryController.h:65
armarx
navigation
trajectory_control
global
TrajectoryController.h
Generated on Sat Mar 29 2025 09:17:30 for armarx_documentation by
1.8.17