VisionMemory.cpp
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package VisionX::ArmarXObjects::ArMemVisionMemory
17 * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
18 * @date 2020
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#include "VisionMemory.h"
24
26
28#include <RobotAPI/libraries/armem_vision/aron/OccupancyGrid.aron.generated.h>
29
30#include <VisionX/libraries/armem/vision/images/core/aron/ImageDepth.aron.generated.h>
31#include <VisionX/libraries/armem/vision/images/core/aron/ImageRGB.aron.generated.h>
32
34{
35
38 {
41 defs->optional(properties.imageRGBMaxHistorySize, "imageRGBMaxHistorySize");
42 defs->optional(properties.imageDepthMaxHistorySize, "imageDepthMaxHistorySize");
43 defs->optional(properties.occupancyGridMaxHistorySize, "occupancyGridMaxHistorySize");
44 defs->optional(properties.pointCloudMaxHistorySize, "pointCloudMaxHistorySize");
45
46 pointCloudXYZCoreSegment.defineProperties(defs, "pcxyz.");
47 pointCloudXYZLCoreSegment.defineProperties(defs, "pcxyzl.");
48 pointCloudXYZRGBACoreSegment.defineProperties(defs, "pcxyzrgba.");
49 pointCloudXYZRGBLCoreSegment.defineProperties(defs, "pcxyzrgbl.");
50
51 return defs;
52 }
53
55 pointCloudXYZCoreSegment(iceAdapter(), properties.pointCloudMaxHistorySize),
56 pointCloudXYZLCoreSegment(iceAdapter(), properties.pointCloudMaxHistorySize),
57 pointCloudXYZRGBACoreSegment(iceAdapter(), properties.pointCloudMaxHistorySize),
58 pointCloudXYZRGBLCoreSegment(iceAdapter(), properties.pointCloudMaxHistorySize),
59
60 monocularCameraCalibrationCoreSegment(iceAdapter(), -1),
61 stereoCameraCalibrationCoreSegment(iceAdapter(), -1)
62 {
63 setMemoryName("Vision");
64 }
65
66 std::string
68 {
69 return "VisionMemory";
70 }
71
72 std::string
74 {
75 return GetDefaultName();
76 }
77
78 void
80 {
81 // Initialize default segments
82 {
84 "ImageRGB", visionx::armem_images::arondto::ImageRGB::ToAronType());
85 cs.setMaxHistorySize(properties.imageRGBMaxHistorySize);
86 }
87
88 {
90 "ImageDepth", visionx::armem_images::arondto::ImageDepth::ToAronType());
91 cs.setMaxHistorySize(properties.imageDepthMaxHistorySize);
92 }
93
94 {
96 "OccupancyGrid", armem::vision::arondto::OccupancyGrid::ToAronType());
97 cs.setMaxHistorySize(properties.occupancyGridMaxHistorySize);
98 }
99
100 {
101 pointCloudXYZCoreSegment.init();
102 pointCloudXYZLCoreSegment.init();
103 pointCloudXYZRGBACoreSegment.init();
104 pointCloudXYZRGBLCoreSegment.init();
105 }
106
107 {
108 monocularCameraCalibrationCoreSegment.init();
109 stereoCameraCalibrationCoreSegment.init();
110 }
111 }
112
113 void
117
118 void
122
123 void
127
128
130} // namespace armarx::armem::server
#define ARMARX_REGISTER_COMPONENT_EXECUTABLE(ComponentT, applicationName)
Definition Decoupled.h:29
Default component property definition container.
Definition Component.h:70
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition Component.cpp:90
void onInitComponent() override
Pure virtual hook for the subclass.
void onDisconnectComponent() override
Hook for subclass.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Creates the property definition container.
void onConnectComponent() override
Pure virtual hook for the subclass.
void onExitComponent() override
Hook for subclass.
std::string getDefaultName() const override
Retrieve default name of component.
CoreSegment & addCoreSegment(const std::string &name, Args... args)
void setMaxHistorySize(long maxSize)
Sets the maximum history size of entities in this container.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.