YARP
Yet Another Robot Platform
yarp::dev::IRangefinder2D Class Referenceabstract

A generic interface for planar laser range finders. More...

#include <yarp/dev/IRangefinder2D.h>

+ Inheritance diagram for yarp::dev::IRangefinder2D:

Public Types

enum  Device_status {
  DEVICE_OK_STANBY = 0,
  DEVICE_OK_IN_USE = 1,
  DEVICE_GENERAL_ERROR = 2,
  DEVICE_TIMEOUT = 3
}
 

Public Member Functions

virtual ~IRangefinder2D ()
 
virtual bool getLaserMeasurement (std::vector< LaserMeasurementData > &data)=0
 Get the device measurements. More...
 
virtual bool getRawData (yarp::sig::Vector &data)=0
 Get the device measurements. More...
 
virtual bool getDeviceStatus (Device_status &status)=0
 get the device status More...
 
virtual bool getDistanceRange (double &min, double &max)=0
 get the device detection range More...
 
virtual bool setDistanceRange (double min, double max)=0
 set the device detection range. More...
 
virtual bool getScanLimits (double &min, double &max)=0
 get the scan angular range. More...
 
virtual bool setScanLimits (double min, double max)=0
 set the scan angular range. More...
 
virtual bool getHorizontalResolution (double &step)=0
 get the angular step between two measurments. More...
 
virtual bool setHorizontalResolution (double step)=0
 get the angular step between two measurments (if available) More...
 
virtual bool getScanRate (double &rate)=0
 get the scan rate (scans per seconds) More...
 
virtual bool setScanRate (double rate)=0
 set the scan rate (scans per seconds) More...
 
virtual bool getDeviceInfo (std::string &device_info)=0
 get the device hardware charactestics More...
 

Detailed Description

A generic interface for planar laser range finders.

Definition at line 37 of file IRangefinder2D.h.

Member Enumeration Documentation

◆ Device_status

Enumerator
DEVICE_OK_STANBY 
DEVICE_OK_IN_USE 
DEVICE_GENERAL_ERROR 
DEVICE_TIMEOUT 

Definition at line 40 of file IRangefinder2D.h.

Constructor & Destructor Documentation

◆ ~IRangefinder2D()

yarp::dev::IRangefinder2D::~IRangefinder2D ( )
virtualdefault

Member Function Documentation

◆ getDeviceInfo()

virtual bool yarp::dev::IRangefinder2D::getDeviceInfo ( std::string &  device_info)
pure virtual

get the device hardware charactestics

Parameters
device_infostring containing the device infos
Returns
true/false.

Implemented in yarp::dev::Lidar2DDeviceBase, RpLidar, Rangefinder2DClient, and laserHokuyo.

◆ getDeviceStatus()

virtual bool yarp::dev::IRangefinder2D::getDeviceStatus ( Device_status status)
pure virtual

get the device status

Parameters
statusthe device status
Returns
true/false.

Implemented in yarp::dev::Lidar2DDeviceBase, Rangefinder2DClient, and laserHokuyo.

◆ getDistanceRange()

virtual bool yarp::dev::IRangefinder2D::getDistanceRange ( double &  min,
double &  max 
)
pure virtual

get the device detection range

Parameters
minthe minimum detection distance
maxthe maximum detection distance
Returns
true/false.

Implemented in yarp::dev::Lidar2DDeviceBase, RpLidar, Rangefinder2DClient, and laserHokuyo.

◆ getHorizontalResolution()

virtual bool yarp::dev::IRangefinder2D::getHorizontalResolution ( double &  step)
pure virtual

get the angular step between two measurments.

Parameters
stepthe angular step between two measurments
Returns
true/false.

Implemented in yarp::dev::Lidar2DDeviceBase, RpLidar, Rangefinder2DClient, and laserHokuyo.

◆ getLaserMeasurement()

virtual bool yarp::dev::IRangefinder2D::getLaserMeasurement ( std::vector< LaserMeasurementData > &  data)
pure virtual

Get the device measurements.

Parameters
dataa vector containing the measurement data, expressed in cartesian/polar format
Returns
true/false..

Implemented in Rangefinder2DClient, yarp::dev::Lidar2DDeviceBase, RpLidar, and laserHokuyo.

◆ getRawData()

virtual bool yarp::dev::IRangefinder2D::getRawData ( yarp::sig::Vector data)
pure virtual

Get the device measurements.

Parameters
rangesthe vector containing the raw measurement data, as acquired by the device.
Returns
true/false.

Implemented in yarp::dev::Lidar2DDeviceBase, RpLidar, Rangefinder2DClient, and laserHokuyo.

◆ getScanLimits()

virtual bool yarp::dev::IRangefinder2D::getScanLimits ( double &  min,
double &  max 
)
pure virtual

get the scan angular range.

Parameters
minstart angle of the scan
maxend angle of the scan
Returns
true/false.

Implemented in yarp::dev::Lidar2DDeviceBase, RpLidar, Rangefinder2DClient, and laserHokuyo.

◆ getScanRate()

virtual bool yarp::dev::IRangefinder2D::getScanRate ( double &  rate)
pure virtual

get the scan rate (scans per seconds)

Parameters
ratethe scan rate
Returns
true/false.

Implemented in yarp::dev::Lidar2DDeviceBase, RpLidar, Rangefinder2DClient, and laserHokuyo.

◆ setDistanceRange()

virtual bool yarp::dev::IRangefinder2D::setDistanceRange ( double  min,
double  max 
)
pure virtual

set the device detection range.

Invalid setting will be discarded.

Parameters
minthe minimum detection distance
maxthe maximum detection distance
Returns
true/false on success/failure.

Implemented in RpLidar2, RpLidar, Rangefinder2DClient, laserHokuyo, LaserFromRosTopic, LaserFromPointCloud, LaserFromExternalPort, LaserFromDepth, and FakeLaser.

◆ setHorizontalResolution()

virtual bool yarp::dev::IRangefinder2D::setHorizontalResolution ( double  step)
pure virtual

get the angular step between two measurments (if available)

Parameters
stepthe angular step between two measurments
Returns
true/false on success/failure.

Implemented in RpLidar2, RpLidar, Rangefinder2DClient, laserHokuyo, LaserFromRosTopic, LaserFromPointCloud, LaserFromExternalPort, LaserFromDepth, and FakeLaser.

◆ setScanLimits()

virtual bool yarp::dev::IRangefinder2D::setScanLimits ( double  min,
double  max 
)
pure virtual

set the scan angular range.

Parameters
minstart angle of the scan
maxend angle of the scan
Returns
true/false on success/failure.

Implemented in RpLidar2, RpLidar, Rangefinder2DClient, laserHokuyo, LaserFromRosTopic, LaserFromPointCloud, LaserFromExternalPort, LaserFromDepth, and FakeLaser.

◆ setScanRate()

virtual bool yarp::dev::IRangefinder2D::setScanRate ( double  rate)
pure virtual

set the scan rate (scans per seconds)

Parameters
ratethe scan rate
Returns
true/false on success/failure.

Implemented in RpLidar2, RpLidar, Rangefinder2DClient, laserHokuyo, LaserFromRosTopic, LaserFromPointCloud, LaserFromExternalPort, LaserFromDepth, and FakeLaser.


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