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#include <RobotAPI/libraries/armem_vision/aron/OccupancyGrid.aron.generated.h>
27
28#include <VisionX/libraries/armem/vision/images/core/aron/ImageDepth.aron.generated.h>
29#include <VisionX/libraries/armem/vision/images/core/aron/ImageRGB.aron.generated.h>
30
32{
33
36 {
39 defs->optional(properties.imageRGBMaxHistorySize, "imageRGBMaxHistorySize");
40 defs->optional(properties.imageDepthMaxHistorySize, "imageDepthMaxHistorySize");
41 defs->optional(properties.occupancyGridMaxHistorySize, "occupancyGridMaxHistorySize");
42 defs->optional(properties.pointCloudMaxHistorySize, "pointCloudMaxHistorySize");
43
44 pointCloudXYZCoreSegment.defineProperties(defs, "pcxyz.");
45 pointCloudXYZLCoreSegment.defineProperties(defs, "pcxyzl.");
46 pointCloudXYZRGBACoreSegment.defineProperties(defs, "pcxyzrgba.");
47 pointCloudXYZRGBLCoreSegment.defineProperties(defs, "pcxyzrgbl.");
48
49 return defs;
50 }
51
53 pointCloudXYZCoreSegment(iceAdapter(), properties.pointCloudMaxHistorySize),
54 pointCloudXYZLCoreSegment(iceAdapter(), properties.pointCloudMaxHistorySize),
55 pointCloudXYZRGBACoreSegment(iceAdapter(), properties.pointCloudMaxHistorySize),
56 pointCloudXYZRGBLCoreSegment(iceAdapter(), properties.pointCloudMaxHistorySize),
57
58 monocularCameraCalibrationCoreSegment(iceAdapter(), -1),
59 stereoCameraCalibrationCoreSegment(iceAdapter(), -1)
60 {
61 setMemoryName("Vision");
62 }
63
64 std::string
66 {
67 return "VisionMemory";
68 }
69
70 void
72 {
73 // Initialize default segments
74 {
76 "ImageRGB", visionx::armem_images::arondto::ImageRGB::ToAronType());
77 cs.setMaxHistorySize(properties.imageRGBMaxHistorySize);
78 }
79
80 {
82 "ImageDepth", visionx::armem_images::arondto::ImageDepth::ToAronType());
83 cs.setMaxHistorySize(properties.imageDepthMaxHistorySize);
84 }
85
86 {
88 "OccupancyGrid", armem::vision::arondto::OccupancyGrid::ToAronType());
89 cs.setMaxHistorySize(properties.occupancyGridMaxHistorySize);
90 }
91
92 {
93 pointCloudXYZCoreSegment.init();
94 pointCloudXYZLCoreSegment.init();
95 pointCloudXYZRGBACoreSegment.init();
96 pointCloudXYZRGBLCoreSegment.init();
97 }
98
99 {
100 monocularCameraCalibrationCoreSegment.init();
101 stereoCameraCalibrationCoreSegment.init();
102 }
103 }
104
105 void
109
110 void
114
115 void
119
120} // namespace armarx::armem::server
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.