ArmarDEConverter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <map>
4 #include <string>
5 
6 #include <Eigen/Core>
7 
8 #include <RobotAPI/libraries/armem_robot_state/aron/Exteroception.aron.generated.h>
9 
10 #include "ConverterInterface.h"
11 
13 {
14  struct ConverterValue;
15 
16  // class ConverterTools;
17 
18  namespace detail
19  {
20  struct Properties
21  {
22  std::size_t tofSize = 64; // 4x4 grid
23  };
24  } // namespace detail
25 
27  {
28  public:
30 
31  ArmarDEConverter(const Properties& properties = Properties());
32  ~ArmarDEConverter() override;
33 
34 
36  convert(const RobotUnitDataStreaming::TimeStep& data,
37  const RobotUnitDataStreaming::DataStreamingDescription& description) override;
38 
39 
40  protected:
41  void process(arondto::Exteroception& dtoExteroception,
42  const std::string& entryName,
43  const ConverterValue& value);
44 
45 
46  private:
47  void
48  processToFDepthEntry(std::map<std::string, armarx::armem::exteroception::arondto::ToF>& fts,
49  const std::vector<std::string>& split,
50  const ConverterValue& value);
51 
52  void processToFDepthEntry(armarx::armem::exteroception::arondto::ToF& tof,
53  const std::vector<std::string>& split,
54  const ConverterValue& value);
55 
56  void
57  processToFSigmaEntry(std::map<std::string, armarx::armem::exteroception::arondto::ToF>& fts,
58  const std::vector<std::string>& split,
59  const ConverterValue& value);
60 
61  void processToFSigmaEntry(armarx::armem::exteroception::arondto::ToF& tof,
62  const std::vector<std::string>& split,
63  const ConverterValue& value);
64 
65 
66  void processToFTargetDetectedEntry(
67  std::map<std::string, armarx::armem::exteroception::arondto::ToF>& fts,
68  const std::vector<std::string>& split,
69  const ConverterValue& value);
70 
71  void processToFTargetDetectedEntry(armarx::armem::exteroception::arondto::ToF& tof,
72  const std::vector<std::string>& split,
73  const ConverterValue& value);
74 
75 
76  // std::unique_ptr<ConverterTools> tools;
77 
78  Properties properties_;
79  };
80 } // namespace armarx::armem::server::robot_state::exteroception
armarx::armem::server::robot_state::exteroception::ConverterInterface
Definition: ConverterInterface.h:20
armarx::armem::server::robot_state::exteroception::detail::Properties
Definition: ArmarDEConverter.h:20
ConverterInterface.h
detail
Definition: OpenCVUtil.cpp:127
armarx::armem::server::robot_state::exteroception::ArmarDEConverter
Definition: ArmarDEConverter.h:26
armarx::armem::server::robot_state::exteroception::detail::Properties::tofSize
std::size_t tofSize
Definition: ArmarDEConverter.h:22
armarx::armem::server::robot_state::exteroception::ArmarDEConverter::Properties
detail::Properties Properties
Definition: ArmarDEConverter.h:29
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
armarx::armem::server::robot_state::exteroception
Definition: ArmarDEConverter.cpp:18
armarx::armem::server::robot_state::exteroception::ConverterValue
Definition: ConverterTools.h:20
armarx::armem::server::robot_state::exteroception::ArmarDEConverter::ArmarDEConverter
ArmarDEConverter(const Properties &properties=Properties())
Definition: ArmarDEConverter.cpp:21
armarx::aron::data::DictPtr
std::shared_ptr< Dict > DictPtr
Definition: Dict.h:41
armarx::armem::server::robot_state::exteroception::ArmarDEConverter::convert
aron::data::DictPtr convert(const RobotUnitDataStreaming::TimeStep &data, const RobotUnitDataStreaming::DataStreamingDescription &description) override
Definition: ArmarDEConverter.cpp:28
armarx::armem::server::robot_state::exteroception::ArmarDEConverter::~ArmarDEConverter
~ArmarDEConverter() override
armarx::armem::server::robot_state::exteroception::ArmarDEConverter::process
void process(arondto::Exteroception &dtoExteroception, const std::string &entryName, const ConverterValue &value)
Definition: ArmarDEConverter.cpp:86
armarx::split
std::vector< std::string > split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)
Definition: StringHelpers.cpp:36