Rangefinder2DClient
: The client side of any ILaserRangefinder2D capable device.
More...
#include <Rangefinder2DClient/Rangefinder2DClient.h>
Public Member Functions | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. More... | |
bool | close () override |
Close the DeviceDriver. More... | |
bool | getLaserMeasurement (std::vector< yarp::dev::LaserMeasurementData > &data, double *timestamp=nullptr) override |
Get the device measurements. More... | |
bool | getRawData (yarp::sig::Vector &data, double *timestamp=nullptr) override |
Get the device measurements. More... | |
bool | getDeviceStatus (Device_status &status) override |
get the device status More... | |
bool | getDistanceRange (double &min, double &max) override |
get the device detection range More... | |
bool | setDistanceRange (double min, double max) override |
set the device detection range. More... | |
bool | getScanLimits (double &min, double &max) override |
get the scan angular range. More... | |
bool | setScanLimits (double min, double max) override |
set the scan angular range. More... | |
bool | getHorizontalResolution (double &step) override |
get the angular step between two measurments. More... | |
bool | setHorizontalResolution (double step) override |
get the angular step between two measurments (if available) More... | |
bool | getScanRate (double &rate) override |
get the scan rate (scans per seconds) More... | |
bool | setScanRate (double rate) override |
set the scan rate (scans per seconds) More... | |
bool | getDeviceInfo (std::string &device_info) override |
get the device hardware charactestics More... | |
![]() | |
DeviceDriver () | |
DeviceDriver (const DeviceDriver &other)=delete | |
DeviceDriver (DeviceDriver &&other) noexcept=delete | |
DeviceDriver & | operator= (const DeviceDriver &other)=delete |
DeviceDriver & | operator= (DeviceDriver &&other) noexcept=delete |
~DeviceDriver () override | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. More... | |
bool | close () override |
Close the DeviceDriver. More... | |
virtual std::string | id () const |
Return the id assigned to the PolyDriver. More... | |
virtual void | setId (const std::string &id) |
Set the id for this device. More... | |
template<class T > | |
bool | view (T *&x) |
Get an interface to the device driver. More... | |
virtual DeviceDriver * | getImplementation () |
Some drivers are bureaucrats, pointing at others. More... | |
![]() | |
virtual | ~IConfig () |
Destructor. More... | |
virtual bool | open (Searchable &config) |
Initialize the object. More... | |
virtual bool | close () |
Shut the object down. More... | |
virtual bool | configure (Searchable &config) |
Change online parameters. More... | |
![]() | |
virtual | ~IRangefinder2D () |
virtual bool | getLaserMeasurement (std::vector< LaserMeasurementData > &data, double *timestamp=nullptr)=0 |
Get the device measurements. More... | |
virtual bool | getRawData (yarp::sig::Vector &data, double *timestamp=nullptr)=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 measurements. More... | |
virtual bool | setHorizontalResolution (double step)=0 |
get the angular step between two measurements (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 characteristics More... | |
Protected Attributes | |
Rangefinder2DInputPortProcessor | inputPort |
yarp::os::Port | rpcPort |
std::string | local |
std::string | remote |
std::string | m_carrier |
yarp::os::Stamp | lastTs |
std::string | deviceId |
double | scan_angle_min |
double | scan_angle_max |
double | device_position_x |
double | device_position_y |
double | device_position_theta |
std::string | laser_frame_name |
std::string | robot_frame_name |
Additional Inherited Members | |
![]() | |
enum | Device_status { DEVICE_OK_STANBY = 0 , DEVICE_OK_IN_USE = 1 , DEVICE_GENERAL_ERROR = 2 , DEVICE_TIMEOUT = 3 } |
Rangefinder2DClient
: The client side of any ILaserRangefinder2D capable device.
Still single thread! concurrent access is unsafe.
Parameters required by this device are:
Parameter name | SubParameter | Type | Units | Default Value | Required | Description | Notes |
---|---|---|---|---|---|---|---|
local | - | string | - | - | Yes | Full port name opened by the Rangefinder2DClient device. | |
remote | - | string | - | - | Yes | Full port name of the port opened on the server side, to which the Rangefinder2DClient connects to. | |
carrier | - | string | - | tcp | No | The carier used for the connection with the server. |
Definition at line 76 of file Rangefinder2DClient.h.
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 278 of file Rangefinder2DClient.cpp.
|
overridevirtual |
get the device hardware charactestics
device_info | string containing the device infos |
Implements yarp::dev::IRangefinder2D.
Definition at line 443 of file Rangefinder2DClient.cpp.
|
overridevirtual |
get the device status
status | the device status |
Implements yarp::dev::IRangefinder2D.
Definition at line 437 of file Rangefinder2DClient.cpp.
|
overridevirtual |
get the device detection range
min | the minimum detection distance |
max | the maximum detection distance |
Implements yarp::dev::IRangefinder2D.
Definition at line 324 of file Rangefinder2DClient.cpp.
|
overridevirtual |
get the angular step between two measurments.
step | the angular step between two measurments |
Implements yarp::dev::IRangefinder2D.
Definition at line 385 of file Rangefinder2DClient.cpp.
|
overridevirtual |
Get the device measurements.
data | a vector containing the measurement data, expressed in cartesian/polar format |
Implements yarp::dev::IRangefinder2D.
Definition at line 299 of file Rangefinder2DClient.cpp.
|
overridevirtual |
Get the device measurements.
ranges | the vector containing the raw measurement data, as acquired by the device. |
Implements yarp::dev::IRangefinder2D.
Definition at line 285 of file Rangefinder2DClient.cpp.
|
overridevirtual |
get the scan angular range.
min | start angle of the scan |
max | end angle of the scan |
Implements yarp::dev::IRangefinder2D.
Definition at line 357 of file Rangefinder2DClient.cpp.
|
overridevirtual |
get the scan rate (scans per seconds)
rate | the scan rate |
Implements yarp::dev::IRangefinder2D.
Definition at line 411 of file Rangefinder2DClient.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 154 of file Rangefinder2DClient.cpp.
|
overridevirtual |
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 340 of file Rangefinder2DClient.cpp.
|
overridevirtual |
get the angular step between two measurments (if available)
step | the angular step between two measurments |
Implements yarp::dev::IRangefinder2D.
Definition at line 400 of file Rangefinder2DClient.cpp.
|
overridevirtual |
set the scan angular range.
min | start angle of the scan |
max | end angle of the scan |
Implements yarp::dev::IRangefinder2D.
Definition at line 373 of file Rangefinder2DClient.cpp.
|
overridevirtual |
set the scan rate (scans per seconds)
rate | the scan rate |
Implements yarp::dev::IRangefinder2D.
Definition at line 426 of file Rangefinder2DClient.cpp.
|
protected |
Definition at line 93 of file Rangefinder2DClient.h.
|
protected |
Definition at line 91 of file Rangefinder2DClient.h.
|
protected |
Definition at line 92 of file Rangefinder2DClient.h.
|
protected |
Definition at line 87 of file Rangefinder2DClient.h.
|
protected |
Definition at line 81 of file Rangefinder2DClient.h.
|
protected |
Definition at line 94 of file Rangefinder2DClient.h.
|
protected |
Definition at line 86 of file Rangefinder2DClient.h.
|
protected |
Definition at line 83 of file Rangefinder2DClient.h.
|
protected |
Definition at line 85 of file Rangefinder2DClient.h.
|
protected |
Definition at line 84 of file Rangefinder2DClient.h.
|
protected |
Definition at line 95 of file Rangefinder2DClient.h.
|
protected |
Definition at line 82 of file Rangefinder2DClient.h.
|
protected |
Definition at line 90 of file Rangefinder2DClient.h.
|
protected |
Definition at line 89 of file Rangefinder2DClient.h.