Point Cloud Library (PCL)  1.9.1-dev
List of all members | Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes
pcl::HDLGrabber Class Reference

Grabber for the Velodyne High-Definition-Laser (HDL) More...

#include <pcl/io/hdl_grabber.h>

+ Inheritance diagram for pcl::HDLGrabber:

Classes

struct  HDLDataPacket
 
struct  HDLFiringData
 
struct  HDLLaserCorrection
 
struct  HDLLaserReturn
 

Public Types

using sig_cb_velodyne_hdl_scan_point_cloud_xyz = void(const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &, float, float)
 Signal used for a single sector Represents 1 corrected packet from the HDL Velodyne. More...
 
using sig_cb_velodyne_hdl_scan_point_cloud_xyzrgba = void(const pcl::PointCloud< pcl::PointXYZRGBA >::ConstPtr &, float, float)
 Signal used for a single sector Represents 1 corrected packet from the HDL Velodyne. More...
 
using instead = sig_cb_velodyne_hdl_scan_point_cloud_xyzrgba
 
using sig_cb_velodyne_hdl_scan_point_cloud_xyzi = void(const pcl::PointCloud< pcl::PointXYZI >::ConstPtr &, float, float)
 Signal used for a single sector Represents 1 corrected packet from the HDL Velodyne with the returned intensity. More...
 
using sig_cb_velodyne_hdl_sweep_point_cloud_xyz = void(const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &)
 Signal used for a 360 degree sweep Represents multiple corrected packets from the HDL Velodyne This signal is sent when the Velodyne passes angle "0". More...
 
using sig_cb_velodyne_hdl_sweep_point_cloud_xyzi = void(const pcl::PointCloud< pcl::PointXYZI >::ConstPtr &)
 Signal used for a 360 degree sweep Represents multiple corrected packets from the HDL Velodyne with the returned intensity This signal is sent when the Velodyne passes angle "0". More...
 
using sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgba = void(const pcl::PointCloud< pcl::PointXYZRGBA >::ConstPtr &)
 Signal used for a 360 degree sweep Represents multiple corrected packets from the HDL Velodyne This signal is sent when the Velodyne passes angle "0". More...
 
using instead = sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgba
 

Public Member Functions

 HDLGrabber (const std::string &correctionsFile="", const std::string &pcapFile="")
 Constructor taking an optional path to an HDL corrections file. More...
 
 HDLGrabber (const boost::asio::ip::address &ipAddress, const uint16_t port, const std::string &correctionsFile="")
 Constructor taking a specified IP/port and an optional path to an HDL corrections file. More...
 
 ~HDLGrabber () throw ()
 virtual Destructor inherited from the Grabber interface. More...
 
void start () override
 Starts processing the Velodyne packets, either from the network or PCAP file. More...
 
void stop () override
 Stops processing the Velodyne packets, either from the network or PCAP file. More...
 
std::string getName () const override
 Obtains the name of this I/O Grabber. More...
 
bool isRunning () const override
 Check if the grabber is still running. More...
 
float getFramesPerSecond () const override
 Returns the number of frames per second. More...
 
void filterPackets (const boost::asio::ip::address &ipAddress, const uint16_t port=443)
 Allows one to filter packets based on the SOURCE IP address and PORT This can be used, for instance, if multiple HDL LIDARs are on the same network. More...
 
void setLaserColorRGB (const pcl::RGB &color, const uint8_t laserNumber)
 Allows one to customize the colors used by each laser. More...
 
template<typename IterT >
void setLaserColorRGB (const IterT &begin, const IterT &end)
 Allows one to customize the colors used for each of the lasers. More...
 
void setMinimumDistanceThreshold (float &minThreshold)
 Any returns from the HDL with a distance less than this are discarded. More...
 
void setMaximumDistanceThreshold (float &maxThreshold)
 Any returns from the HDL with a distance greater than this are discarded. More...
 
float getMinimumDistanceThreshold ()
 Returns the current minimum distance threshold, in meters. More...
 
float getMaximumDistanceThreshold ()
 Returns the current maximum distance threshold, in meters. More...
 
virtual uint8_t getMaximumNumberOfLasers () const
 Returns the maximum number of lasers. More...
 
- Public Member Functions inherited from pcl::Grabber
 Grabber ()
 Constructor. More...
 
virtual ~Grabber () throw ()
 virtual destructor. More...
 
template<typename T >
boost::signals2::connection registerCallback (const std::function< T > &callback)
 registers a callback function/method to a signal with the corresponding signature More...
 
template<typename T , template< typename > class FunctionT>
boost::signals2::connection registerCallback (const FunctionT< T > &callback)
 registers a callback function/method to a signal with the corresponding signature More...
 
template<typename T >
bool providesCallback () const
 indicates whether a signal with given parameter-type exists or not More...
 

Protected Types

enum  HDLBlock { BLOCK_0_TO_31 = 0xeeff, BLOCK_32_TO_63 = 0xddff }
 

Protected Member Functions

void fireCurrentSweep ()
 
void fireCurrentScan (const uint16_t startAngle, const uint16_t endAngle)
 
void computeXYZI (pcl::PointXYZI &pointXYZI, uint16_t azimuth, HDLLaserReturn laserReturn, HDLLaserCorrection correction)
 
- Protected Member Functions inherited from pcl::Grabber
virtual void signalsChanged ()
 
template<typename T >
boost::signals2::signal< T > * find_signal () const
 
template<typename T >
int num_slots () const
 
template<typename T >
void disconnect_all_slots ()
 
template<typename T >
void block_signal ()
 
template<typename T >
void unblock_signal ()
 
void block_signals ()
 
void unblock_signals ()
 
template<typename T >
boost::signals2::signal< T > * createSignal ()
 

Protected Attributes

HDLLaserCorrection laser_corrections_ [HDL_MAX_NUM_LASERS]
 
uint16_t last_azimuth_
 
pcl::PointCloud< pcl::PointXYZ >::Ptr current_scan_xyz_
 
pcl::PointCloud< pcl::PointXYZ >::Ptr current_sweep_xyz_
 
pcl::PointCloud< pcl::PointXYZI >::Ptr current_scan_xyzi_
 
pcl::PointCloud< pcl::PointXYZI >::Ptr current_sweep_xyzi_
 
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr current_scan_xyzrgba_
 
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr current_sweep_xyzrgba_
 
boost::signals2::signal< sig_cb_velodyne_hdl_sweep_point_cloud_xyz > * sweep_xyz_signal_
 
boost::signals2::signal< sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgba > * sweep_xyzrgba_signal_
 
boost::signals2::signal< sig_cb_velodyne_hdl_sweep_point_cloud_xyzi > * sweep_xyzi_signal_
 
boost::signals2::signal< sig_cb_velodyne_hdl_scan_point_cloud_xyz > * scan_xyz_signal_
 
boost::signals2::signal< sig_cb_velodyne_hdl_scan_point_cloud_xyzrgba > * scan_xyzrgba_signal_
 
boost::signals2::signal< sig_cb_velodyne_hdl_scan_point_cloud_xyzi > * scan_xyzi_signal_
 
- Protected Attributes inherited from pcl::Grabber
std::map< std::string, boost::signals2::signal_base * > signals_
 
std::map< std::string, std::vector< boost::signals2::connection > > connections_
 
std::map< std::string, std::vector< boost::signals2::shared_connection_block > > shared_connections_
 

Static Protected Attributes

static const uint16_t HDL_DATA_PORT = 2368
 
static const uint16_t HDL_NUM_ROT_ANGLES = 36001
 
static const uint8_t HDL_LASER_PER_FIRING = 32
 
static const uint8_t HDL_MAX_NUM_LASERS = 64
 
static const uint8_t HDL_FIRING_PER_PKT = 12
 

Detailed Description

Grabber for the Velodyne High-Definition-Laser (HDL)

Author
Keven Ring keven.nosp@m.@mit.nosp@m.re.or.nosp@m.g

Definition at line 60 of file hdl_grabber.h.

Member Typedef Documentation

◆ instead [1/2]

Definition at line 74 of file hdl_grabber.h.

◆ instead [2/2]

Definition at line 100 of file hdl_grabber.h.

◆ sig_cb_velodyne_hdl_scan_point_cloud_xyz

Signal used for a single sector Represents 1 corrected packet from the HDL Velodyne.

Definition at line 66 of file hdl_grabber.h.

◆ sig_cb_velodyne_hdl_scan_point_cloud_xyzi

Signal used for a single sector Represents 1 corrected packet from the HDL Velodyne with the returned intensity.

Definition at line 79 of file hdl_grabber.h.

◆ sig_cb_velodyne_hdl_scan_point_cloud_xyzrgba

Signal used for a single sector Represents 1 corrected packet from the HDL Velodyne.

Each laser has a different RGB

Definition at line 71 of file hdl_grabber.h.

◆ sig_cb_velodyne_hdl_sweep_point_cloud_xyz

Signal used for a 360 degree sweep Represents multiple corrected packets from the HDL Velodyne This signal is sent when the Velodyne passes angle "0".

Definition at line 85 of file hdl_grabber.h.

◆ sig_cb_velodyne_hdl_sweep_point_cloud_xyzi

Signal used for a 360 degree sweep Represents multiple corrected packets from the HDL Velodyne with the returned intensity This signal is sent when the Velodyne passes angle "0".

Definition at line 91 of file hdl_grabber.h.

◆ sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgba

Signal used for a 360 degree sweep Represents multiple corrected packets from the HDL Velodyne This signal is sent when the Velodyne passes angle "0".

Each laser has a different RGB

Definition at line 97 of file hdl_grabber.h.

Member Enumeration Documentation

◆ HDLBlock

enum pcl::HDLGrabber::HDLBlock
protected
Enumerator
BLOCK_0_TO_31 
BLOCK_32_TO_63 

Definition at line 209 of file hdl_grabber.h.

Constructor & Destructor Documentation

◆ HDLGrabber() [1/2]

pcl::HDLGrabber::HDLGrabber ( const std::string &  correctionsFile = "",
const std::string &  pcapFile = "" 
)

Constructor taking an optional path to an HDL corrections file.

The Grabber will listen on the default IP/port for data packets [192.168.3.255/2368]

Parameters
[in]correctionsFilePath to a file which contains the correction parameters for the HDL. This parameter is mandatory for the HDL-64, optional for the HDL-32
[in]pcapFilePath to a file which contains previously captured data packets. This parameter is optional

◆ HDLGrabber() [2/2]

pcl::HDLGrabber::HDLGrabber ( const boost::asio::ip::address &  ipAddress,
const uint16_t  port,
const std::string &  correctionsFile = "" 
)

Constructor taking a specified IP/port and an optional path to an HDL corrections file.

Parameters
[in]ipAddressIP Address that should be used to listen for HDL packets
[in]portUDP Port that should be used to listen for HDL packets
[in]correctionsFilePath to a file which contains the correction parameters for the HDL. This field is mandatory for the HDL-64, optional for the HDL-32

◆ ~HDLGrabber()

pcl::HDLGrabber::~HDLGrabber ( )
throw (
)

virtual Destructor inherited from the Grabber interface.

It never throws.

Member Function Documentation

◆ computeXYZI()

void pcl::HDLGrabber::computeXYZI ( pcl::PointXYZI pointXYZI,
uint16_t  azimuth,
HDLLaserReturn  laserReturn,
HDLLaserCorrection  correction 
)
protected

◆ filterPackets()

void pcl::HDLGrabber::filterPackets ( const boost::asio::ip::address &  ipAddress,
const uint16_t  port = 443 
)

Allows one to filter packets based on the SOURCE IP address and PORT This can be used, for instance, if multiple HDL LIDARs are on the same network.

◆ fireCurrentScan()

void pcl::HDLGrabber::fireCurrentScan ( const uint16_t  startAngle,
const uint16_t  endAngle 
)
protected

◆ fireCurrentSweep()

void pcl::HDLGrabber::fireCurrentSweep ( )
protected

◆ getFramesPerSecond()

float pcl::HDLGrabber::getFramesPerSecond ( ) const
overridevirtual

Returns the number of frames per second.

Implements pcl::Grabber.

◆ getMaximumDistanceThreshold()

float pcl::HDLGrabber::getMaximumDistanceThreshold ( )

Returns the current maximum distance threshold, in meters.

◆ getMaximumNumberOfLasers()

virtual uint8_t pcl::HDLGrabber::getMaximumNumberOfLasers ( ) const
virtual

Returns the maximum number of lasers.

Reimplemented in pcl::VLPGrabber.

◆ getMinimumDistanceThreshold()

float pcl::HDLGrabber::getMinimumDistanceThreshold ( )

Returns the current minimum distance threshold, in meters.

◆ getName()

std::string pcl::HDLGrabber::getName ( ) const
overridevirtual

Obtains the name of this I/O Grabber.

Returns
The name of the grabber

Implements pcl::Grabber.

Reimplemented in pcl::VLPGrabber.

◆ isRunning()

bool pcl::HDLGrabber::isRunning ( ) const
overridevirtual

Check if the grabber is still running.

Returns
TRUE if the grabber is running, FALSE otherwise

Implements pcl::Grabber.

◆ setLaserColorRGB() [1/2]

void pcl::HDLGrabber::setLaserColorRGB ( const pcl::RGB color,
const uint8_t  laserNumber 
)

Allows one to customize the colors used by each laser.

Parameters
[in]colorRGB color to set
[in]laserNumberNumber of laser to set color

◆ setLaserColorRGB() [2/2]

template<typename IterT >
void pcl::HDLGrabber::setLaserColorRGB ( const IterT &  begin,
const IterT &  end 
)
inline

Allows one to customize the colors used for each of the lasers.

Parameters
[in]beginbegin iterator of RGB color array
[in]endend iterator of RGB color array

Definition at line 167 of file hdl_grabber.h.

◆ setMaximumDistanceThreshold()

void pcl::HDLGrabber::setMaximumDistanceThreshold ( float &  maxThreshold)

Any returns from the HDL with a distance greater than this are discarded.

This value is in meters Default: 10000.0

◆ setMinimumDistanceThreshold()

void pcl::HDLGrabber::setMinimumDistanceThreshold ( float &  minThreshold)

Any returns from the HDL with a distance less than this are discarded.

This value is in meters Default: 0.0

◆ start()

void pcl::HDLGrabber::start ( )
overridevirtual

Starts processing the Velodyne packets, either from the network or PCAP file.

Implements pcl::Grabber.

◆ stop()

void pcl::HDLGrabber::stop ( )
overridevirtual

Stops processing the Velodyne packets, either from the network or PCAP file.

Implements pcl::Grabber.

Member Data Documentation

◆ current_scan_xyz_

pcl::PointCloud<pcl::PointXYZ>::Ptr pcl::HDLGrabber::current_scan_xyz_
protected

Definition at line 252 of file hdl_grabber.h.

◆ current_scan_xyzi_

pcl::PointCloud<pcl::PointXYZI>::Ptr pcl::HDLGrabber::current_scan_xyzi_
protected

Definition at line 253 of file hdl_grabber.h.

◆ current_scan_xyzrgba_

pcl::PointCloud<pcl::PointXYZRGBA>::Ptr pcl::HDLGrabber::current_scan_xyzrgba_
protected

Definition at line 254 of file hdl_grabber.h.

◆ current_sweep_xyz_

pcl::PointCloud<pcl::PointXYZ>::Ptr pcl::HDLGrabber::current_sweep_xyz_
protected

Definition at line 252 of file hdl_grabber.h.

◆ current_sweep_xyzi_

pcl::PointCloud<pcl::PointXYZI>::Ptr pcl::HDLGrabber::current_sweep_xyzi_
protected

Definition at line 253 of file hdl_grabber.h.

◆ current_sweep_xyzrgba_

pcl::PointCloud<pcl::PointXYZRGBA>::Ptr pcl::HDLGrabber::current_sweep_xyzrgba_
protected

Definition at line 254 of file hdl_grabber.h.

◆ HDL_DATA_PORT

const uint16_t pcl::HDLGrabber::HDL_DATA_PORT = 2368
staticprotected

Definition at line 203 of file hdl_grabber.h.

◆ HDL_FIRING_PER_PKT

const uint8_t pcl::HDLGrabber::HDL_FIRING_PER_PKT = 12
staticprotected

Definition at line 207 of file hdl_grabber.h.

◆ HDL_LASER_PER_FIRING

const uint8_t pcl::HDLGrabber::HDL_LASER_PER_FIRING = 32
staticprotected

Definition at line 205 of file hdl_grabber.h.

◆ HDL_MAX_NUM_LASERS

const uint8_t pcl::HDLGrabber::HDL_MAX_NUM_LASERS = 64
staticprotected

Definition at line 206 of file hdl_grabber.h.

◆ HDL_NUM_ROT_ANGLES

const uint16_t pcl::HDLGrabber::HDL_NUM_ROT_ANGLES = 36001
staticprotected

Definition at line 204 of file hdl_grabber.h.

◆ laser_corrections_

HDLLaserCorrection pcl::HDLGrabber::laser_corrections_[HDL_MAX_NUM_LASERS]
protected

Definition at line 250 of file hdl_grabber.h.

◆ last_azimuth_

uint16_t pcl::HDLGrabber::last_azimuth_
protected

Definition at line 251 of file hdl_grabber.h.

◆ scan_xyz_signal_

boost::signals2::signal<sig_cb_velodyne_hdl_scan_point_cloud_xyz>* pcl::HDLGrabber::scan_xyz_signal_
protected

Definition at line 258 of file hdl_grabber.h.

◆ scan_xyzi_signal_

boost::signals2::signal<sig_cb_velodyne_hdl_scan_point_cloud_xyzi>* pcl::HDLGrabber::scan_xyzi_signal_
protected

Definition at line 260 of file hdl_grabber.h.

◆ scan_xyzrgba_signal_

boost::signals2::signal<sig_cb_velodyne_hdl_scan_point_cloud_xyzrgba>* pcl::HDLGrabber::scan_xyzrgba_signal_
protected

Definition at line 259 of file hdl_grabber.h.

◆ sweep_xyz_signal_

boost::signals2::signal<sig_cb_velodyne_hdl_sweep_point_cloud_xyz>* pcl::HDLGrabber::sweep_xyz_signal_
protected

Definition at line 255 of file hdl_grabber.h.

◆ sweep_xyzi_signal_

boost::signals2::signal<sig_cb_velodyne_hdl_sweep_point_cloud_xyzi>* pcl::HDLGrabber::sweep_xyzi_signal_
protected

Definition at line 257 of file hdl_grabber.h.

◆ sweep_xyzrgba_signal_

boost::signals2::signal<sig_cb_velodyne_hdl_sweep_point_cloud_xyzrgba>* pcl::HDLGrabber::sweep_xyzrgba_signal_
protected

Definition at line 256 of file hdl_grabber.h.


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