Fawkes API  Fawkes Development Version
PointCloudDBPipeline< PointType > Class Template Reference

Database point cloud pipeline base class. More...

#include <pcl_db_pipeline.h>

Inheritance diagram for PointCloudDBPipeline< PointType >:

Public Member Functions

 PointCloudDBPipeline (mongo::DBClientBase *mongodb_client, fawkes::Configuration *config, fawkes::Logger *logger, ColorCloudPtr output)
 Constructor. More...
 
virtual ~PointCloudDBPipeline ()
 Destructor. More...
 
ApplicabilityStatus applicable (std::vector< long long > &times, std::string &database, std::string &collection)
 Check if this pipeline instance is suitable for the given times. More...
 

Protected Types

typedef pcl::PointCloud< PointType > Cloud
 Basic point cloud type. More...
 
typedef pcl::PointXYZRGB ColorPointType
 Colored point type. More...
 
typedef pcl::PointCloud< ColorPointTypeColorCloud
 Type for colored point clouds based on ColorPointType. More...
 
typedef Cloud::Ptr CloudPtr
 Shared pointer to cloud. More...
 
typedef Cloud::ConstPtr CloudConstPtr
 Shared pointer to constant cloud. More...
 
typedef ColorCloud::Ptr ColorCloudPtr
 Shared pointer to colored cloud. More...
 
typedef ColorCloud::ConstPtr ColorCloudConstPtr
 Shared pointer to constant colored cloud. More...
 

Protected Member Functions

void read_gridfs_file (void *dataptr, std::string &database, std::string filename)
 Read a file from MongoDB GridFS. More...
 
std::vector< CloudPtrretrieve_clouds (std::vector< long long > &times, std::vector< long long > &actual_times, std::string &database, std::string &collection)
 Retrieve point clouds from database. More...
 

Protected Attributes

const char * name_
 Name of the pipeline. More...
 
long cfg_pcl_age_tolerance_
 Age tolerance for retrieved point clouds. More...
 
long cfg_transform_range_ [2]
 Transform range start and end times. More...
 
mongo::DBClientBase * mongodb_client_
 MongoDB client to retrieve data. More...
 
fawkes::Loggerlogger_
 Logger for informative messages. More...
 
ColorCloudPtr output_
 The final (colored) output of the pipeline. More...
 

Detailed Description

template<typename PointType>
class PointCloudDBPipeline< PointType >

Database point cloud pipeline base class.

Common functionality for pcl-db-* plugins operating on point clouds restored from MongoDB.

Author
Tim Niemueller

Definition at line 84 of file pcl_db_pipeline.h.

Member Typedef Documentation

◆ Cloud

template<typename PointType>
typedef pcl::PointCloud<PointType> PointCloudDBPipeline< PointType >::Cloud
protected

Basic point cloud type.

Definition at line 88 of file pcl_db_pipeline.h.

◆ CloudConstPtr

template<typename PointType>
typedef Cloud::ConstPtr PointCloudDBPipeline< PointType >::CloudConstPtr
protected

Shared pointer to constant cloud.

Definition at line 97 of file pcl_db_pipeline.h.

◆ CloudPtr

template<typename PointType>
typedef Cloud::Ptr PointCloudDBPipeline< PointType >::CloudPtr
protected

Shared pointer to cloud.

Definition at line 95 of file pcl_db_pipeline.h.

◆ ColorCloud

template<typename PointType>
typedef pcl::PointCloud<ColorPointType> PointCloudDBPipeline< PointType >::ColorCloud
protected

Type for colored point clouds based on ColorPointType.

Definition at line 93 of file pcl_db_pipeline.h.

◆ ColorCloudConstPtr

template<typename PointType>
typedef ColorCloud::ConstPtr PointCloudDBPipeline< PointType >::ColorCloudConstPtr
protected

Shared pointer to constant colored cloud.

Definition at line 102 of file pcl_db_pipeline.h.

◆ ColorCloudPtr

template<typename PointType>
typedef ColorCloud::Ptr PointCloudDBPipeline< PointType >::ColorCloudPtr
protected

Shared pointer to colored cloud.

Definition at line 100 of file pcl_db_pipeline.h.

◆ ColorPointType

template<typename PointType>
typedef pcl::PointXYZRGB PointCloudDBPipeline< PointType >::ColorPointType
protected

Colored point type.

Definition at line 91 of file pcl_db_pipeline.h.

Constructor & Destructor Documentation

◆ PointCloudDBPipeline()

template<typename PointType>
PointCloudDBPipeline< PointType >::PointCloudDBPipeline ( mongo::DBClientBase *  mongodb_client,
fawkes::Configuration config,
fawkes::Logger logger,
ColorCloudPtr  output 
)
inline

Constructor.

Parameters
mongodb_clientMongoDB client
configconfiguration
loggerLogger
outputoutput point cloud

Definition at line 111 of file pcl_db_pipeline.h.

◆ ~PointCloudDBPipeline()

template<typename PointType>
virtual PointCloudDBPipeline< PointType >::~PointCloudDBPipeline ( )
inlinevirtual

Destructor.

Definition at line 132 of file pcl_db_pipeline.h.

Member Function Documentation

◆ applicable()

template<typename PointType>
ApplicabilityStatus PointCloudDBPipeline< PointType >::applicable ( std::vector< long long > &  times,
std::string &  database,
std::string &  collection 
)
inline

Check if this pipeline instance is suitable for the given times.

Retrieves information about the point clouds for the specified times and checks if this pipeline (depending on the template parameter) is suitable for the processing of these pipelines.

Parameters
timestimes for which to check the point clouds
databaseddatabase from which to retrieve the information
collectioncollection from which to retrieve the information
Returns
applicability status

Definition at line 146 of file pcl_db_pipeline.h.

Referenced by PointCloudDBRetrieveThread::loop(), and PointCloudDBMergeThread::loop().

◆ read_gridfs_file()

template<typename PointType>
void PointCloudDBPipeline< PointType >::read_gridfs_file ( void *  dataptr,
std::string &  database,
std::string  filename 
)
inlineprotected

Read a file from MongoDB GridFS.

Parameters
dataptrPointer to buffer to read data to. Make sure it is of sufficient size.
databasedatabase from which to read the file
filenamename of file to read from GridFS.

Definition at line 230 of file pcl_db_pipeline.h.

Referenced by PointCloudDBPipeline< pcl::PointXYZ >::retrieve_clouds().

◆ retrieve_clouds()

template<typename PointType>
std::vector<CloudPtr> PointCloudDBPipeline< PointType >::retrieve_clouds ( std::vector< long long > &  times,
std::vector< long long > &  actual_times,
std::string &  database,
std::string &  collection 
)
inlineprotected

Retrieve point clouds from database.

Parameters
timestimestamps for when to read the point clouds. The method will retrieve the point clouds with the minimum difference between the desired and actual times.
actual_timesupon return contains the actual times of the point clouds retrieved based on the desired times.
databasename of the database to retrieve data from
collectionname of the collection to retrieve data from.
Returns
vector of shared pointers to retrieved point clouds

Definition at line 266 of file pcl_db_pipeline.h.

Referenced by PointCloudDBMergePipeline< pcl::PointXYZ >::merge(), and PointCloudDBRetrievePipeline< pcl::PointXYZ >::retrieve().

Member Data Documentation

◆ cfg_pcl_age_tolerance_

◆ cfg_transform_range_

◆ logger_

◆ mongodb_client_

◆ name_

◆ output_

template<typename PointType>
ColorCloudPtr PointCloudDBPipeline< PointType >::output_
protected

The final (colored) output of the pipeline.

Definition at line 341 of file pcl_db_pipeline.h.

Referenced by PointCloudDBMergePipeline< pcl::PointXYZ >::merge(), and PointCloudDBRetrievePipeline< pcl::PointXYZ >::retrieve().


The documentation for this class was generated from the following file: