Rangefinder2D_nwc_ros2
: A Network grabber for 2D Rangefinder devices
More...
Public Member Functions | |
Rangefinder2D_nwc_ros2 () | |
Rangefinder2D_nwc_ros2 (const Rangefinder2D_nwc_ros2 &)=delete | |
Rangefinder2D_nwc_ros2 (Rangefinder2D_nwc_ros2 &&) noexcept=delete | |
Rangefinder2D_nwc_ros2 & | operator= (const Rangefinder2D_nwc_ros2 &)=delete |
Rangefinder2D_nwc_ros2 & | operator= (Rangefinder2D_nwc_ros2 &&) noexcept=delete |
~Rangefinder2D_nwc_ros2 () override=default | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. | |
bool | close () override |
Close the DeviceDriver. | |
void | callback (sensor_msgs::msg::LaserScan::SharedPtr msg, std::string topic) |
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 | |
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 Attributes | |
Ros2Spinner * | m_spinner {nullptr} |
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 } |
Rangefinder2D_nwc_ros2
: A Network grabber for 2D Rangefinder devices
Documentation to be added
Definition at line 32 of file Rangefinder2D_nwc_ros2.h.
Rangefinder2D_nwc_ros2::Rangefinder2D_nwc_ros2 | ( | ) |
Definition at line 29 of file Rangefinder2D_nwc_ros2.cpp.
|
delete |
|
deletenoexcept |
|
overridedefault |
void Rangefinder2D_nwc_ros2::callback | ( | sensor_msgs::msg::LaserScan::SharedPtr | msg, |
std::string | topic | ||
) |
Definition at line 59 of file Rangefinder2D_nwc_ros2.cpp.
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 50 of file Rangefinder2D_nwc_ros2.cpp.
|
overridevirtual |
get the device hardware characteristics
device_info | string containing the device infos |
Implements yarp::dev::IRangefinder2D.
Definition at line 177 of file Rangefinder2D_nwc_ros2.cpp.
|
overridevirtual |
get the device status
status | the device status |
Implements yarp::dev::IRangefinder2D.
Definition at line 105 of file Rangefinder2D_nwc_ros2.cpp.
get the device detection range
min | the minimum detection distance |
max | the maximum detection distance |
Implements yarp::dev::IRangefinder2D.
Definition at line 112 of file Rangefinder2D_nwc_ros2.cpp.
get the angular step between two measurements.
step | the angular step between two measurements |
Implements yarp::dev::IRangefinder2D.
Definition at line 146 of file Rangefinder2D_nwc_ros2.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 88 of file Rangefinder2D_nwc_ros2.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 96 of file Rangefinder2D_nwc_ros2.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 129 of file Rangefinder2D_nwc_ros2.cpp.
get the scan rate (scans per seconds)
rate | the scan rate |
Implements yarp::dev::IRangefinder2D.
Definition at line 162 of file Rangefinder2D_nwc_ros2.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 33 of file Rangefinder2D_nwc_ros2.cpp.
|
delete |
|
deletenoexcept |
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 121 of file Rangefinder2D_nwc_ros2.cpp.
get the angular step between two measurements (if available)
step | the angular step between two measurements |
Implements yarp::dev::IRangefinder2D.
Definition at line 154 of file Rangefinder2D_nwc_ros2.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 138 of file Rangefinder2D_nwc_ros2.cpp.
set the scan rate (scans per seconds)
rate | the scan rate |
Implements yarp::dev::IRangefinder2D.
Definition at line 169 of file Rangefinder2D_nwc_ros2.cpp.
Ros2Spinner* Rangefinder2D_nwc_ros2::m_spinner {nullptr} |
Definition at line 50 of file Rangefinder2D_nwc_ros2.h.