RobotStateWriter.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 * @package RobotAPI::ArmarXObjects::RobotSensorMemory
17 * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18 * @date 2020
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23
24#pragma once
25
26#include <optional>
27
32
36
37#include "RobotUnitData.h"
38
39namespace armarx::plugins
40{
42}
43
45{
47}
48
50{
51 class Segment;
52}
53
55{
57 {
58 public:
60
62
63
64 /// Reads data from `dataQueue` and commits to the memory.
65 void run(float pollFrequency,
66 Queue& dataBuffer,
68 localization::Segment& localizationSegment);
69
70 struct Update
71 {
74 std::vector<armem::robot_state::localization::Transform> localization;
75 };
76
77 Update buildUpdate(const RobotUnitData& dataQueue);
78
79
80 private:
82 getTransform(const aron::data::DictPtr& platformData, const Time& timestamp) const;
83
84
85 public:
91
93
94 std::optional<DebugObserverHelper> debugObserver;
95
96
98
99
100 private:
101 bool noOdometryDataLogged = false;
102
103 bool isRunning();
104 };
105
106} // namespace armarx::armem::server::robot_state::proprioception
std::string timestamp()
Base Class for all Logging classes.
Definition Logging.h:240
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
Helps connecting a Memory server to the Ice interface.
void connect(armarx::plugins::DebugObserverComponentPlugin &debugObserverPlugin)
void run(float pollFrequency, Queue &dataBuffer, MemoryToIceAdapter &memory, localization::Segment &localizationSegment)
Reads data from dataQueue and commits to the memory.
armarx::armem::server::robot_state::proprioception::Queue Queue
Brief description of class memory.
Definition memory.h:39
Brief description of class DebugObserverComponentPlugin.
boost::sync_queue< RobotUnitData > Queue
armarx::core::time::DateTime Time
std::shared_ptr< Dict > DictPtr
Definition Dict.h:42
This file is part of ArmarX.
A bundle of updates to be sent to the memory.
Definition Commit.h:90
std::vector< armem::robot_state::localization::Transform > localization