Reader.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 <
ArmarXCore/core/time/DateTime.h
>
25
26
#include <
RobotAPI/libraries/armem/client/util/SimpleReaderBase.h
>
27
28
#include <
armarx/navigation/core/Trajectory.h
>
29
#include <
armarx/navigation/local_planning/LocalPlanner.h
>
30
31
namespace
armarx::navigation::memory::client::stack_result
32
{
33
34
class
Reader
:
virtual
public
armem::client::util::SimpleReaderBase
35
{
36
public
:
37
using
armem::client::util::SimpleReaderBase::SimpleReaderBase
;
38
39
struct
Query
40
{
41
DateTime
timestamp
;
42
std::string
clientID
;
43
};
44
45
46
struct
LocalPlannerResult
47
{
48
armarx::navigation::core::LocalTrajectory
trajectory
;
49
50
enum
Status
51
{
52
Success
,
53
NoData
,
54
Error
55
}
status
;
56
57
std::string
errorMessage
=
""
;
58
59
operator
bool() const noexcept
60
{
61
return
status
== Status::Success;
62
}
63
};
64
65
struct
GlobalPlannerResult
66
{
67
armarx::navigation::core::GlobalTrajectory
trajectory
;
68
69
enum
Status
70
{
71
Success
,
72
NoData
,
73
Error
74
}
status
;
75
76
std::string
errorMessage
=
""
;
77
78
operator
bool() const noexcept
79
{
80
return
status
== Status::Success;
81
}
82
};
83
84
GlobalPlannerResult
queryGlobalPlannerResult
(
const
Query& query);
85
LocalPlannerResult
queryLocalPlannerResult
(
const
Query& query);
86
87
std::string
propertyPrefix
()
const override
;
88
Properties
defaultProperties
()
const override
;
89
90
protected
:
91
private
:
92
armarx::navigation::core::LocalTrajectory
93
asLocalPlannerResult(
const
armem::wm::ProviderSegment
& providerSegment);
94
95
armarx::navigation::core::GlobalTrajectory
96
asGlobalPlannerResult(
const
armem::wm::ProviderSegment
& providerSegment);
97
98
armarx::armem::client::query::Builder
99
buildLocalPlannerResultQuery(
const
Query& query)
const
;
100
101
armarx::armem::client::query::Builder
102
buildGlobalPlannerResultQuery(
const
Query& query)
const
;
103
};
104
}
// namespace armarx::navigation::memory::client::stack_result
armarx::navigation::core::GlobalTrajectory
Definition:
Trajectory.h:68
armarx::navigation::memory::client::stack_result::Reader::Query::clientID
std::string clientID
Definition:
Reader.h:42
armarx::navigation::memory::client::stack_result::Reader::LocalPlannerResult::trajectory
armarx::navigation::core::LocalTrajectory trajectory
Definition:
Reader.h:48
armarx::armem::wm::ProviderSegment
Client-side working memory provider segment.
Definition:
memory_definitions.h:105
armarx::navigation::memory::client::stack_result::Reader::Query::timestamp
DateTime timestamp
Definition:
Reader.h:41
armarx::navigation::memory::client::stack_result::Reader::GlobalPlannerResult::Error
@ Error
Definition:
Reader.h:73
DateTime.h
armarx::navigation::memory::client::stack_result::Reader::LocalPlannerResult::Error
@ Error
Definition:
Reader.h:54
LocalPlanner.h
armarx::navigation::memory::client::stack_result::Reader::LocalPlannerResult::Success
@ Success
Definition:
Reader.h:52
armarx::navigation::memory::client::stack_result::Reader::LocalPlannerResult::status
enum armarx::navigation::memory::client::stack_result::Reader::LocalPlannerResult::Status status
armarx::navigation::memory::client::stack_result::Reader::GlobalPlannerResult::errorMessage
std::string errorMessage
Definition:
Reader.h:76
armarx::navigation::memory::client::stack_result
This file is part of ArmarX.
Definition:
Reader.cpp:8
armarx::navigation::memory::client::stack_result::Reader::LocalPlannerResult::NoData
@ NoData
Definition:
Reader.h:53
armarx::navigation::memory::client::stack_result::Reader::LocalPlannerResult::Status
Status
Definition:
Reader.h:50
armarx::navigation::memory::client::stack_result::Reader::GlobalPlannerResult::Status
Status
Definition:
Reader.h:69
armarx::navigation::memory::client::stack_result::Reader::Query
Definition:
Reader.h:39
armarx::navigation::memory::client::stack_result::Reader::LocalPlannerResult::errorMessage
std::string errorMessage
Definition:
Reader.h:57
armarx::status
status
Definition:
FiniteStateMachine.h:259
armarx::navigation::memory::client::stack_result::Reader::queryGlobalPlannerResult
GlobalPlannerResult queryGlobalPlannerResult(const Query &query)
armarx::navigation::memory::client::stack_result::Reader::GlobalPlannerResult::status
enum armarx::navigation::memory::client::stack_result::Reader::GlobalPlannerResult::Status status
armarx::navigation::memory::client::stack_result::Reader::GlobalPlannerResult::Success
@ Success
Definition:
Reader.h:71
armarx::navigation::memory::client::stack_result::Reader::GlobalPlannerResult::trajectory
armarx::navigation::core::GlobalTrajectory trajectory
Definition:
Reader.h:67
armarx::navigation::core::LocalTrajectory
Definition:
Trajectory.h:167
armarx::navigation::memory::client::stack_result::Reader::defaultProperties
Properties defaultProperties() const override
Definition:
Reader.cpp:69
armarx::core::time::DateTime
Represents a point in time.
Definition:
DateTime.h:24
armarx::navigation::memory::client::stack_result::Reader::GlobalPlannerResult
Definition:
Reader.h:65
armarx::armem::client::util::SimpleReaderBase::SimpleReaderBase
SimpleReaderBase()
Definition:
SimpleReaderBase.cpp:9
armarx::armem::client::query::Builder
The query::Builder class provides a fluent-style specification of hierarchical queries.
Definition:
Builder.h:22
armarx::navigation::memory::client::stack_result::Reader
Definition:
Reader.h:34
armarx::navigation::memory::client::stack_result::Reader::LocalPlannerResult
Definition:
Reader.h:46
armarx::navigation::memory::client::stack_result::Reader::queryLocalPlannerResult
LocalPlannerResult queryLocalPlannerResult(const Query &query)
Definition:
Reader.cpp:11
Trajectory.h
armarx::navigation::memory::client::stack_result::Reader::GlobalPlannerResult::NoData
@ NoData
Definition:
Reader.h:72
SimpleReaderBase.h
armarx::navigation::memory::client::stack_result::Reader::propertyPrefix
std::string propertyPrefix() const override
Definition:
Reader.cpp:63
armarx::armem::client::util::SimpleReaderBase
Definition:
SimpleReaderBase.h:38
armarx
navigation
memory
client
stack_result
Reader.h
Generated on Sat Oct 12 2024 09:14:08 for armarx_documentation by
1.8.17