Loading...
Searching...
No Matches
Lidar.hh
Go to the documentation of this file.
1/*
2 * Copyright 2019 Open Source Robotics Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17#ifndef SDF_LIDAR_HH_
18#define SDF_LIDAR_HH_
19
20#include <gz/math/Angle.hh>
21#include <gz/utils/ImplPtr.hh>
22
23#include <sdf/Error.hh>
24#include <sdf/Element.hh>
25#include <sdf/Noise.hh>
26#include <sdf/sdf_config.h>
27
28
29namespace sdf
30{
31 // Inline bracket to help doxygen filtering.
32 inline namespace SDF_VERSION_NAMESPACE {
33 //
34
106 {
108 public: Lidar();
109
116 public: Errors Load(ElementPtr _sdf);
117
122 public: sdf::ElementPtr Element() const;
123
127 public: unsigned int HorizontalScanSamples() const;
128
132 public: void SetHorizontalScanSamples(unsigned int _samples);
133
136 public: double HorizontalScanResolution() const;
137
140 public: void SetHorizontalScanResolution(double _res);
141
144 public: gz::math::Angle HorizontalScanMinAngle() const;
145
148 public: void SetHorizontalScanMinAngle(const gz::math::Angle &_min);
149
152 public: gz::math::Angle HorizontalScanMaxAngle() const;
153
156 public: void SetHorizontalScanMaxAngle(const gz::math::Angle &_max);
157
161 public: unsigned int VerticalScanSamples() const;
162
166 public: void SetVerticalScanSamples(unsigned int _samples);
167
170 public: double VerticalScanResolution() const;
171
174 public: void SetVerticalScanResolution(double _res);
175
178 public: gz::math::Angle VerticalScanMinAngle() const;
179
182 public: void SetVerticalScanMinAngle(const gz::math::Angle &_min);
183
186 public: gz::math::Angle VerticalScanMaxAngle() const;
187
190 public: void SetVerticalScanMaxAngle(const gz::math::Angle &_max);
191
194 public: double RangeMin() const;
195
198 public: void SetRangeMin(double _min);
199
202 public: double RangeMax() const;
203
206 public: void SetRangeMax(double _max);
207
210 public: double RangeResolution() const;
211
214 public: void SetRangeResolution(double _range);
215
218 public: const Noise &LidarNoise() const;
219
222 public: void SetLidarNoise(const Noise &_noise);
223
226 public: uint32_t VisibilityMask() const;
227
230 public: void SetVisibilityMask(uint32_t _mask);
231
235 public: bool operator==(const Lidar &_lidar) const;
236
241 public: bool operator!=(const Lidar &_lidar) const;
242
248 public: sdf::ElementPtr ToElement() const;
249
251 GZ_UTILS_IMPL_PTR(dataPtr)
252 };
253 }
254}
255#endif
Lidar contains information about a Lidar sensor.
Definition Lidar.hh:106
const Noise & LidarNoise() const
Get the noise values for the lidar sensor.
gz::math::Angle VerticalScanMaxAngle() const
Get the maximum angle for vertical scan.
void SetRangeResolution(double _range)
Set linear resolution of each lidar ray.
void SetHorizontalScanMaxAngle(const gz::math::Angle &_max)
Set the maximum angle for horizontal scan.
double RangeMax() const
Get maximum distance for each lidar ray.
void SetHorizontalScanResolution(double _res)
Set the resolution for horizontal scan.
void SetHorizontalScanSamples(unsigned int _samples)
Set the number of lidar rays horizontally to generate per laser sweep.
void SetVerticalScanMaxAngle(const gz::math::Angle &_max)
Set the maximum angle for vertical scan.
void SetVerticalScanSamples(unsigned int _samples)
Set the number of lidar rays vertically to generate per laser sweep.
gz::math::Angle HorizontalScanMaxAngle() const
Get the maximum angle for horizontal scan.
void SetVerticalScanResolution(double _res)
Set the resolution for vertical scan.
gz::math::Angle VerticalScanMinAngle() const
Get the minimum angle for vertical scan.
unsigned int VerticalScanSamples() const
Get the number of lidar rays vertically to generate per laser sweep.
double RangeResolution() const
Get linear resolution of each lidar ray.
void SetLidarNoise(const Noise &_noise)
\biref Set the noise values for the lidar sensor.
double HorizontalScanResolution() const
Get the resolution for horizontal scan.
void SetRangeMin(double _min)
Set minimum distance for each lidar ray.
uint32_t VisibilityMask() const
Get the visibility mask of a lidar.
void SetVisibilityMask(uint32_t _mask)
Set the visibility mask of a lidar.
gz::math::Angle HorizontalScanMinAngle() const
Get the minimum angle for horizontal scan.
double VerticalScanResolution() const
Get the resolution for vertical scan.
sdf::ElementPtr ToElement() const
Create and return an SDF element filled with data from this lidar.
bool operator==(const Lidar &_lidar) const
Return true if both Lidar objects contain the same values.
unsigned int HorizontalScanSamples() const
Get the number of lidar rays horizontally to generate per laser sweep.
double RangeMin() const
Get minimum distance for each lidar ray.
bool operator!=(const Lidar &_lidar) const
Return true this Lidar object does not contain the same values as the passed in parameter.
void SetVerticalScanMinAngle(const gz::math::Angle &_min)
Set the minimum angle for vertical scan.
void SetRangeMax(double _max)
Set maximum distance for each lidar ray.
void SetHorizontalScanMinAngle(const gz::math::Angle &_min)
Set the minimum angle for horizontal scan.
Errors Load(ElementPtr _sdf)
Load the lidar based on an element pointer.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
Lidar()
Default constructor.
The Noise class contains information about a noise model, such as a Gaussian distribution.
Definition Noise.hh:48
std::vector< Error > Errors
A vector of Error.
Definition Types.hh:81
std::shared_ptr< Element > ElementPtr
Definition Element.hh:55
namespace for Simulation Description Format parser
Definition Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition system_util.hh:25