SafetyGuard.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 <experimental/memory>
26#include <memory>
27
28#include <VirtualRobot/VirtualRobot.h>
29
31
34
39
40#include "core.h"
41
42namespace armarx::viz
43{
44 struct Client;
45}
46
48{
50 {
52
55 {
56 return {.twistLimits = {.linear = std::numeric_limits<float>::max(),
57 .angular = std::numeric_limits<float>::max()}};
58 }
59
62 {
63 return {.twistLimits = {.linear = 0, .angular = 0}};
64 }
65 };
66
68 {
69 virtual ~SafetyGuardParams() = default;
70
71 virtual Algorithms algorithm() const = 0;
72 virtual aron::data::DictPtr toAron() const = 0;
73 };
74
76 {
77 public:
83
84 SafetyGuard(const core::Scene& scene, const Context& ctx);
85 virtual ~SafetyGuard() = default;
86
87 virtual SafetyGuardResult computeSafetyLimits(const Eigen::Vector2f& global_V_movement) = 0;
88
89 protected:
92
94 };
95
96 using SafetyGuardPtr = std::shared_ptr<SafetyGuard>;
97} // namespace armarx::navigation::safety_guard
virtual SafetyGuardResult computeSafetyLimits(const Eigen::Vector2f &global_V_movement)=0
SafetyGuard(const core::Scene &scene, const Context &ctx)
viz::Client that will delete (clear) committed layers when destroyed.
std::shared_ptr< Dict > DictPtr
Definition Dict.h:42
This file is part of ArmarX.
Definition fwd.h:55
std::shared_ptr< SafetyGuard > SafetyGuardPtr
Definition fwd.h:57
This file is part of ArmarX.
virtual aron::data::DictPtr toAron() const =0
std::experimental::observer_ptr< viz::Client > arviz
Definition SafetyGuard.h:80
std::experimental::observer_ptr< DebugObserverComponentPluginUser > debugObserver
Definition SafetyGuard.h:81