framed.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <RobotAPI/libraries/aron/common/aron/framed.aron.generated.h>
4 
5 #include "../aron_conversions/framed.h"
6 
7 namespace armarx
8 {
9  // Helper methods for code generation to convert json/aron to bo and vice versa
10  // UPDATE 29.06.2023 IT MAKES NO SENSE TO MERGE ARMARX::VARIANTS WITH ARON. THEREOFRE WE REMOVED THE ARMARX::VARIANTS.
11  // AS SOON AS CHRISTIANS GEOMETRY PACKAGE IN SIMOX IS READY, THE ARON TYPES SHOULD BE REPLACED WITH CORE TYPES FROM SIMOX!
12  // AND THESE METHODS NEED TO BE UPDATED!
13  namespace aron
14  {
15  template <class ReaderT>
16  requires data::isReader<ReaderT>
17 
18  void
19  read(ReaderT& aron_r, typename ReaderT::InputType& input, armarx::FramedPosition& ret)
20  {
22  aron.read(aron_r, input);
23 
24  armarx::fromAron(aron, ret);
25  }
26 
27  template <class WriterT>
28  requires data::isWriter<WriterT>
29 
30  void
31  write(WriterT& aron_w,
33  typename WriterT::ReturnType& ret,
35  {
37  armarx::toAron(aron, input);
38  ret = aron.write(aron_w, aron_p);
39  }
40 
41  template <class ReaderT>
42  requires data::isReader<ReaderT>
43 
44  void
45  read(ReaderT& aron_r, typename ReaderT::InputType& input, armarx::FramedOrientation& ret)
46  {
48  aron.read(aron_r, input);
49 
50  armarx::fromAron(aron, ret);
51  }
52 
53  template <class WriterT>
54  requires data::isWriter<WriterT>
55 
56  void
57  write(WriterT& aron_w,
59  typename WriterT::ReturnType& ret,
61  {
63  armarx::toAron(aron, input);
64  ret = aron.write(aron_w, aron_p);
65  }
66 
67  template <class ReaderT>
68  requires data::isReader<ReaderT>
69 
70  void
71  read(ReaderT& aron_r, typename ReaderT::InputType& input, armarx::FramedPose& ret)
72  {
74  aron.read(aron_r, input);
75 
76  armarx::fromAron(aron, ret);
77  }
78 
79  template <class WriterT>
80  requires data::isWriter<WriterT>
81 
82  void
83  write(WriterT& aron_w,
85  typename WriterT::ReturnType& ret,
87  {
89  armarx::toAron(aron, input);
90  ret = aron.write(aron_w, aron_p);
91  }
92  } // namespace aron
93 
94 } // namespace armarx
armarx::aron::ret
ReaderT::InputType T & ret
Definition: rw.h:21
armarx::FramedPose
The FramedPose class.
Definition: FramedPose.h:258
armarx::VariantType::FramedPose
const VariantTypeId FramedPose
Definition: FramedPose.h:37
armarx::aron::aron_p
const T WriterT::ReturnType const armarx::aron::Path & aron_p
Definition: rw.h:31
armarx::aron::Path
The Path class.
Definition: Path.h:36
armarx::aron::read
requires data::isReader< ReaderT > void read(ReaderT &aron_r, typename ReaderT::InputType &input, Eigen::Matrix< EigenT, rows, cols, options > &ret)
Definition: eigen.h:20
armarx::FramedPosition
The FramedPosition class.
Definition: FramedPose.h:142
armarx::aron::input
ReaderT::InputType & input
Definition: rw.h:19
armarx::FramedOrientation
The FramedOrientation class.
Definition: FramedPose.h:199
armarx::VariantType::FramedOrientation
const VariantTypeId FramedOrientation
Definition: FramedPose.h:40
armarx::aron::requires
requires(not detail::is_optional< BoT >::value) void toAron(std
Definition: aron_conversions.h:157
armarx::fromAron
void fromAron(const arondto::PackagePath &dto, PackageFileLocation &bo)
armarx::aron::write
requires data::isWriter< WriterT > void write(WriterT &aron_w, const Eigen::Matrix< EigenT, rows, cols, options > &input, typename WriterT::ReturnType &ret, const armarx::aron::Path &aron_p=armarx::aron::Path())
Definition: eigen.h:130
armarx::toAron
void toAron(arondto::PackagePath &dto, const PackageFileLocation &bo)
armarx::VariantType::FramedPosition
const VariantTypeId FramedPosition
Definition: FramedPose.h:39
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28