YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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_STANDBY = 0 ,
  DEVICE_OK_IN_USE = 1 ,
  DEVICE_GENERAL_ERROR = 2 ,
  DEVICE_TIMEOUT = 3
}
 

Public Member Functions

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

Detailed Description

A generic interface for planar laser range finders.

Definition at line 33 of file IRangefinder2D.h.

Member Enumeration Documentation

◆ Device_status

Enumerator
DEVICE_OK_STANDBY 
DEVICE_OK_IN_USE 
DEVICE_GENERAL_ERROR 
DEVICE_TIMEOUT 

Definition at line 36 of file IRangefinder2D.h.

Constructor & Destructor Documentation

◆ ~IRangefinder2D()

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

Member Function Documentation

◆ getDeviceInfo()

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

get the device hardware characteristics

Parameters
device_infostring containing the device infos
Returns
true/false.

Implemented in RpLidar, Rangefinder2D_nwc_ros2, laserHokuyo, Rangefinder2D_nwc_yarp, Rangefinder2DTransformer, and yarp::dev::Lidar2DDeviceBase.

◆ getDeviceStatus()

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

get the device status

Parameters
statusthe device status
Returns
true/false.

Implemented in RpLidar, Rangefinder2D_nwc_ros2, laserHokuyo, Rangefinder2D_nwc_yarp, Rangefinder2DTransformer, and yarp::dev::Lidar2DDeviceBase.

◆ getDistanceRange()

virtual ReturnValue 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 RpLidar, Rangefinder2D_nwc_ros2, laserHokuyo, Rangefinder2D_nwc_yarp, Rangefinder2DTransformer, and yarp::dev::Lidar2DDeviceBase.

◆ getHorizontalResolution()

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

get the angular step between two measurements.

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

Implemented in RpLidar, Rangefinder2D_nwc_ros2, laserHokuyo, Rangefinder2D_nwc_yarp, Rangefinder2DTransformer, and yarp::dev::Lidar2DDeviceBase.

◆ getLaserMeasurement()

virtual ReturnValue yarp::dev::IRangefinder2D::getLaserMeasurement ( std::vector< yarp::sig::LaserMeasurementData > &  data,
double *  timestamp = nullptr 
)
pure virtual

Get the device measurements.

Parameters
dataa vector containing the measurement data, expressed in Cartesian/polar format
timestampthe timestamp of the retrieved data.
Returns
true/false

Implemented in RpLidar, laserHokuyo, Rangefinder2D_nwc_ros2, Rangefinder2D_nwc_yarp, Rangefinder2DTransformer, and yarp::dev::Lidar2DDeviceBase.

◆ getRawData()

virtual ReturnValue yarp::dev::IRangefinder2D::getRawData ( yarp::sig::Vector data,
double *  timestamp = nullptr 
)
pure virtual

Get the device measurements.

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

Implemented in RpLidar, laserHokuyo, Rangefinder2D_nwc_ros2, Rangefinder2D_nwc_yarp, Rangefinder2DTransformer, and yarp::dev::Lidar2DDeviceBase.

◆ getScanLimits()

virtual ReturnValue 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 RpLidar, Rangefinder2D_nwc_ros2, laserHokuyo, Rangefinder2D_nwc_yarp, Rangefinder2DTransformer, and yarp::dev::Lidar2DDeviceBase.

◆ getScanRate()

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

get the scan rate (scans per seconds)

Parameters
ratethe scan rate
Returns
true/false.

Implemented in RpLidar, Rangefinder2D_nwc_ros2, laserHokuyo, Rangefinder2D_nwc_yarp, Rangefinder2DTransformer, and yarp::dev::Lidar2DDeviceBase.

◆ setDistanceRange()

virtual ReturnValue 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 RpLidar, RpLidar2, RpLidar3, RpLidar4, LaserFromRosTopic, Rangefinder2D_nwc_ros2, FakeLaser, FakeLaserWithMotor, LaserFromDepth, LaserFromExternalPort, LaserFromPointCloud, laserHokuyo, Rangefinder2D_nwc_yarp, and Rangefinder2DTransformer.

◆ setHorizontalResolution()

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

get the angular step between two measurements (if available)

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

Implemented in RpLidar, RpLidar2, RpLidar3, RpLidar4, LaserFromRosTopic, Rangefinder2D_nwc_ros2, FakeLaser, FakeLaserWithMotor, LaserFromDepth, LaserFromExternalPort, LaserFromPointCloud, laserHokuyo, Rangefinder2D_nwc_yarp, and Rangefinder2DTransformer.

◆ setScanLimits()

virtual ReturnValue 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 RpLidar, RpLidar2, RpLidar3, RpLidar4, LaserFromRosTopic, Rangefinder2D_nwc_ros2, FakeLaser, FakeLaserWithMotor, LaserFromDepth, LaserFromExternalPort, LaserFromPointCloud, laserHokuyo, Rangefinder2D_nwc_yarp, and Rangefinder2DTransformer.

◆ setScanRate()

virtual ReturnValue 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 RpLidar, RpLidar2, RpLidar3, RpLidar4, LaserFromRosTopic, Rangefinder2D_nwc_ros2, FakeLaser, FakeLaserWithMotor, LaserFromDepth, LaserFromExternalPort, LaserFromPointCloud, laserHokuyo, Rangefinder2D_nwc_yarp, and Rangefinder2DTransformer.


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