YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IRangefinder2D.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_IRANGEFINDER2D_H
7#define YARP_DEV_IRANGEFINDER2D_H
8
9#include <yarp/os/Vocab.h>
10#include <yarp/dev/api.h>
12#include <yarp/sig/Vector.h>
14#include <vector>
15#include <string>
16
23
24namespace yarp::dev {
25class IRangefinder2D;
26}
27
34{
35public:
37 {
38 DEVICE_OK_STANDBY = 0,
39 DEVICE_OK_IN_USE = 1,
40 DEVICE_GENERAL_ERROR = 2,
41 DEVICE_TIMEOUT = 3
42 };
43
44 virtual ~IRangefinder2D();
45
52 virtual ReturnValue getLaserMeasurement(std::vector<yarp::sig::LaserMeasurementData> &data, double* timestamp = nullptr) = 0;
53
60 virtual ReturnValue getRawData(yarp::sig::Vector &data, double* timestamp = nullptr) = 0;
61
68
75 virtual ReturnValue getDistanceRange(double& min, double& max) = 0;
76
83 virtual ReturnValue setDistanceRange(double min, double max) = 0;
84
91 virtual ReturnValue getScanLimits(double& min, double& max) = 0;
92
99 virtual ReturnValue setScanLimits(double min, double max) = 0;
100
106 virtual ReturnValue getHorizontalResolution(double& step) = 0;
107
113 virtual ReturnValue setHorizontalResolution(double step) = 0;
114
120 virtual ReturnValue getScanRate(double& rate) = 0;
121
127 virtual ReturnValue setScanRate(double rate) = 0;
128
134 virtual ReturnValue getDeviceInfo(std::string &device_info) = 0;
135};
136
137#endif // YARP_DEV_IRANGEFINDER2D_H
constexpr yarp::conf::vocab32_t VOCAB_LASER_ANGULAR_RANGE
constexpr yarp::conf::vocab32_t VOCAB_LASER_SCAN_RATE
constexpr yarp::conf::vocab32_t VOCAB_ILASER2D
constexpr yarp::conf::vocab32_t VOCAB_LASER_DISTANCE_RANGE
constexpr yarp::conf::vocab32_t VOCAB_DEVICE_INFO
constexpr yarp::conf::vocab32_t VOCAB_LASER_ANGULAR_STEP
contains the definition of a Vector type
A generic interface for planar laser range finders.
virtual ReturnValue getRawData(yarp::sig::Vector &data, double *timestamp=nullptr)=0
Get the device measurements.
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 getDeviceInfo(std::string &device_info)=0
get the device hardware characteristics
virtual ReturnValue getScanRate(double &rate)=0
get the scan rate (scans per seconds)
virtual ReturnValue setScanLimits(double min, double max)=0
set the scan angular range.
virtual ReturnValue getScanLimits(double &min, double &max)=0
get the scan angular range.
virtual ReturnValue getHorizontalResolution(double &step)=0
get the angular step between two measurements.
virtual ReturnValue getDeviceStatus(Device_status &status)=0
get the device status
virtual ReturnValue getLaserMeasurement(std::vector< yarp::sig::LaserMeasurementData > &data, double *timestamp=nullptr)=0
Get the device measurements.
virtual ReturnValue setHorizontalResolution(double step)=0
get the angular step between two measurements (if available)
virtual ReturnValue setScanRate(double rate)=0
set the scan rate (scans per seconds)
std::int32_t vocab32_t
Definition numeric.h:78
For streams capable of holding different kinds of content, check what they actually have.
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition Vocab.h:27
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18