YARP
Yet Another Robot Platform
IRangefinder2D.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2019 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_IRANGEFINDER2D_H
10 #define YARP_DEV_IRANGEFINDER2D_H
11 
12 #include <yarp/os/Vocab.h>
13 #include <yarp/dev/api.h>
14 #include <yarp/sig/Vector.h>
16 #include <vector>
17 #include <string>
18 
25 
26 namespace yarp {
27  namespace dev {
28  class IRangefinder2D;
29  }
30 }
31 
38 {
39 public:
41  {
42  DEVICE_OK_STANBY = 0,
43  DEVICE_OK_IN_USE = 1,
44  DEVICE_GENERAL_ERROR = 2,
45  DEVICE_TIMEOUT = 3
46  };
47 
48  virtual ~IRangefinder2D();
49 
55  virtual bool getLaserMeasurement(std::vector<LaserMeasurementData> &data) = 0;
56 
62  virtual bool getRawData(yarp::sig::Vector &data) = 0;
63 
69  virtual bool getDeviceStatus(Device_status& status) = 0;
70 
77  virtual bool getDistanceRange(double& min, double& max) = 0;
78 
85  virtual bool setDistanceRange(double min, double max) = 0;
86 
93  virtual bool getScanLimits(double& min, double& max) = 0;
94 
101  virtual bool setScanLimits(double min, double max) = 0;
102 
108  virtual bool getHorizontalResolution(double& step) = 0;
109 
115  virtual bool setHorizontalResolution(double step) = 0;
116 
122  virtual bool getScanRate(double& rate) = 0;
123 
129  virtual bool setScanRate(double rate) = 0;
130 
136  virtual bool getDeviceInfo(std::string &device_info) = 0;
137 };
138 
139 #endif // YARP_DEV_IRANGEFINDER2D_H
#define YARP_dev_API
Definition: api.h:19
constexpr yarp::conf::vocab32_t VOCAB_LASER_ANGULAR_STEP
A generic interface for planar laser range finders.
constexpr yarp::conf::vocab32_t VOCAB_LASER_DISTANCE_RANGE
constexpr yarp::conf::vocab32_t VOCAB_ILASER2D
std::int32_t vocab32_t
Definition: numeric.h:52
constexpr yarp::conf::vocab32_t VOCAB_LASER_ANGULAR_RANGE
Provides:
Definition: Vector.h:32
The main, catch-all namespace for YARP.
Definition: numeric.h:47
constexpr yarp::conf::vocab32_t VOCAB_DEVICE_INFO
constexpr yarp::conf::vocab32_t VOCAB_LASER_SCAN_RATE
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
Definition: Vocab.h:22
contains the definition of a Vector type