aron_conversions.cpp
Go to the documentation of this file.
1 #include "aron_conversions.h"
2 
3 #include <algorithm>
4 #include <cstdint>
5 #include <iterator>
6 
9 
10 #include <armarx/navigation/memory/aron/LaserScannerFeatures.aron.generated.h>
11 
12 #include "types.h"
13 
15 {
16 
17 
18  /************ toAron ************/
19 
20  // auto toAron(const LaserScan& laserScan, aron::LaserScan& aronLaserScan)
21  // {
22  // aronLaserScan.scan = toAron(laserScan);
23  // }
24 
25 
26  // LaserScannerFeatures
27 
28  void
30  {
31  dto.center = bo.center;
32  dto.radius = bo.radius;
33  }
34 
35  void
37  {
38  dto.globalPose = bo.pose.matrix();
39  dto.radii = bo.radii;
40  }
41 
42  void
43  toAron(arondto::LaserScannerFeature& dto, const LaserScannerFeature& bo)
44  {
45  toAron(dto.circle, bo.circle);
46  dto.convexHull = bo.convexHull;
47  toAron(dto.ellipsoid, bo.ellipsoid);
48  dto.points = bo.points;
49  }
50 
51  void
52  toAron(arondto::LaserScannerFeatures& dto, const LaserScannerFeatures& bo)
53  {
54  aron::toAron(dto.frame, bo.frame);
55  aron::toAron(dto.frameGlobalPose, bo.frameGlobalPose);
56  aron::toAron(dto.features, bo.features);
57  }
58 
59  void
61  {
62  bo.center = dto.center;
63  bo.radius = dto.radius;
64  }
65 
66  void
68  {
69  bo.pose = dto.globalPose;
70  bo.radii = dto.radii;
71  }
72 
73  void
74  fromAron(const arondto::LaserScannerFeature& dto, LaserScannerFeature& bo)
75  {
76  bo.convexHull = dto.convexHull;
77  fromAron(dto.circle, bo.circle);
78  fromAron(dto.ellipsoid, bo.ellipsoid);
79 
80  // bo.chain = dto.chain;
81  bo.points = dto.points;
82  }
83 
84  void
85  fromAron(const arondto::LaserScannerFeatures& dto, LaserScannerFeatures& bo)
86  {
87  aron::fromAron(dto.frame, bo.frame);
88  aron::fromAron(dto.frameGlobalPose, bo.frameGlobalPose);
89  aron::fromAron(dto.features, bo.features);
90  }
91 
92 } // namespace armarx::navigation::memory
armarx::navigation::memory::LaserScannerFeatures
Definition: types.h:62
armarx::navigation::components::laser_scanner_feature_extraction::Ellipsoid
memory::Ellipsoid Ellipsoid
Definition: EnclosingEllipsoid.h:42
armarx::navigation::memory::fromAron
void fromAron(const arondto::Circle &dto, Circle &bo)
Definition: aron_conversions.cpp:60
armarx::navigation::memory
Definition: ComponentInterface.ice:37
armarx::navigation::components::laser_scanner_feature_extraction::Circle
memory::Circle Circle
Definition: FeatureExtractor.h:42
armarx::navigation::memory::Ellipsoid
Definition: types.h:34
armarx::navigation::memory::Circle
Definition: types.h:41
types.h
aron_conversions.h
armarx::navigation::memory::toAron
void toAron(arondto::Circle &dto, const Circle &bo)
Definition: aron_conversions.cpp:29
armarx::aron::toAron
void toAron(T &dto, const T &bo)
Framework for converting ARON DTOs (Data Transfer Objects) to C++ BOs (Business Objects) and back.
Definition: aron_conversions.h:74
armarx::navigation::memory::LaserScannerFeature
Definition: types.h:47
armarx::aron::fromAron
void fromAron(const T &dto, T &bo)
Definition: aron_conversions.h:79
armarx::aron::bo
const std::optional< BoT > & bo
Definition: aron_conversions.h:166
NDArray.h