Go to the documentation of this file.
26 #include <pcl/io/pcd_io.h>
27 #include <pcl/point_types.h>
36 #include <VisionX/components/pointcloud_processor/PointCloudToArMem/PointCloudToArMemInterface.h>
39 #include <VisionX/libraries/armem/vision/pointcloud/core/aron/PointCloudXYZ.aron.generated.h>
40 #include <VisionX/libraries/armem/vision/pointcloud/core/aron/PointCloudXYZL.aron.generated.h>
41 #include <VisionX/libraries/armem/vision/pointcloud/core/aron/PointCloudXYZRGBA.aron.generated.h>
42 #include <VisionX/libraries/armem/vision/pointcloud/core/aron/PointCloudXYZRGBL.aron.generated.h>
67 return "PointCloudToArMem";
83 template <
class Po
intT,
class AronT>
85 getDataAndSendToMemory()
90 typename pcl::PointCloud<PointT>::Ptr inputCloud(
new pcl::PointCloud<PointT>());
102 if (p.numClouds <= 0 || currentCloud <= p.numClouds)
115 arondto.pointcloud = *inputCloud;
123 visionx::armem::pointcloud::GetCoreSegmentNameFor<PointT>(),
132 auto result = memoryWriter.
commit(
c);
134 if (not result.allSuccess())
137 <<
"An error occured when sending pointclouds to the memory. "
138 "Try to continue with next PC. The message was: "
139 << result.allErrorMessages();
148 ARMARX_INFO <<
"Timeout or error while waiting for point cloud data";
161 bool removeNaNs =
true;
165 std::string targetMemoryName =
"Vision";
169 std::atomic_bool processing =
false;
#define TIMING_START(name)
std::string getDefaultName() const override
Retrieve default name of component.
std::vector< aron::data::DictPtr > instancesData
The entity data.
A bundle of updates to be sent to the memory.
float confidence
An optional confidence, may be used for things like decay.
void process() override
Process the vision component.
void onConnectPointCloudProcessor() override
Implement this method in the PointCloudProcessor in order execute parts when the component is fully i...
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
#define TIMING_END_STREAM(name, os)
Adds the Memory Name System client component plugin.
const constexpr char * ENTITY_NAME
void provideResultPointClouds(const PointCloudPtrT &pointClouds, std::string providerName="")
sends result PointClouds for visualization
The PointCloudProcessor class provides an interface for access to PointCloudProviders via Ice and sha...
void onInitPointCloudProcessor() override
Setup the vision component.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
bool waitForPointClouds(int milliseconds=1000)
Wait for new PointClouds.
An update of an entity for a specific point in time.
Helps a memory client sending data to a memory.
CommitResult commit(const Commit &commit) const
Writes a Commit to the memory.
void onDisconnectPointCloudProcessor() override
Implement this method in the PointCloudProcessor in order execute parts when the component looses net...
int getPointClouds(const PointCloudPtrT &pointCloudPtr)
Poll PointClouds from provider.
void filterNaNs(pcl::PointCloud< PointT > &pc)
Time referencedTime
Time when this entity update was created (e.g.
std::int64_t toMilliSeconds() const
Returns the amount of milliseconds.
void onExitPointCloudProcessor() override
Exit the ImapeProcessor component.
static Duration MicroSeconds(std::int64_t microSeconds)
Constructs a duration in microseconds.
MemoryID entityID
The entity's ID.
Time sentTime
Time when this update was sent to the memory server.
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
const constexpr char * POINT_XYZRGBA_SLUG
const armem::MemoryID MemoryID