GoalReachedMonitor.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 * @date 2021
18 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19 * GNU General Public License
20 */
21
22#pragma once
23
24#include <cmath>
25
26#include <VirtualRobot/MathTools.h>
27
31
33{
34
35 // Alias for backward compatibility - uses the same config from core
37
39 {
40 public:
42 const core::Scene& scene,
43 const GoalReachedMonitorConfig& config);
44 virtual ~GoalReachedMonitor() = default;
45
46 GoalReachedMonitor(GoalReachedMonitor&& other) noexcept;
48
49 bool goalReached(bool filter = true) const noexcept;
50
51 const core::Pose& goal() const noexcept;
52
53 void updateGoal(const core::Pose& newGoal);
54
55 struct Status
56 {
57 float posError;
58 float oriError;
59 };
60
61 Status status() const;
62
64
65 private:
66 core::Pose goal_;
67 const core::Scene& scene;
68 const GoalReachedMonitorConfig config;
69 mutable int reachedCount; // the number of times the goal was reached in a row
70 };
71
72} // namespace armarx::navigation::server
The Pose class.
Definition Pose.h:243
bool goalReached(bool filter=true) const noexcept
GoalReachedMonitor & operator=(GoalReachedMonitor &&) noexcept
GoalReachedMonitor(const core::Pose &goal, const core::Scene &scene, const GoalReachedMonitorConfig &config)
const GoalReachedMonitorConfig getConfig() const
This file is part of ArmarX.
Eigen::Isometry3f Pose
Definition basic_types.h:31
This file is part of ArmarX.
core::GoalReachedConfig GoalReachedMonitorConfig