Fawkes API  Fawkes Development Version
RosPointCloudAdapter Class Reference

Standalone PCL to ROS adapter class. More...

#include "pcl_adapter.h"

List of all members.

Classes

class  PointFieldInfo
 Information about the data fields. More...

Public Types

typedef std::vector
< PointFieldInfo
V_PointFieldInfo
 Vector of PointFieldInfo.

Public Member Functions

 RosPointCloudAdapter (fawkes::PointCloudManager *pcl_manager, fawkes::Logger *logger)
 Constructor.
 ~RosPointCloudAdapter ()
 Destructor.
void get_info (std::string &id, unsigned int &width, unsigned int &height, std::string &frame_id, bool &is_dense, V_PointFieldInfo &pfi)
 Get info about point cloud.
void get_data (const std::string &id, unsigned int &width, unsigned int &height, fawkes::Time &time, void **data_ptr, size_t &point_size, size_t &num_points)
 Get current data of point cloud.
void close (const std::string &id)
 Close an adapter.

Detailed Description

Standalone PCL to ROS adapter class.

Currently, the standalone PCL comes with sensor_msgs and std_msgs data types which are incompatible with the ones that come with ROS. Hence, to use both in the same plugin, we need to confine the two different type instances into their own modules. While the rest of the ros-pcl plugins uses ROS-specific data types, this very class interacts with and only with the standalone PCL and the PointCloudManager. Interaction to the ROS parts is done by passing internal data types so that exchange can happen without common sensor_msgs or std_msgs data types.

Author:
Tim Niemueller

Member Typedef Documentation


Constructor & Destructor Documentation

RosPointCloudAdapter::RosPointCloudAdapter ( fawkes::PointCloudManager pcl_manager,
fawkes::Logger logger 
)

Constructor.

Parameters:
pcl_managerPCL manager
loggerlogger

Definition at line 69 of file pcl_adapter.cpp.

RosPointCloudAdapter::~RosPointCloudAdapter ( )

Destructor.

Definition at line 77 of file pcl_adapter.cpp.


Member Function Documentation

void RosPointCloudAdapter::close ( const std::string id)

Close an adapter.

Parameters:
idID of point cloud to close

Definition at line 185 of file pcl_adapter.cpp.

Referenced by RosPointCloudThread::loop().

void RosPointCloudAdapter::get_data ( const std::string id,
unsigned int &  width,
unsigned int &  height,
fawkes::Time time,
void **  data_ptr,
size_t &  point_size,
size_t &  num_points 
)

Get current data of point cloud.

Parameters:
idID of point cloud to get info from
widthupon return contains width of point cloud
heightupon return contains width of point cloud
timecapture time
data_ptrupon return contains pointer to point cloud data
point_sizeupon return contains size of a single point
num_pointsupon return contains number of points

Definition at line 163 of file pcl_adapter.cpp.

References fawkes::PointCloudManager::get_storage_adapter(), fawkes::PointCloudManager::StorageAdapter::width(), fawkes::PointCloudManager::StorageAdapter::height(), fawkes::PointCloudManager::StorageAdapter::data_ptr(), fawkes::PointCloudManager::StorageAdapter::point_size(), fawkes::PointCloudManager::StorageAdapter::num_points(), and fawkes::PointCloudManager::StorageAdapter::get_time().

Referenced by RosPointCloudThread::loop().

void RosPointCloudAdapter::get_info ( std::string id,
unsigned int &  width,
unsigned int &  height,
std::string frame_id,
bool &  is_dense,
V_PointFieldInfo pfi 
)

Get info about point cloud.

Parameters:
idID of point cloud to get info from
widthupon return contains width of point cloud
heightupon return contains width of point cloud
frame_idupon return contains frame ID of the point cloud
is_denseupon return contains true if point cloud is dense and false otherwise
pfiupon return contains data type information

Definition at line 128 of file pcl_adapter.cpp.

References fawkes::PointCloudManager::get_storage_adapter(), fawkes::PointCloudManager::exists_pointcloud(), and fawkes::PointCloudManager::get_pointcloud().

Referenced by RosPointCloudThread::init().


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