Fawkes API
Fawkes Development Version
|
Point cloud adapter class. More...
#include <>>
Classes | |
class | PointFieldInfo |
Information about the data fields. More... | |
Public Types | |
typedef std::vector< PointFieldInfo > | V_PointFieldInfo |
Vector of PointFieldInfo. More... | |
Public Member Functions | |
PointCloudAdapter (fawkes::PointCloudManager *pcl_manager, fawkes::Logger *logger) | |
Constructor. More... | |
~PointCloudAdapter () | |
Destructor. More... | |
void | get_info (const std::string &id, unsigned int &width, unsigned int &height, std::string &frame_id, bool &is_dense, V_PointFieldInfo &pfi) |
Get info about point cloud. More... | |
void | get_data (const std::string &id, std::string &frame_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. More... | |
void | get_data_and_info (const std::string &id, std::string &frame_id, bool &is_dense, unsigned int &width, unsigned int &height, fawkes::Time &time, V_PointFieldInfo &pfi, void **data_ptr, size_t &point_size, size_t &num_points) |
Get data and info of point cloud. More... | |
void | close (const std::string &id) |
Close an adapter. More... | |
Point cloud 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.
Definition at line 38 of file pcl_adapter.h.
typedef std::vector<PointFieldInfo> PointCloudAdapter::V_PointFieldInfo |
Vector of PointFieldInfo.
Definition at line 62 of file pcl_adapter.h.
PointCloudAdapter::PointCloudAdapter | ( | fawkes::PointCloudManager * | pcl_manager, |
fawkes::Logger * | logger | ||
) |
Constructor.
pcl_manager | PCL manager |
logger | logger |
Definition at line 72 of file pcl_adapter.cpp.
PointCloudAdapter::~PointCloudAdapter | ( | ) |
Destructor.
Definition at line 80 of file pcl_adapter.cpp.
void PointCloudAdapter::close | ( | const std::string & | id | ) |
Close an adapter.
id | ID of point cloud to close |
Definition at line 226 of file pcl_adapter.cpp.
Referenced by RosPointCloudThread::loop().
void PointCloudAdapter::get_data | ( | const std::string & | id, |
std::string & | frame_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.
id | ID of point cloud to get info from |
frame_id | upon return contains the frame ID of the point cloud |
width | upon return contains width of point cloud |
height | upon return contains width of point cloud |
time | capture time |
data_ptr | upon return contains pointer to point cloud data |
point_size | upon return contains size of a single point |
num_points | upon return contains number of points |
Definition at line 180 of file pcl_adapter.cpp.
References fawkes::pcl_utils::StorageAdapter::data_ptr(), fawkes::pcl_utils::StorageAdapter::frame_id(), fawkes::PointCloudManager::get_storage_adapter(), fawkes::pcl_utils::StorageAdapter::get_time(), fawkes::pcl_utils::StorageAdapter::height(), fawkes::pcl_utils::StorageAdapter::num_points(), fawkes::pcl_utils::StorageAdapter::point_size(), and fawkes::pcl_utils::StorageAdapter::width().
Referenced by get_data_and_info(), RosPointCloudThread::loop(), and MongoLogPointCloudThread::loop().
void PointCloudAdapter::get_data_and_info | ( | const std::string & | id, |
std::string & | frame_id, | ||
bool & | is_dense, | ||
unsigned int & | width, | ||
unsigned int & | height, | ||
fawkes::Time & | time, | ||
V_PointFieldInfo & | pfi, | ||
void ** | data_ptr, | ||
size_t & | point_size, | ||
size_t & | num_points | ||
) |
Get data and info of point cloud.
id | ID of point cloud to get info from |
frame_id | upon return contains frame ID of the point cloud |
is_dense | upon return contains true if point cloud is dense and false otherwise |
width | upon return contains width of point cloud |
height | upon return contains width of point cloud |
time | capture time for which to get the data and info |
pfi | upon return contains data type information |
data_ptr | upon return contains pointer to point cloud data |
point_size | upon return contains size of a single point |
num_points | upon return contains number of points |
Definition at line 212 of file pcl_adapter.cpp.
References get_data(), and get_info().
Referenced by PointCloudDBStoreThread::loop().
void PointCloudAdapter::get_info | ( | const std::string & | id, |
unsigned int & | width, | ||
unsigned int & | height, | ||
std::string & | frame_id, | ||
bool & | is_dense, | ||
V_PointFieldInfo & | pfi | ||
) |
Get info about point cloud.
id | ID of point cloud to get info from |
width | upon return contains width of point cloud |
height | upon return contains width of point cloud |
frame_id | upon return contains frame ID of the point cloud |
is_dense | upon return contains true if point cloud is dense and false otherwise |
pfi | upon return contains data type information |
Definition at line 139 of file pcl_adapter.cpp.
References fawkes::PointCloudManager::exists_pointcloud(), fawkes::PointCloudManager::get_pointcloud(), and fawkes::PointCloudManager::get_storage_adapter().
Referenced by get_data_and_info(), MongoLogPointCloudThread::init(), and RosPointCloudThread::loop().