TrajectoryFollowingController.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 <memory>
26
27
#include <
RobotAPI/libraries/aron/core/data/variant/container/Dict.h
>
28
#include <
RobotAPI/libraries/core/MultiDimPIDController.h
>
29
30
#include <
armarx/navigation/core/Trajectory.h
>
31
#include <
armarx/navigation/core/basic_types.h
>
32
#include <
armarx/navigation/core/types.h
>
33
#include <
armarx/navigation/trajectory_control/global/TrajectoryController.h
>
34
#include <
armarx/navigation/trajectory_control/global/core.h
>
35
36
namespace
armarx::navigation::traj_ctrl::global
37
{
38
// using arondto::TrajectoryFollowingControllerParams;
39
40
struct
TrajectoryFollowingControllerParams
:
public
TrajectoryControllerParams
41
{
42
43
core::PIDParams
pidPos
;
44
core::PIDParams
pidOri
;
45
46
float
alpha
= 0;
47
48
Algorithms
algorithm
()
const override
;
49
aron::data::DictPtr
toAron
()
const override
;
50
51
static
TrajectoryFollowingControllerParams
FromAron
(
const
aron::data::DictPtr
& dict);
52
};
53
54
class
TrajectoryFollowingController
:
virtual
public
TrajectoryController
55
{
56
public
:
57
using
Params
=
TrajectoryFollowingControllerParams
;
58
59
TrajectoryFollowingController
(
const
Params
& params);
60
~TrajectoryFollowingController
()
override
=
default
;
61
62
TrajectoryControllerResult
control
(
const
core::GlobalTrajectory
& trajectory,
63
const
core::Pose
& global_T_robot)
override
;
64
65
// protected:
66
core::Twist
applyTwistLimits
(
core::Twist
twist);
67
68
void
updateTwistLimits
(
const
core::TwistLimits
& limits);
69
70
private
:
71
Params
params;
72
73
74
MultiDimPIDControllerTemplate<3>
pidPos;
75
MultiDimPIDControllerTemplate<3>
pidPosTarget;
76
MultiDimPIDControllerTemplate<3>
pidOri;
77
MultiDimPIDControllerTemplate<3>
pidOriTarget;
78
};
79
80
using
TrajectoryFollowingControllerPtr
= std::shared_ptr<TrajectoryFollowingController>;
81
82
}
// namespace armarx::navigation::traj_ctrl::global
armarx::navigation::core::GlobalTrajectory
Definition:
Trajectory.h:70
armarx::navigation::core::PIDParams
Definition:
types.h:73
armarx::navigation::traj_ctrl::global::TrajectoryFollowingController::updateTwistLimits
void updateTwistLimits(const core::TwistLimits &limits)
Definition:
TrajectoryFollowingController.cpp:149
armarx::navigation::traj_ctrl::global::TrajectoryControllerResult
Definition:
TrajectoryController.h:40
armarx::navigation::traj_ctrl::global::TrajectoryFollowingController::control
TrajectoryControllerResult control(const core::GlobalTrajectory &trajectory, const core::Pose &global_T_robot) override
Definition:
TrajectoryFollowingController.cpp:155
armarx::navigation::core::Pose
Eigen::Isometry3f Pose
Definition:
basic_types.h:31
basic_types.h
armarx::navigation::traj_ctrl::global::TrajectoryFollowingController::applyTwistLimits
core::Twist applyTwistLimits(core::Twist twist)
Definition:
TrajectoryFollowingController.cpp:98
armarx::MultiDimPIDControllerTemplate< 3 >
armarx::navigation::traj_ctrl::global::Algorithms
Algorithms
Definition:
core.h:30
armarx::navigation::traj_ctrl::global::TrajectoryFollowingControllerParams::alpha
float alpha
Definition:
TrajectoryFollowingController.h:46
armarx::navigation::traj_ctrl::global::TrajectoryFollowingController::TrajectoryFollowingController
TrajectoryFollowingController(const Params ¶ms)
Definition:
TrajectoryFollowingController.cpp:62
Dict.h
armarx::navigation::core::Twist
Definition:
basic_types.h:53
TrajectoryController.h
armarx::navigation::traj_ctrl::global::TrajectoryFollowingControllerParams::toAron
aron::data::DictPtr toAron() const override
Definition:
TrajectoryFollowingController.cpp:38
armarx::navigation::traj_ctrl::global::TrajectoryFollowingControllerParams::pidOri
core::PIDParams pidOri
Definition:
TrajectoryFollowingController.h:44
core.h
MultiDimPIDController.h
armarx::navigation::core::TwistLimits
Definition:
types.h:80
armarx::navigation::traj_ctrl::global::TrajectoryFollowingController::~TrajectoryFollowingController
~TrajectoryFollowingController() override=default
armarx::navigation::traj_ctrl::global::TrajectoryFollowingControllerParams::pidPos
core::PIDParams pidPos
Definition:
TrajectoryFollowingController.h:43
armarx::navigation::traj_ctrl::global::TrajectoryFollowingControllerParams::FromAron
static TrajectoryFollowingControllerParams FromAron(const aron::data::DictPtr &dict)
Definition:
TrajectoryFollowingController.cpp:49
armarx::aron::data::DictPtr
std::shared_ptr< Dict > DictPtr
Definition:
Dict.h:41
armarx::navigation::traj_ctrl::global::TrajectoryFollowingControllerParams
Definition:
TrajectoryFollowingController.h:40
armarx::navigation::traj_ctrl::global::TrajectoryFollowingControllerParams::algorithm
Algorithms algorithm() const override
Definition:
TrajectoryFollowingController.cpp:32
armarx::navigation::traj_ctrl::global::TrajectoryFollowingController
Definition:
TrajectoryFollowingController.h:54
armarx::navigation::traj_ctrl::global::TrajectoryFollowingControllerPtr
std::shared_ptr< TrajectoryFollowingController > TrajectoryFollowingControllerPtr
Definition:
TrajectoryFollowingController.h:80
Trajectory.h
armarx::navigation::traj_ctrl::global
This file is part of ArmarX.
Definition:
aron_conversions.cpp:11
types.h
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
TrajectoryFollowingController.h
Generated on Sat Mar 29 2025 09:17:35 for armarx_documentation by
1.8.17