RobotUnitReader.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <memory>
5#include <optional>
6#include <queue>
7#include <string>
8
12
13#include <RobotAPI/interface/units/RobotUnit/RobotUnitInterface.h>
15
18#include "RobotUnitData.h"
21
22namespace armarx::plugins
23{
26} // namespace armarx::plugins
27
28namespace armarx
29{
30 using RobotUnitDataStreamingReceiverPtr = std::shared_ptr<class RobotUnitDataStreamingReceiver>;
31}
32
33// TODO move this out of proprioception. it is now for proprioception and exteroception
35{
37 {
38 public:
40
42
43
46 const std::string& robotTypeName);
47
48
49 /// Reads data from `handler` and fills `dataQueue`.
50 void run(float pollFrequency, Queue& dataBuffer);
51
52 std::optional<RobotUnitData> fetchAndConvertLatestRobotUnitData();
53
54
55 private:
56 /// Fetch the latest timestep and clear the robot unit buffer.
57 std::optional<RobotUnitDataStreaming::TimeStep> fetchLatestData();
58
59
60 public:
62 {
63 std::string sensorPrefix = "sens.*";
64 };
65
67
68 std::optional<DebugObserverHelper> debugObserver;
69
70
71 RobotUnitDataStreaming::Config config;
73 RobotUnitDataStreaming::DataStreamingDescription description;
74
79
81 };
82
83} // namespace armarx::armem::server::robot_state::proprioception
Base Class for all Logging classes.
Definition Logging.h:240
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
void run(float pollFrequency, Queue &dataBuffer)
Reads data from handler and fills dataQueue.
void connect(armarx::plugins::RobotUnitComponentPlugin &robotUnitPlugin, armarx::plugins::DebugObserverComponentPlugin &debugObserverPlugin, const std::string &robotTypeName)
RobotUnitDataStreaming::DataStreamingDescription description
armarx::armem::server::robot_state::proprioception::Queue Queue
Brief description of class DebugObserverComponentPlugin.
boost::sync_queue< RobotUnitData > Queue
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< class RobotUnitDataStreamingReceiver > RobotUnitDataStreamingReceiverPtr