PointCloudProcessor.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package VisionX::Core
19 * @author David Gonzalez Aguirre (david dot gonzalez at kit dot edu)
20 * @date 2014
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25#pragma once
26
27// ArmarXCore
32
33// VisionXInterfaces
34#include <VisionX/interface/core/DataTypes.h>
35#include <VisionX/interface/core/PointCloudProcessorInterface.h>
36
37// VisionXTools
38#include <condition_variable>
39#include <mutex>
40#include <shared_mutex>
41
42#include <IceUtil/IceUtil.h>
43
45
47#include "PointCloudProvider.h"
48
49namespace visionx
50{
51 // ====================================================================== //
52 // == class PointCloudTransferStats declaration ============================== //
53 // ====================================================================== //
54
55 /**
56 * The PointCloudTransferStats class provides information on the connection
57 * between PointCloudProvider and PointCloudProcessor. Use
58 * PointCloudProcessorBase::getPointCloudTransferStats() in order to retrieve the
59 * statistics
60 */
62 {
63
64 public:
66 {
68 pollingFPS.reset();
69 }
70
71 /// Statistics for the PointClouds announced by the PointCloudProvider.
73
74 /// Statistics for the PointClouds polled by the PointCloudProcessor.
76 };
77
78 // ====================================================================== //
79 // == class PointCloudProviderInfo declaration ========================== //
80 // ====================================================================== //
81
83 {
84 public:
85 /// Proxy to PointCloud provider.
86 PointCloudProviderInterfacePrx proxy;
87
88 /// Memory block.
89 std::vector<unsigned char> buffer;
90
91 /// PointCloud format struct that contains all necessary PointCloud information.
92 MetaPointCloudFormatPtr pointCloudFormat;
93
94 /// Indicates whether an PointCloud is available.
96
97 /// Transfer mode of images
98 ImageTransferMode pointCloudTransferMode;
99
100 /// Conditional variable used internally for synchronization purposes
101 std::shared_ptr<std::condition_variable> pointCloudAvailableEvent;
102 };
103
109
110 // ====================================================================== //
111 // == class ResultPointCloudProvider declaration ======================== //
112 // ====================================================================== //
113 /**
114 * The ResultPointCloudProvider is used by the PointCloudProcessor to stream
115 * result PointClouds to any other processor (e.g. PointCloudMonitor)
116 * Use PointCloudProcessor::enableVisualization() and PointCloudProcessor::provideResultPointClouds()
117 * in order to offer result PointClouds in an PointCloud processor.
118 */
120 {
122
123 public:
125
126 template <typename PointCloudPtrT>
127 void
128 provideResultPointClouds(PointCloudPtrT pointCloudPtr)
129 {
130 providePointCloud(pointCloudPtr);
131 }
132
133 protected:
134 void setResultPointCloudProviderName(const std::string& name);
135
136 virtual std::string getDefaultName() const override;
137
138 void setShmCapacity(size_t shmCapacity);
139 size_t getShmCapacity();
140
141 void setPointContentType(PointContentType type);
142 PointContentType getPointContentType() const;
143
144
145 virtual void onInitPointCloudProvider() override;
146 virtual void onExitPointCloudProvider() override;
147
148 virtual MetaPointCloudFormatPtr getDefaultPointCloudFormat() override;
150
151 private:
152 std::string resultPointCloudProviderName;
153
154 size_t shmCapacity;
155
156 PointContentType pointContentType;
157 };
158
159 /**
160 * @brief Properties of `PointCloudProcessor`.
161 *
162 * Let your own point cloud processor's properties derive from this class
163 * to get the default properties of `PointCloudProcessor`. These include
164 * `ProviderName`, `FrameRate` and `AutomaticTypeConversion`.
165 */
171
172 /**
173 * The PointCloudProcessor class provides an interface for access to
174 * PointCloudProviders via Ice and shared memory. The interface defines a set of
175 * convenience methods which simplify the PointCloud access.
176 */
178 virtual public armarx::Component,
179 virtual public PointCloudProcessorInterface
180 {
181 public:
182 /**
183 * Registers a delayed topic subscription and a delayed provider proxy
184 * retrieval which will be available on the start of the component.
185 *
186 * @param name Provider name
187 */
188 void usingPointCloudProvider(std::string providerName);
189
190 void
191 usingPointCloudProviderFromProperty(const std::string& prop)
192 {
194 }
195
196 /**
197 * Removes topic subscription and provider proxy dependency to release
198 * a point cloud provider. After this, provider is not available in
199 * waitForPointClouds() or getPointClouds() calls.
200 */
201 void releasePointCloudProvider(std::string providerName);
202
203 /**
204 * Select an PointCloudProvider.
205 *
206 * This method subscribes to an an PointCloudProvider and makes the provider
207 * available in the waitForPointClouds() and getPointClouds() methods.
208 *
209 * @param name Ice adapter name of the PointCloudProvider
210 * @param waitForProxy If true, this function blocks until the proxy for the pointCloudProvider becomes available.
211 *
212 * @return Information of the PointCloud provider
213 */
214 PointCloudProviderInfo getPointCloudProvider(std::string name, bool waitForProxy = false);
216
217 /// Get the names of providers for which `usingPointCloudProvider()` has been called.
218 std::vector<std::string> getPointCloudProviderNames() const;
219 /// Indicate whether the given name identifies a known point cloud provider.
220 bool isPointCloudProviderKnown(const std::string& providerName) const;
221
222 /**
223 * Enables visualization
224 *
225 * @param numberPointClouds number of PointClouds provided by the visualization
226 * @param PointCloud::Grid2DDimensions size of PointClouds
227 * @param PointCloudFormatInfo type of PointClouds
228 *
229 * @return Information of the PointCloud provider
230 */
231 template <typename PointT>
232 void
233 enableResultPointClouds(std::string resultProviderName = "")
234 {
235 std::shared_lock lock(pointCloudProviderInfoMutex);
236
237 if (pointCloudProviderInfoMap.size() == 1)
238 {
240 pointCloudProviderInfoMap.begin()->first, resultProviderName);
241 }
242 else
243 {
244 ARMARX_ERROR << "unable to determine shared memory capacity for result provider. "
245 "(result provider is not enabled!)";
246 }
247 }
248
249 template <typename PointT>
250 void
251 enableResultPointCloudForInputProvider(const std::string& inputProviderName,
252 const std::string& resultProviderName = "")
253 {
254 std::shared_lock lock(pointCloudProviderInfoMutex);
255
256 if (pointCloudProviderInfoMap.count(inputProviderName))
257 {
258 MetaPointCloudFormatPtr info =
259 pointCloudProviderInfoMap.at(inputProviderName).pointCloudFormat;
260
261 PointContentType pointContentType = tools::getPointContentType<PointT>();
262
263 size_t capacity = info->capacity * tools::getBytesPerPoint(pointContentType) /
264 tools::getBytesPerPoint(info->type);
265
266 enableResultPointClouds(resultProviderName, capacity, pointContentType);
267 }
268 else
269 {
270 ARMARX_ERROR << "unable to determine shared memory capacity for result provider. "
271 "(result provider is not enabled!)"
272 << "\nThe according input provider is " << inputProviderName;
273 }
274 }
275
276 void enableResultPointClouds(std::string resultProviderName,
277 size_t shmCapacity,
278 PointContentType pointContentType);
279
280 /**
281 * sends result PointClouds for visualization
282 * @see enableVisualization
283 *
284 * @param PointClouds array of PointClouds to send
285 */
286 template <typename PointCloudPtrT>
287 void
288 provideResultPointClouds(const PointCloudPtrT& pointClouds, std::string providerName = "")
289 {
290 std::shared_lock lock(resultProviderMutex);
291
292 if (providerName == "" && resultPointCloudProviders.size() > 0)
293 {
294 providerName = resultPointCloudProviders.begin()->first;
295 }
296
297 if (resultPointCloudProviders.count(providerName))
298 {
300 pointClouds);
301 }
302 else
303 {
304 ARMARX_WARNING << "unable to find provider name: " << providerName
305 << "\nknown names :\n"
307 }
308 }
309
310 template <typename PointCloudPtrT>
311 void
312 provideResultPointClouds(const std::string& providerName, const PointCloudPtrT& pointClouds)
313 {
314 provideResultPointClouds(pointClouds, providerName);
315 }
316
317 /**
318 * Wait for new PointClouds.
319 *
320 * Wait for new PointCloud of an PointCloud provider. Use if only one
321 * PointCloudProvider is used (see usingPointCloudProvider).
322 *
323 * @param milliseconds Timeout for waiting
324 *
325 * @return True if new PointClouds are available. False in case of error or
326 * timeout
327 */
328 bool waitForPointClouds(int milliseconds = 1000);
329
330 /**
331 * Wait for new PointClouds.
332 *
333 * Wait for new PointCloud of an PointCloud provider. Use if multiple
334 * PointCloudProviders are used (see usingPointCloudProvider).
335 *
336 * @param providerName Name of provider to wait for PointClouds
337 * @param milliseconds Timeout for waiting
338 *
339 * @return True if new PointClouds are available. False in case of error or
340 * timeout
341 */
342 bool waitForPointClouds(const std::string& providerName, int milliseconds = 1000);
343
344 /**
345 * Returns current status for the given point cloud. True if new data is available, false otherwise.
346 *
347 * This operation does not block. It just returns the current status.
348 * Use this if you want to get status of a point cloud without polling
349 * it for a given time like the other methods do.
350 *
351 * @param providerName Name of provider to wait for PointClouds
352 *
353 * @return True if new data from the provider is available. False otherwise.
354 */
355 bool pointCloudHasNewData(std::string providerName);
356
357 /**
358 * Poll PointClouds from provider.
359 *
360 * Polls PointClouds from a used PointCloudProvider either via shared memory or
361 * via Ice. If both components run on the same machine, shared memory
362 * transfer is used. Otherwise Ice is used for PointCloud transmission. The
363 * transfer type is decided in the usingPointCloudProvider method and is set
364 * in the corresponding PointCloudFormatInfo.
365 *
366 * Use this method if only one PointCloudProvider is used.
367 *
368 * @param ppPointClouds PointCloud buffers where the PointClouds are
369 * copied to. The buffers have to be
370 * initialized by the component. All
371 * required information for the allocation
372 * of the buffers can be found in the
373 * corresponding PointCloudFormatInfo.
374 *
375 * @return Number of PointClouds copied. Zero if no new PointClouds have been
376 * available.
377 */
378 template <typename PointCloudPtrT>
379 int
380 getPointClouds(const PointCloudPtrT& pointCloudPtr)
381 {
382 if (pointCloudProviderInfoMap.size() != 1)
383 {
384 ARMARX_ERROR << "Calling getPointClouds without PointCloudProvider name but using "
385 "multiple PointCloudProviders or without usingPointCloudProvider";
386 return false;
387 }
388
389 std::shared_lock lock(pointCloudProviderInfoMutex);
390
391 std::string providerName = pointCloudProviderInfoMap.begin()->first;
392
393 lock.unlock();
394
395 return getPointClouds(providerName, pointCloudPtr);
396 }
397
398 /**
399 * Poll PointClouds from provider.
400 *
401 * Polls PointClouds from a used PointCloudProvider either via shared memory or
402 * via Ice. If both components run on the same machine, shared memory
403 * transfer is used. Otherwise Ice is used for PointCloud transmission. The
404 * transfer type is decided in the usingPointCloudProvider method and is set
405 * in the corresponding PointCloudFormatInfo.
406 *
407 * Use this method if multiple PointCloudProviders are used.
408 *
409 * @param providerName Name of provider to poll from
410 *
411 * @param ppPointClouds PointCloud buffers where the PointClouds are
412 * copied to. The buffers have to be
413 * initialized by the component. All
414 * required information for the allocation
415 * PointCloudProcessor.h of the buffers can be found in the
416 * corresponding PointCloudFormatInfo.
417 *
418 * @return Number of PointClouds copied. Zero if no new PointClouds have been
419 * available.
420 */
421 template <typename PointCloudPtrT>
422 bool
423 getPointClouds(std::string providerName, const PointCloudPtrT& pointClouds)
424 {
425 using PointCloudT = typename PointCloudPtrT::element_type;
426 using PointT = typename PointCloudT::PointType;
427
428 if (pointClouds == NULL)
429 {
430 ARMARX_ERROR << "pointClouds is NULL";
431 return false;
432 }
433
434 std::shared_lock lock(pointCloudProviderInfoMutex);
435
436 // find PointCloud provider
437 std::map<std::string, PointCloudProviderInfo>::iterator iter =
438 pointCloudProviderInfoMap.find(providerName);
439
440 if (iter == pointCloudProviderInfoMap.end())
441 {
442 ARMARX_ERROR << "Trying to retrieve PointClouds from unknown PointCloud provider. "
443 "Call usingPointCloudProvider before";
444 return false;
445 }
446
447 // check if new PointClouds are available
448 if (!iter->second.pointCloudAvailable)
449 {
450 ARMARX_WARNING << "no point cloud available. use waitForPointCloud()";
451 return false;
452 }
453
454 PointCloudProviderInfo& providerInfo = iter->second;
455
456 if (providerInfo.pointCloudFormat->type !=
459 {
461 ARMARX_WARNING << deactivateSpam(5) << "Requested point cloud format ("
462 << tools::toString(requested) << ")"
463 << " differs from provided format ("
464 << tools::toString(providerInfo.pointCloudFormat->type) << "),"
465 << "\nbut automatic type conversion is disabled."
466 << "\nTo enable automatic type conversion, set the property "
467 "'AutomaticTypeConversion' to true"
468 << "\n (make sure your point cloud processor's properties derive "
469 "from 'PointCloudProcessorPropertyDefinitions')."
470 << "\nThe received point cloud will appear empty.";
471 return false;
472 }
473
474 try
475 {
476 if (providerInfo.pointCloudTransferMode == eIceTransfer)
477 {
478 // providerInfo.info->timeProvided = TimeUtil::GetTime().toMicroSeconds();
479 std::vector<Ice::Byte> blob =
480 providerInfo.proxy->getPointCloud(providerInfo.pointCloudFormat);
481 blob.swap(providerInfo.buffer);
482 }
483 else
484 {
485 usedPointCloudProviders[providerName]->getData(providerInfo.buffer,
486 providerInfo.pointCloudFormat);
487 }
488 // usedPointCloudProviders[providerName]->getData(providerInfo.buffer, providerInfo.pointCloudFormat);
489
490 void* bufferPtr = providerInfo.buffer.data();
491 void** bufferPtrPtr = &bufferPtr; // Why though?
493 bufferPtrPtr, providerInfo.pointCloudFormat, pointClouds);
494 }
495 catch (...)
496 {
497 ARMARX_ERROR << "unable to get point cloud: "
499 return false;
500 }
501
502
503 // todo lock for writing...
504 iter->second.pointCloudAvailable = false;
505
506 IceUtil::Time timeReceived = IceUtil::Time::now();
507 IceUtil::Time timeProvided =
508 IceUtil::Time::microSeconds(providerInfo.pointCloudFormat->timeProvided);
509
510 pointClouds->header.stamp = providerInfo.pointCloudFormat->timeProvided;
511 pointClouds->header.seq = providerInfo.pointCloudFormat->seq;
512 //pointClouds->header.frame_id = providerInfo.pointCloudFormat->frameId;
513
514 long transferTime = (timeReceived - timeProvided).toMilliSeconds();
515
516 ARMARX_DEBUG << "received point cloud size: " << pointClouds->width << "x"
517 << pointClouds->height << ". took " << transferTime << " ms.";
518
519 std::unique_lock lock2(statisticsMutex);
520
521 statistics[providerName].pollingFPS.update();
522
523 return true;
524 }
525
526 MetaPointCloudFormatPtr getPointCloudFormat(std::string providerName);
527
528
529 /**
530 * Retrieve statistics for a connection to an PointCloudProvider.
531 *
532 * @param providerName Name of the provider
533 * @param resetStats Reset statistics
534 *
535 * @return Reference to statistics for the connection to the provder
536 */
538 bool resetStats = false);
539
540 /**
541 * @brief Get the reference frame of the point cloud by given provider.
542 * @param providerName The point cloud provider's name.
543 * @return The point cloud's reference frame, or empty string if provider
544 * is unknown or has not specified a reference frame.
545 */
546 std::string getPointCloudFrame(const std::string& providerName,
547 const std::string& defaultFrame = "");
548
549 protected:
550 // ================================================================== //
551 // == Interface of an PointCloudProcessor =========================== //
552 // ================================================================== //
553 /**
554 * Setup the vision component.
555 *
556 * Implement this method in the PointCloudProcessor in order to setup its
557 * parameters. Use this for the registration of adaptars and
558 * subscription to topics
559 *
560 * @param argc number of filtered command line arguments
561 * @param argv filtered command line arguments
562 */
563 virtual void onInitPointCloudProcessor() = 0;
564
565 /**
566 * Implement this method in the PointCloudProcessor in order execute parts
567 * when the component is fully initialized and about to run.
568 */
570
571 /**
572 * Implement this method in the PointCloudProcessor in order execute parts
573 * when the component looses network connectivity.
574 */
575 virtual void
579
580 /**
581 * Exit the ImapeProcessor component.
582 *
583 * Implement this method in order to clean up the PointCloudProcessor
584 */
585 virtual void onExitPointCloudProcessor() = 0;
586
587 /**
588 * Process the vision component.
589 *
590 * The main loop of the PointCloudProcessor to be implemented in the
591 * subclass. Do not block this method. One process should execute
592 * exactly one PointCloud processing step.
593 */
594 virtual void process() = 0;
595
596 // ================================================================== //
597 // == RunningComponent implementation =============================== //
598 // ================================================================== //
599
600 /// @see Component::onInitComponent()
601 virtual void onInitComponent() override;
602
603 /// @see Component::onConnectComponent()
604 virtual void onConnectComponent() override;
605
606 /// @see Component::onDisconnectComponent()
607 virtual void onDisconnectComponent() override;
608
609 /// @see Component::onExitComponent()
610 virtual void onExitComponent() override;
611
612 /// @see RunningTask
613 virtual void runProcessor();
614
615
616 protected:
617 // ================================================================== //
618 // == PointCloudListener Ice interface ============================== //
619 // ================================================================== //
620 /**
621 * Listener callback function. This is called by the used PointCloud
622 * providers to report the availability of a newly captured
623 * PointCloud.
624 *
625 * @param providerName The reporting PointCloud provider name
626 */
627 void reportPointCloudAvailable(const std::string& providerName,
628 const Ice::Current& c = Ice::emptyCurrent) override;
629
630 // PointCloud provider.
631
632 using PointCloudProviderMap = std::map<
633 std::string,
636
637 std::map<std::string, PointCloudProviderInfo> pointCloudProviderInfoMap;
639
640 // Result PointCloud visualization.
641 std::map<std::string, IceInternal::Handle<ResultPointCloudProvider>>
643 std::shared_mutex resultProviderMutex;
644
645 // Statistics.
646 std::mutex statisticsMutex;
647 std::map<std::string, PointCloudTransferStats> statistics;
648
650
653
655 };
656
657 /// Shared pointer for convenience.
659
660} // namespace visionx
constexpr T c
Default component property definition container.
Definition Component.h:70
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
Property< PropertyType > getProperty(const std::string &name)
IceUtil::Handle< IceSharedMemoryConsumer< MemoryObject, MemoryObjectMetaInfo > > pointer_type
pointer type for convenience.
SpamFilterDataPtr deactivateSpam(float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
disables the logging for the current line for the given amount of seconds.
Definition Logging.cpp:99
void waitForProxy(std::string const &name, bool addToDependencies)
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
The FPSCounter class provides methods for calculating the frames per second (FPS) count in periodic t...
Definition FPSCounter.h:37
The PointCloudProcessor class provides an interface for access to PointCloudProviders via Ice and sha...
virtual void onInitComponent() override
void releasePointCloudProvider(std::string providerName)
Removes topic subscription and provider proxy dependency to release a point cloud provider.
std::string getPointCloudFrame(const std::string &providerName, const std::string &defaultFrame="")
Get the reference frame of the point cloud by given provider.
virtual void process()=0
Process the vision component.
virtual void onInitPointCloudProcessor()=0
Setup the vision component.
void enableResultPointCloudForInputProvider(const std::string &inputProviderName, const std::string &resultProviderName="")
std::map< std::string, IceInternal::Handle< ResultPointCloudProvider > > resultPointCloudProviders
std::map< std::string, PointCloudTransferStats > statistics
bool isPointCloudProviderKnown(const std::string &providerName) const
Indicate whether the given name identifies a known point cloud provider.
void enableResultPointClouds(std::string resultProviderName="")
Enables visualization.
virtual void onDisconnectComponent() override
void usingPointCloudProviderFromProperty(const std::string &prop)
int getPointClouds(const PointCloudPtrT &pointCloudPtr)
Poll PointClouds from provider.
void provideResultPointClouds(const std::string &providerName, const PointCloudPtrT &pointClouds)
virtual void onConnectPointCloudProcessor()=0
Implement this method in the PointCloudProcessor in order execute parts when the component is fully i...
MetaPointCloudFormatPtr getPointCloudFormat(std::string providerName)
std::shared_mutex pointCloudProviderInfoMutex
PointCloudProviderMap usedPointCloudProviders
void usingPointCloudProvider(std::string providerName)
Registers a delayed topic subscription and a delayed provider proxy retrieval which will be available...
virtual void onDisconnectPointCloudProcessor()
Implement this method in the PointCloudProcessor in order execute parts when the component looses net...
virtual void onConnectComponent() override
PointCloudProviderInfo getPointCloudProvider(std::string name, bool waitForProxy=false)
Select an PointCloudProvider.
bool pointCloudHasNewData(std::string providerName)
Returns current status for the given point cloud.
bool waitForPointClouds(int milliseconds=1000)
Wait for new PointClouds.
armarx::RunningTask< PointCloudProcessor >::pointer_type processorTask
PointCloudTransferStats getPointCloudTransferStats(std::string providerName, bool resetStats=false)
Retrieve statistics for a connection to an PointCloudProvider.
void provideResultPointClouds(const PointCloudPtrT &pointClouds, std::string providerName="")
sends result PointClouds for visualization
virtual void onExitComponent() override
std::vector< std::string > getPointCloudProviderNames() const
Get the names of providers for which usingPointCloudProvider() has been called.
virtual void onExitPointCloudProcessor()=0
Exit the ImapeProcessor component.
bool getPointClouds(std::string providerName, const PointCloudPtrT &pointClouds)
Poll PointClouds from provider.
void reportPointCloudAvailable(const std::string &providerName, const Ice::Current &c=Ice::emptyCurrent) override
Listener callback function.
std::map< std::string, PointCloudProviderInfo > pointCloudProviderInfoMap
std::map< std::string, armarx::IceSharedMemoryConsumer< unsigned char, MetaPointCloudFormat >::pointer_type > PointCloudProviderMap
ImageTransferMode pointCloudTransferMode
Transfer mode of images.
PointCloudProviderInterfacePrx proxy
Proxy to PointCloud provider.
MetaPointCloudFormatPtr pointCloudFormat
PointCloud format struct that contains all necessary PointCloud information.
std::vector< unsigned char > buffer
Memory block.
std::shared_ptr< std::condition_variable > pointCloudAvailableEvent
Conditional variable used internally for synchronization purposes.
bool pointCloudAvailable
Indicates whether an PointCloud is available.
PointCloudProvider abstract class defines a component which provide point clouds via ice or shared me...
void providePointCloud(PointCloudPtrT pointCloudPtr)
offer the new point cloud.
The PointCloudTransferStats class provides information on the connection between PointCloudProvider a...
FPSCounter pollingFPS
Statistics for the PointClouds polled by the PointCloudProcessor.
FPSCounter pointCloudProviderFPS
Statistics for the PointClouds announced by the PointCloudProvider.
PointContentType getPointContentType() const
void setShmCapacity(size_t shmCapacity)
void provideResultPointClouds(PointCloudPtrT pointCloudPtr)
void setPointContentType(PointContentType type)
virtual void onInitPointCloudProvider() override
This is called when the Component::onInitComponent() is called.
virtual MetaPointCloudFormatPtr getDefaultPointCloudFormat() override
default point cloud format used to initialize shared memory
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
virtual void onExitPointCloudProvider() override
This is called when the Component::onExitComponent() setup is called.
virtual std::string getDefaultName() const override
Retrieve default name of component.
void setResultPointCloudProviderName(const std::string &name)
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
Definition Logging.h:196
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
Definition Logging.h:184
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
Definition Logging.h:193
std::string GetHandledExceptionString()
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
void getMapKeys(const MapType &map, OutputIteratorType it)
Definition algorithm.h:173
visionx::PointContentType getPointContentType()
size_t getBytesPerPoint(visionx::PointContentType pointContent)
std::string toString(PointContentType pointContent)
void convertToPCL(void **source, visionx::MetaPointCloudFormatPtr pointCloudFormat, pcl::PointCloud< pcl::PointXYZRGBA >::Ptr targetPtr)
ArmarX headers.
IceInternal::Handle< PointCloudProcessor > PointCloudProcessorPtr
Shared pointer for convenience.