Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
laser_assembler::BaseAssemblerSrv< T > Class Template Reference

Maintains a history of point clouds and generates an aggregate point cloud upon request. More...

#include <base_assembler_srv.h>

List of all members.

Public Member Functions

 BaseAssemblerSrv ()
virtual void ConvertToCloud (const std::string &fixed_frame_id, const T &scan_in, sensor_msgs::PointCloud &cloud_out)=0
 Converts the current scan into a cloud in the specified fixed frame.
virtual unsigned int GetPointsInScan (const T &scan)=0
 Returns the number of points in the current scan.
void start ()
 Tells the assembler to start listening to input data It is possible that a derived class needs to initialize and configure various things before actually beginning to process scans. Calling start create subcribes to the input stream, thus allowing the scanCallback and ConvertToCloud to be called. Start should be called only once.
 ~BaseAssemblerSrv ()

Protected Attributes

ros::NodeHandle n_
ros::NodeHandle private_ns_
tf::TransformListenertf_

Private Member Functions

bool buildCloud (AssembleScans::Request &req, AssembleScans::Response &resp)
 Service Callback function called whenever we need to build a cloud.
void scansCallback (const boost::shared_ptr< const T > &scan_ptr)
 Callback function for every time we receive a new scan.

Private Attributes

ros::ServiceServer cloud_srv_server_
unsigned int downsample_factor_
 Specify how much to downsample the data. A value of 1 preserves all the data. 3 would keep 1/3 of the data.
std::string fixed_frame_
 The frame to transform data into upon receipt.
unsigned int max_scans_
 The max number of scans to store in the scan history.
std::deque
< sensor_msgs::PointCloud > 
scan_hist_
 Stores history of scans.
boost::mutex scan_hist_mutex_
message_filters::Subscriber< Tscan_sub_
tf::MessageFilter< T > * tf_filter_
message_filters::Connection tf_filter_connection_
double tf_tolerance_secs_
 How long we should wait before processing the input data. Very useful for laser scans.
unsigned int total_pts_
 The number points currently in the scan history.

Detailed Description

template<class T>
class laser_assembler::BaseAssemblerSrv< T >

Maintains a history of point clouds and generates an aggregate point cloud upon request.

Todo:
Clean up the doxygen part of this header

ROS Parameters

Reads the following parameters from the parameter server

ROS Service Calls

Definition at line 72 of file base_assembler_srv.h.


Constructor & Destructor Documentation

Definition at line 147 of file base_assembler_srv.h.

Definition at line 219 of file base_assembler_srv.h.


Member Function Documentation

template<class T >
bool laser_assembler::BaseAssemblerSrv< T >::buildCloud ( AssembleScans::Request &  req,
AssembleScans::Response &  resp 
) [private]

Service Callback function called whenever we need to build a cloud.

Definition at line 261 of file base_assembler_srv.h.

template<class T>
virtual void laser_assembler::BaseAssemblerSrv< T >::ConvertToCloud ( const std::string &  fixed_frame_id,
const T scan_in,
sensor_msgs::PointCloud &  cloud_out 
) [pure virtual]

Converts the current scan into a cloud in the specified fixed frame.

Note: Once implemented, ConvertToCloud should NOT catch TF exceptions. These exceptions are caught by BaseAssemblerSrv, and will be counted for diagnostic information

Parameters:
fixed_frame_idThe name of the frame in which we want cloud_out to be in
scan_inThe scan that we want to convert
cloud_outThe result of transforming scan_in into a cloud in frame fixed_frame_id
template<class T>
virtual unsigned int laser_assembler::BaseAssemblerSrv< T >::GetPointsInScan ( const T scan) [pure virtual]

Returns the number of points in the current scan.

Parameters:
scanThe scan for for which we want to know the number of points
Returns:
the number of points in scan

Implemented in laser_assembler::LaserScanAssemblerSrv, and laser_assembler::PointCloudAssemblerSrv.

template<class T>
void laser_assembler::BaseAssemblerSrv< T >::scansCallback ( const boost::shared_ptr< const T > &  scan_ptr) [private]

Callback function for every time we receive a new scan.

Definition at line 228 of file base_assembler_srv.h.

template<class T >
void laser_assembler::BaseAssemblerSrv< T >::start ( )

Tells the assembler to start listening to input data It is possible that a derived class needs to initialize and configure various things before actually beginning to process scans. Calling start create subcribes to the input stream, thus allowing the scanCallback and ConvertToCloud to be called. Start should be called only once.

Definition at line 204 of file base_assembler_srv.h.


Member Data Documentation

Definition at line 112 of file base_assembler_srv.h.

template<class T>
unsigned int laser_assembler::BaseAssemblerSrv< T >::downsample_factor_ [private]

Specify how much to downsample the data. A value of 1 preserves all the data. 3 would keep 1/3 of the data.

Definition at line 142 of file base_assembler_srv.h.

template<class T>
std::string laser_assembler::BaseAssemblerSrv< T >::fixed_frame_ [private]

The frame to transform data into upon receipt.

Definition at line 136 of file base_assembler_srv.h.

template<class T>
unsigned int laser_assembler::BaseAssemblerSrv< T >::max_scans_ [private]

The max number of scans to store in the scan history.

Definition at line 133 of file base_assembler_srv.h.

template<class T>
ros::NodeHandle laser_assembler::BaseAssemblerSrv< T >::n_ [protected]

Definition at line 108 of file base_assembler_srv.h.

Definition at line 107 of file base_assembler_srv.h.

template<class T>
std::deque<sensor_msgs::PointCloud> laser_assembler::BaseAssemblerSrv< T >::scan_hist_ [private]

Stores history of scans.

Definition at line 126 of file base_assembler_srv.h.

template<class T>
boost::mutex laser_assembler::BaseAssemblerSrv< T >::scan_hist_mutex_ [private]

Definition at line 127 of file base_assembler_srv.h.

Definition at line 113 of file base_assembler_srv.h.

template<class T>
tf::TransformListener* laser_assembler::BaseAssemblerSrv< T >::tf_ [protected]

Definition at line 105 of file base_assembler_srv.h.

Definition at line 114 of file base_assembler_srv.h.

Definition at line 115 of file base_assembler_srv.h.

template<class T>
double laser_assembler::BaseAssemblerSrv< T >::tf_tolerance_secs_ [private]

How long we should wait before processing the input data. Very useful for laser scans.

Definition at line 139 of file base_assembler_srv.h.

template<class T>
unsigned int laser_assembler::BaseAssemblerSrv< T >::total_pts_ [private]

The number points currently in the scan history.

Definition at line 130 of file base_assembler_srv.h.


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


laser_assembler
Author(s): Vijay Pradeep
autogenerated on Thu Apr 14 2016 11:56:55