Regilo
A simple C++ library for controlling the Neato XV robot and the Hokuyo scanner.
scanrecord.hpp
1 /*
2  * Regilo
3  * Copyright (C) 2015-2016 Branislav HolĂ˝ <branoholy@gmail.com>
4  *
5  * This file is part of Regilo.
6  *
7  * Regilo is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * Regilo is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with Regilo. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef REGILO_SCANRECORD_HPP
23 #define REGILO_SCANRECORD_HPP
24 
25 #include <iosfwd>
26 
27 namespace regilo {
28 
33 {
34 public:
35  int id;
36  double angle;
37  double distance;
38  int intensity;
39  int errorCode;
40  bool error;
41 
45  ScanRecord() = default;
46 
56  ScanRecord(int id, double angle, double distance, int intensity, int errorCode, bool error = false);
57 
61  friend std::ostream& operator<<(std::ostream& out, const ScanRecord& record);
62 };
63 
64 }
65 
66 #endif // REGILO_SCANRECORD_HPP
Definition: controller.hpp:35
int errorCode
The error code.
Definition: scanrecord.hpp:39
int id
The id of the record (starting from zero).
Definition: scanrecord.hpp:35
friend std::ostream & operator<<(std::ostream &out, const ScanRecord &record)
Output the record as a string.
double distance
The distance that was measured in the angle (in millimeters).
Definition: scanrecord.hpp:37
The ScanRecord class represents one record from laser data.
Definition: scanrecord.hpp:32
bool error
True if this record has an error.
Definition: scanrecord.hpp:40
double angle
The angle of the record (in radians).
Definition: scanrecord.hpp:36
int intensity
The normalized spot intensity that was measured in the angle.
Definition: scanrecord.hpp:38
ScanRecord()=default
Default constructor.