YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches

Rangefinder2D_nwc_ros2: A Network grabber for 2D Rangefinder devices More...

#include </home/runner/work/yarp-documentation/yarp-documentation/yarp/opt-modules/yarp-devices-ros2/src/devices/rangefinder2D_nwc_ros2/Rangefinder2D_nwc_ros2.h>

+ Inheritance diagram for Rangefinder2D_nwc_ros2:

Public Member Functions

 Rangefinder2D_nwc_ros2 ()
 
 Rangefinder2D_nwc_ros2 (const Rangefinder2D_nwc_ros2 &)=delete
 
 Rangefinder2D_nwc_ros2 (Rangefinder2D_nwc_ros2 &&) noexcept=delete
 
Rangefinder2D_nwc_ros2operator= (const Rangefinder2D_nwc_ros2 &)=delete
 
Rangefinder2D_nwc_ros2operator= (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
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (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 DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from yarp::dev::IRangefinder2D
virtual ~IRangefinder2D ()
 

Public Attributes

Ros2Spinnerm_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
}
 

Detailed Description

Rangefinder2D_nwc_ros2: A Network grabber for 2D Rangefinder devices

Documentation to be added

Definition at line 32 of file Rangefinder2D_nwc_ros2.h.

Constructor & Destructor Documentation

◆ Rangefinder2D_nwc_ros2() [1/3]

Rangefinder2D_nwc_ros2::Rangefinder2D_nwc_ros2 ( )

Definition at line 29 of file Rangefinder2D_nwc_ros2.cpp.

◆ Rangefinder2D_nwc_ros2() [2/3]

Rangefinder2D_nwc_ros2::Rangefinder2D_nwc_ros2 ( const Rangefinder2D_nwc_ros2 )
delete

◆ Rangefinder2D_nwc_ros2() [3/3]

Rangefinder2D_nwc_ros2::Rangefinder2D_nwc_ros2 ( Rangefinder2D_nwc_ros2 &&  )
deletenoexcept

◆ ~Rangefinder2D_nwc_ros2()

Rangefinder2D_nwc_ros2::~Rangefinder2D_nwc_ros2 ( )
overridedefault

Member Function Documentation

◆ callback()

void Rangefinder2D_nwc_ros2::callback ( sensor_msgs::msg::LaserScan::SharedPtr  msg,
std::string  topic 
)

Definition at line 59 of file Rangefinder2D_nwc_ros2.cpp.

◆ close()

bool Rangefinder2D_nwc_ros2::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 50 of file Rangefinder2D_nwc_ros2.cpp.

◆ getDeviceInfo()

bool Rangefinder2D_nwc_ros2::getDeviceInfo ( std::string &  device_info)
overridevirtual

get the device hardware characteristics

Parameters
device_infostring containing the device infos
Returns
true/false.

Implements yarp::dev::IRangefinder2D.

Definition at line 177 of file Rangefinder2D_nwc_ros2.cpp.

◆ getDeviceStatus()

bool Rangefinder2D_nwc_ros2::getDeviceStatus ( Device_status status)
overridevirtual

get the device status

Parameters
statusthe device status
Returns
true/false.

Implements yarp::dev::IRangefinder2D.

Definition at line 105 of file Rangefinder2D_nwc_ros2.cpp.

◆ getDistanceRange()

bool Rangefinder2D_nwc_ros2::getDistanceRange ( double min,
double max 
)
overridevirtual

get the device detection range

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

Implements yarp::dev::IRangefinder2D.

Definition at line 112 of file Rangefinder2D_nwc_ros2.cpp.

◆ getHorizontalResolution()

bool Rangefinder2D_nwc_ros2::getHorizontalResolution ( double step)
overridevirtual

get the angular step between two measurements.

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

Implements yarp::dev::IRangefinder2D.

Definition at line 146 of file Rangefinder2D_nwc_ros2.cpp.

◆ getLaserMeasurement()

bool Rangefinder2D_nwc_ros2::getLaserMeasurement ( std::vector< yarp::sig::LaserMeasurementData > &  data,
double timestamp = nullptr 
)
overridevirtual

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

Implements yarp::dev::IRangefinder2D.

Definition at line 88 of file Rangefinder2D_nwc_ros2.cpp.

◆ getRawData()

bool Rangefinder2D_nwc_ros2::getRawData ( yarp::sig::Vector data,
double timestamp = nullptr 
)
overridevirtual

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.

Implements yarp::dev::IRangefinder2D.

Definition at line 96 of file Rangefinder2D_nwc_ros2.cpp.

◆ getScanLimits()

bool Rangefinder2D_nwc_ros2::getScanLimits ( double min,
double max 
)
overridevirtual

get the scan angular range.

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

Implements yarp::dev::IRangefinder2D.

Definition at line 129 of file Rangefinder2D_nwc_ros2.cpp.

◆ getScanRate()

bool Rangefinder2D_nwc_ros2::getScanRate ( double rate)
overridevirtual

get the scan rate (scans per seconds)

Parameters
ratethe scan rate
Returns
true/false.

Implements yarp::dev::IRangefinder2D.

Definition at line 162 of file Rangefinder2D_nwc_ros2.cpp.

◆ open()

bool Rangefinder2D_nwc_ros2::open ( yarp::os::Searchable config)
overridevirtual

Open the DeviceDriver.

Parameters
configis 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).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 33 of file Rangefinder2D_nwc_ros2.cpp.

◆ operator=() [1/2]

Rangefinder2D_nwc_ros2 & Rangefinder2D_nwc_ros2::operator= ( const Rangefinder2D_nwc_ros2 )
delete

◆ operator=() [2/2]

Rangefinder2D_nwc_ros2 & Rangefinder2D_nwc_ros2::operator= ( Rangefinder2D_nwc_ros2 &&  )
deletenoexcept

◆ setDistanceRange()

bool Rangefinder2D_nwc_ros2::setDistanceRange ( double  min,
double  max 
)
overridevirtual

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.

Implements yarp::dev::IRangefinder2D.

Definition at line 121 of file Rangefinder2D_nwc_ros2.cpp.

◆ setHorizontalResolution()

bool Rangefinder2D_nwc_ros2::setHorizontalResolution ( double  step)
overridevirtual

get the angular step between two measurements (if available)

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

Implements yarp::dev::IRangefinder2D.

Definition at line 154 of file Rangefinder2D_nwc_ros2.cpp.

◆ setScanLimits()

bool Rangefinder2D_nwc_ros2::setScanLimits ( double  min,
double  max 
)
overridevirtual

set the scan angular range.

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

Implements yarp::dev::IRangefinder2D.

Definition at line 138 of file Rangefinder2D_nwc_ros2.cpp.

◆ setScanRate()

bool Rangefinder2D_nwc_ros2::setScanRate ( double  rate)
overridevirtual

set the scan rate (scans per seconds)

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

Implements yarp::dev::IRangefinder2D.

Definition at line 169 of file Rangefinder2D_nwc_ros2.cpp.

Member Data Documentation

◆ m_spinner

Ros2Spinner* Rangefinder2D_nwc_ros2::m_spinner {nullptr}

Definition at line 50 of file Rangefinder2D_nwc_ros2.h.


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