g2o
Loading...
Searching...
No Matches
raw_laser.h
Go to the documentation of this file.
1// g2o - General Graph Optimization
2// Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard
3// All rights reserved.
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are
7// met:
8//
9// * Redistributions of source code must retain the above copyright notice,
10// this list of conditions and the following disclaimer.
11// * Redistributions in binary form must reproduce the above copyright
12// notice, this list of conditions and the following disclaimer in the
13// documentation and/or other materials provided with the distribution.
14//
15// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
16// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
18// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
27#ifndef G2O_RAW_LASER_H
28#define G2O_RAW_LASER_H
29
30#include <Eigen/Core>
31#include <vector>
32
33#include "g2o_types_data_api.h"
34#include "laser_parameters.h"
35#include "robot_data.h"
36
37namespace g2o {
38
46 public:
47 using Point2DVector = std::vector<Vector2>;
48
49 public:
50 RawLaser();
51 ~RawLaser();
52
53 virtual bool write(std::ostream& os) const;
54 virtual bool read(std::istream& is);
55
60 Point2DVector cartesian() const;
61
63 const std::vector<double>& ranges() const { return _ranges; }
64 void setRanges(const std::vector<double>& ranges);
65
67 const std::vector<double>& remissions() const { return _remissions; }
68 void setRemissions(const std::vector<double>& remissions);
69
71 const LaserParameters& laserParams() const { return _laserParams; }
72 void setLaserParams(const LaserParameters& laserParams);
73
74 protected:
75 std::vector<double> _ranges;
76 std::vector<double> _remissions;
78};
79
80} // namespace g2o
81
82#endif
Raw laser measuerement.
Definition raw_laser.h:45
const std::vector< double > & ranges() const
the range measurements by the laser
Definition raw_laser.h:63
std::vector< double > _remissions
Definition raw_laser.h:76
std::vector< double > _ranges
Definition raw_laser.h:75
const LaserParameters & laserParams() const
the parameters of the laser
Definition raw_laser.h:71
LaserParameters _laserParams
Definition raw_laser.h:77
std::vector< Vector2 > Point2DVector
Definition raw_laser.h:47
const std::vector< double > & remissions() const
the remission measurements by the laser
Definition raw_laser.h:67
data recorded by the robot
Definition robot_data.h:41
#define G2O_TYPES_DATA_API
parameters for a 2D range finder