Rangefinder2DTransformer
: A device which acts a virtual laser, it attaches to another lidar, which provides a stream a measurements, and reclocates them in the space.
More...
#include <Rangefinder2DTransformer/Rangefinder2DTransformer.h>
Public Member Functions | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. | |
bool | close () override |
Close the DeviceDriver. | |
bool | getLaserMeasurement (std::vector< yarp::sig::LaserMeasurementData > &data, double *timestamp=nullptr) override |
Get the device measurements. | |
bool | getRawData (yarp::sig::Vector &data, double *timestamp=nullptr) override |
Get the device measurements. | |
bool | getDeviceStatus (Device_status &status) override |
get the device status | |
bool | getDistanceRange (double &min, double &max) override |
get the device detection range | |
bool | setDistanceRange (double min, double max) override |
set the device detection range. | |
bool | getScanLimits (double &min, double &max) override |
get the scan angular range. | |
bool | setScanLimits (double min, double max) override |
set the scan angular range. | |
bool | getHorizontalResolution (double &step) override |
get the angular step between two measurements. | |
bool | setHorizontalResolution (double step) override |
get the angular step between two measurements (if available) | |
bool | getScanRate (double &rate) override |
get the scan rate (scans per seconds) | |
bool | setScanRate (double rate) override |
set the scan rate (scans per seconds) | |
bool | getDeviceInfo (std::string &device_info) override |
get the device hardware characteristics | |
bool | attach (yarp::dev::PolyDriver *driver) override |
Attach to another object. | |
bool | detach () override |
Detach the object (you must have first called attach). | |
Public Member Functions inherited from yarp::dev::DeviceDriver | |
DeviceDriver () | |
DeviceDriver (const DeviceDriver &other)=delete | |
DeviceDriver (DeviceDriver &&other) noexcept=delete | |
DeviceDriver & | operator= (const DeviceDriver &other)=delete |
DeviceDriver & | operator= (DeviceDriver &&other) noexcept=delete |
virtual | ~DeviceDriver () |
virtual std::string | id () const |
Return the id assigned to the PolyDriver. | |
virtual void | setId (const std::string &id) |
Set the id for this device. | |
template<class T > | |
bool | view (T *&x) |
Get an interface to the device driver. | |
virtual DeviceDriver * | getImplementation () |
Some drivers are bureaucrats, pointing at others. | |
Public Member Functions inherited from yarp::dev::IRangefinder2D | |
virtual | ~IRangefinder2D () |
Public Member Functions inherited from yarp::dev::WrapperSingle | |
~WrapperSingle () override | |
Destructor. | |
bool | attachAll (const yarp::dev::PolyDriverList &drivers) final |
Attach to a list of objects. | |
bool | detachAll () final |
Detach the object (you must have first called attach). | |
Public Member Functions inherited from yarp::dev::IWrapper | |
virtual | ~IWrapper () |
Destructor. | |
Public Member Functions inherited from yarp::dev::IMultipleWrapper | |
virtual | ~IMultipleWrapper () |
Destructor. | |
Public Member Functions inherited from Rangefinder2DTransformer_ParamsParser | |
Rangefinder2DTransformer_ParamsParser () | |
~Rangefinder2DTransformer_ParamsParser () override=default | |
bool | parseParams (const yarp::os::Searchable &config) override |
Parse the DeviceDriver parameters. | |
std::string | getDeviceClassName () const override |
Get the name of the DeviceDriver class. | |
std::string | getDeviceName () const override |
Get the name of the device (i.e. | |
std::string | getDocumentationOfDeviceParams () const override |
Get the documentation of the DeviceDriver's parameters. | |
std::vector< std::string > | getListOfParams () const override |
Return a list of all params used by the device. | |
std::string | getDocumentationOfRangefinder2DTransformer () const |
Public Member Functions inherited from yarp::dev::IDeviceDriverParams | |
virtual | ~IDeviceDriverParams () |
Protected Attributes | |
yarp::dev::IRangefinder2D * | sens_p =nullptr |
double | m_scan_angle_min = std::nan("1") |
double | m_scan_angle_max = std::nan("1") |
Additional Inherited Members | |
Public Types inherited from yarp::dev::IRangefinder2D | |
enum | Device_status { DEVICE_OK_STANDBY = 0 , DEVICE_OK_IN_USE = 1 , DEVICE_GENERAL_ERROR = 2 , DEVICE_TIMEOUT = 3 } |
Public Attributes inherited from Rangefinder2DTransformer_ParamsParser | |
const std::string | m_device_classname = {"Rangefinder2DTransformer"} |
const std::string | m_device_name = {"rangefinder2DTransformer"} |
bool | m_parser_is_strict = false |
const parser_version_type | m_parser_version = {} |
const std::string | m_device_position_x_defaultValue = {"0"} |
const std::string | m_device_position_y_defaultValue = {"0"} |
const std::string | m_device_position_theta_defaultValue = {"0"} |
const std::string | m_laser_frame_name_defaultValue = {""} |
const std::string | m_robot_frame_name_defaultValue = {""} |
double | m_device_position_x = {0} |
double | m_device_position_y = {0} |
double | m_device_position_theta = {0} |
std::string | m_laser_frame_name = {} |
std::string | m_robot_frame_name = {} |
Rangefinder2DTransformer
: A device which acts a virtual laser, it attaches to another lidar, which provides a stream a measurements, and reclocates them in the space.
The new origin can be specified both manually, as a 2D point in space, or though a tranform.
Parameters required by this device are shown in class: Rangefinder2DTransformer_ParamsParser
Definition at line 39 of file Rangefinder2DTransformer.h.
|
overridevirtual |
Attach to another object.
driver | the polydriver that you want to attach to. |
Implements yarp::dev::IWrapper.
Definition at line 194 of file Rangefinder2DTransformer.cpp.
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 84 of file Rangefinder2DTransformer.cpp.
|
overridevirtual |
Detach the object (you must have first called attach).
Implements yarp::dev::IWrapper.
Definition at line 214 of file Rangefinder2DTransformer.cpp.
|
overridevirtual |
get the device hardware characteristics
device_info | string containing the device infos |
Implements yarp::dev::IRangefinder2D.
Definition at line 189 of file Rangefinder2DTransformer.cpp.
|
overridevirtual |
get the device status
status | the device status |
Implements yarp::dev::IRangefinder2D.
Definition at line 184 of file Rangefinder2DTransformer.cpp.
get the device detection range
min | the minimum detection distance |
max | the maximum detection distance |
Implements yarp::dev::IRangefinder2D.
Definition at line 144 of file Rangefinder2DTransformer.cpp.
get the angular step between two measurements.
step | the angular step between two measurements |
Implements yarp::dev::IRangefinder2D.
Definition at line 164 of file Rangefinder2DTransformer.cpp.
|
overridevirtual |
Get the device measurements.
data | a vector containing the measurement data, expressed in Cartesian/polar format |
timestamp | the timestamp of the retrieved data. |
Implements yarp::dev::IRangefinder2D.
Definition at line 106 of file Rangefinder2DTransformer.cpp.
|
overridevirtual |
Get the device measurements.
ranges | the vector containing the raw measurement data, as acquired by the device. |
timestamp | the timestamp of the retrieved data. |
Implements yarp::dev::IRangefinder2D.
Definition at line 89 of file Rangefinder2DTransformer.cpp.
get the scan angular range.
min | start angle of the scan |
max | end angle of the scan |
Implements yarp::dev::IRangefinder2D.
Definition at line 154 of file Rangefinder2DTransformer.cpp.
get the scan rate (scans per seconds)
rate | the scan rate |
Implements yarp::dev::IRangefinder2D.
Definition at line 174 of file Rangefinder2DTransformer.cpp.
|
overridevirtual |
Open the DeviceDriver.
config | is a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device). |
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 31 of file Rangefinder2DTransformer.cpp.
set the device detection range.
Invalid setting will be discarded.
min | the minimum detection distance |
max | the maximum detection distance |
Implements yarp::dev::IRangefinder2D.
Definition at line 149 of file Rangefinder2DTransformer.cpp.
get the angular step between two measurements (if available)
step | the angular step between two measurements |
Implements yarp::dev::IRangefinder2D.
Definition at line 169 of file Rangefinder2DTransformer.cpp.
set the scan angular range.
min | start angle of the scan |
max | end angle of the scan |
Implements yarp::dev::IRangefinder2D.
Definition at line 159 of file Rangefinder2DTransformer.cpp.
set the scan rate (scans per seconds)
rate | the scan rate |
Implements yarp::dev::IRangefinder2D.
Definition at line 179 of file Rangefinder2DTransformer.cpp.
|
protected |
Definition at line 51 of file Rangefinder2DTransformer.h.
|
protected |
Definition at line 50 of file Rangefinder2DTransformer.h.
|
protected |
Definition at line 47 of file Rangefinder2DTransformer.h.