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
#include <vector>
26
27
#include <VirtualRobot/MathTools.h>
28
29
#include <
armarx/navigation/core/types.h
>
30
31
namespace
armarx::navigation::server
32
{
33
34
struct
GoalReachedMonitorConfig
35
{
36
float
posTh
{30.F};
// [mm]
37
float
oriTh
{VirtualRobot::MathTools::deg2rad(3.
F
)};
// [rad]
38
39
float
linearVelTh
{100.F};
// [mm/s]
40
float
angularVelTh
{VirtualRobot::MathTools::deg2rad(5.
F
)};
// [rad/s]
41
42
int
filterCount
{5};
43
};
44
45
class
GoalReachedMonitor
46
{
47
public
:
48
GoalReachedMonitor
(
const
core::Pose
&
goal
,
49
const
core::Scene
& scene,
50
const
GoalReachedMonitorConfig
& config);
51
virtual
~GoalReachedMonitor
() =
default
;
52
53
GoalReachedMonitor
(
GoalReachedMonitor
&& other) noexcept;
54
GoalReachedMonitor
&
operator=
(
GoalReachedMonitor
&&) noexcept;
55
56
bool
goalReached
(
bool
filter =
true
)
const
noexcept;
57
58
const
core::Pose
&
goal
()
const
noexcept;
59
60
private
:
61
const
core::Pose
goal_;
62
const
core::Scene
& scene;
63
const
GoalReachedMonitorConfig
config;
64
mutable
int
reachedCount;
// the number of times the goal was reached in a row
65
};
66
67
}
// namespace armarx::navigation::server
armarx::navigation::server::GoalReachedMonitor::~GoalReachedMonitor
virtual ~GoalReachedMonitor()=default
armarx::navigation::core::Pose
Eigen::Isometry3f Pose
Definition:
basic_types.h:31
armarx::navigation::server::GoalReachedMonitor::goal
const core::Pose & goal() const noexcept
Definition:
GoalReachedMonitor.cpp:72
armarx::navigation::server::GoalReachedMonitorConfig::posTh
float posTh
Definition:
GoalReachedMonitor.h:36
armarx::navigation::server::GoalReachedMonitor::GoalReachedMonitor
GoalReachedMonitor(const core::Pose &goal, const core::Scene &scene, const GoalReachedMonitorConfig &config)
Definition:
GoalReachedMonitor.cpp:11
armarx::navigation::server::GoalReachedMonitorConfig::oriTh
float oriTh
Definition:
GoalReachedMonitor.h:37
armarx::navigation::server::GoalReachedMonitorConfig::angularVelTh
float angularVelTh
Definition:
GoalReachedMonitor.h:40
armarx::navigation::server
This file is part of ArmarX.
Definition:
EventPublishingInterface.h:10
armarx::navigation::server::GoalReachedMonitor
Definition:
GoalReachedMonitor.h:45
armarx::navigation::server::GoalReachedMonitor::goalReached
bool goalReached(bool filter=true) const noexcept
Definition:
GoalReachedMonitor.cpp:20
armarx::navigation::server::GoalReachedMonitor::operator=
GoalReachedMonitor & operator=(GoalReachedMonitor &&) noexcept
Definition:
GoalReachedMonitor.cpp:83
armarx::navigation::server::GoalReachedMonitorConfig::linearVelTh
float linearVelTh
Definition:
GoalReachedMonitor.h:39
armarx::navigation::server::GoalReachedMonitorConfig
Definition:
GoalReachedMonitor.h:34
armarx::navigation::core::Scene
Definition:
types.h:71
F
Definition:
ExportDialogControllerTest.cpp:16
armarx::navigation::server::GoalReachedMonitorConfig::filterCount
int filterCount
Definition:
GoalReachedMonitor.h:42
types.h
armarx
navigation
server
monitoring
GoalReachedMonitor.h
Generated on Sat Oct 5 2024 09:14:08 for armarx_documentation by
1.8.17