Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpLaserScan.h
1/*
2 * ViSP, open source Visual Servoing Platform software.
3 * Copyright (C) 2005 - 2025 by Inria. All rights reserved.
4 *
5 * This software is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 * See the file LICENSE.txt at the root directory of this source
10 * distribution for additional information about the GNU GPL.
11 *
12 * For using ViSP with software that can not be combined with the GNU
13 * GPL, please contact Inria about acquiring a ViSP Professional
14 * Edition License.
15 *
16 * See https://visp.inria.fr for more information.
17 *
18 * This software was developed at:
19 * Inria Rennes - Bretagne Atlantique
20 * Campus Universitaire de Beaulieu
21 * 35042 Rennes Cedex
22 * France
23 *
24 * If you have questions regarding the use of this file, please contact
25 * Inria at visp@inria.fr
26 *
27 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29 *
30 * Description:
31 * Laser scan data structure.
32 */
33
40
41#ifndef vpLaserScan_h
42#define vpLaserScan_h
43
44#include <visp3/core/vpConfig.h>
45#include "visp3/sensor/vpScanPoint.h"
46
47#include <vector>
48
62class /*VISP_EXPORT*/ vpLaserScan
63{
64public:
68 : listScanPoints(), startTimestamp(0), endTimestamp(0), measurementId(0), numSteps(0), startAngle(0), stopAngle(0),
69 numPoints(0)
70 { }
71
73 : listScanPoints(scan.listScanPoints), startTimestamp(0), endTimestamp(0), measurementId(0), numSteps(0),
74 startAngle(0), stopAngle(0), numPoints(0)
75 {
76 startTimestamp = scan.startTimestamp;
77 endTimestamp = scan.endTimestamp;
78 measurementId = scan.measurementId;
79 numSteps = scan.numSteps;
80 startAngle = scan.startAngle;
81 stopAngle = scan.stopAngle;
82 numPoints = scan.numPoints;
83 }
84
85 virtual ~vpLaserScan() { }
87 inline void addPoint(const vpScanPoint &p) { listScanPoints.push_back(p); }
89 inline void clear() { listScanPoints.clear(); }
91 inline std::vector<vpScanPoint> getScanPoints() { return listScanPoints; }
92
93#if VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11
94 vpLaserScan &operator=(const vpLaserScan &) = default;
95#endif
96
98 inline void setMeasurementId(const unsigned short &id) { this->measurementId = id; }
100 inline void setStartTimestamp(const double &start_timestamp) { this->startTimestamp = start_timestamp; }
102 inline void setEndTimestamp(const double &end_timestamp) { this->endTimestamp = end_timestamp; }
104 inline void setNumSteps(const unsigned short &num_steps) { this->numSteps = num_steps; }
106 inline void setStartAngle(const short &start_angle) { this->startAngle = start_angle; }
108 inline void setStopAngle(const short &stop_angle) { this->stopAngle = stop_angle; }
110 inline void setNumPoints(const unsigned short &num_points) { this->numPoints = num_points; }
112 inline double getStartTimestamp() { return startTimestamp; }
114 inline double getEndTimestamp() { return endTimestamp; }
115
116private:
117 std::vector<vpScanPoint> listScanPoints;
118 double startTimestamp;
119 double endTimestamp;
120 unsigned short measurementId;
121 unsigned short numSteps;
122 short startAngle;
123 short stopAngle;
124 unsigned short numPoints;
125};
126END_VISP_NAMESPACE
127#endif
void setNumPoints(const unsigned short &num_points)
void setStopAngle(const short &stop_angle)
void setMeasurementId(const unsigned short &id)
Definition vpLaserScan.h:98
void setNumSteps(const unsigned short &num_steps)
double getStartTimestamp()
void setStartTimestamp(const double &start_timestamp)
std::vector< vpScanPoint > getScanPoints()
Definition vpLaserScan.h:91
void addPoint(const vpScanPoint &p)
Definition vpLaserScan.h:87
void clear()
Definition vpLaserScan.h:89
vpLaserScan(const vpLaserScan &scan)
Definition vpLaserScan.h:72
void setEndTimestamp(const double &end_timestamp)
void setStartAngle(const short &start_angle)
vpLaserScan & operator=(const vpLaserScan &)=default
virtual ~vpLaserScan()
Definition vpLaserScan.h:85
double getEndTimestamp()
Class that defines a single laser scanner point.
Definition vpScanPoint.h:74