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