Gazebo Rendering

API Reference

6.6.3
gz/rendering/LidarVisual.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 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 IGNITION_RENDERING_LIDARVISUAL_HH_
18 #define IGNITION_RENDERING_LIDARVISUAL_HH_
19 
20 #include <vector>
21 #include <ignition/common/Time.hh>
22 #include <ignition/math/Color.hh>
23 #include <ignition/math/Vector3.hh>
29 
30 namespace ignition
31 {
32  namespace rendering
33  {
34  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
35  //
37  enum IGNITION_RENDERING_VISIBLE LidarVisualType
38  {
40  LVT_NONE = 0,
41 
44 
47 
50  };
51 
55  class IGNITION_RENDERING_VISIBLE LidarVisual :
56  public virtual Visual
57  {
58  protected: LidarVisual();
59 
61  public: virtual ~LidarVisual();
62 
64  public: virtual void ClearPoints() = 0;
65 
67  public: virtual void Update() = 0;
68 
71  public: virtual void SetPoints(const std::vector<double> &_points) = 0;
72 
76  public: virtual void SetPoints(const std::vector<double> &_points,
77  const std::vector<ignition::math::Color> &_colors) = 0;
78 
81  public: virtual void SetMinVerticalAngle(
82  double _minVerticalAngle) = 0;
83 
86  public: virtual double MinVerticalAngle() const = 0;
87 
90  public: virtual void SetMaxVerticalAngle(
91  double _maxVerticalAngle) = 0;
92 
95  public: virtual double MaxVerticalAngle() const = 0;
96 
99  public: virtual void SetMinHorizontalAngle(
100  double _minHorizontalAngle) = 0;
101 
104  public: virtual double MinHorizontalAngle() const = 0;
105 
108  public: virtual void SetMaxHorizontalAngle(
109  double _maxHorizontalAngle) = 0;
110 
113  public: virtual double MaxHorizontalAngle() const = 0;
114 
117  public: virtual void SetVerticalRayCount(
118  unsigned int _verticalRayCount) = 0;
119 
122  public: virtual unsigned int VerticalRayCount() const = 0;
123 
126  public: virtual void SetHorizontalRayCount(
127  unsigned int _horizontalRayCount) = 0;
128 
131  public: virtual unsigned int HorizontalRayCount() const = 0;
132 
135  public: virtual void SetMinRange(double _minRange) = 0;
136 
139  public: virtual double MinRange() const = 0;
140 
143  public: virtual void SetMaxRange(double _maxRange) = 0;
144 
147  public: virtual double MaxRange() const = 0;
148 
151  public: virtual void SetOffset(
152  const ignition::math::Pose3d _offset) = 0;
153 
156  public: virtual ignition::math::Pose3d Offset() const = 0;
157 
160  public: virtual unsigned int PointCount() const = 0;
161 
164  public: virtual std::vector<double> Points() const = 0;
165 
168  public: virtual void SetType(const LidarVisualType _type) = 0;
169 
172  public: virtual LidarVisualType Type() const = 0;
173 
177  public: virtual void SetSize(double _size) = 0;
178 
182  public: virtual double Size() const = 0;
183 
187  public: virtual void SetDisplayNonHitting(bool _display) = 0;
188 
191  public: virtual bool DisplayNonHitting() const = 0;
192  };
193  }
194  }
195 }
196 #endif
virtual void SetOffset(const ignition::math::Pose3d _offset)=0
Set offset of visual.
virtual double MaxVerticalAngle() const =0
Get minimum vertical angle.
A LidarVisual geometry class. The visual appearance is based on the type specified.
Definition: gz/rendering/LidarVisual.hh:55
virtual double MinRange() const =0
Get minimum range of lidar rays.
virtual void Update()=0
Update the Visual.
@ LVT_TRIANGLE_STRIPS
Triangle strips visual.
Definition: gz/rendering/LidarVisual.hh:49
@ LVT_NONE
No type.
Definition: gz/rendering/LidarVisual.hh:40
virtual void SetDisplayNonHitting(bool _display)=0
Set if non-hitting rays will be displayed (this does not work for TRIANGLE_STRIPS visual)
virtual std::vector< double > Points() const =0
Get the points in laser data.
virtual void ClearPoints()=0
Clear the points of the lidar visual.
virtual void SetMinRange(double _minRange)=0
Set minimum range of lidar rays.
virtual void SetSize(double _size)=0
Set size of the lidar visualization, e.g. size of rasterized lidar points in pixels.
virtual unsigned int PointCount() const =0
Get number of points in laser data.
virtual double MaxHorizontalAngle() const =0
Get maximum horizontal angle.
virtual void SetPoints(const std::vector< double > &_points)=0
Set lidar points to be visualised.
virtual ~LidarVisual()
Destructor.
virtual double Size() const =0
Get size of the lidar visualization.
virtual bool DisplayNonHitting() const =0
Get if non-hitting rays will be displayed.
LidarVisualType
Enum for LidarVisual types.
Definition: gz/rendering/LidarVisual.hh:37
Represents a visual node in a scene graph. A Visual is the only node that can have Geometry and other...
Definition: gz/rendering/Visual.hh:33
virtual void SetHorizontalRayCount(unsigned int _horizontalRayCount)=0
Set number of horizontal rays.
virtual void SetVerticalRayCount(unsigned int _verticalRayCount)=0
Set number of vertical rays.
virtual double MaxRange() const =0
Get maximum range of lidar rays.
@ LVT_POINTS
Points visual.
Definition: gz/rendering/LidarVisual.hh:46
virtual void SetMaxRange(double _maxRange)=0
Set maximum range of lidar rays.
virtual void SetMaxHorizontalAngle(double _maxHorizontalAngle)=0
Set maximum horizontal angle.
virtual void SetMaxVerticalAngle(double _maxVerticalAngle)=0
Set maximum vertical angle.
virtual void SetMinHorizontalAngle(double _minHorizontalAngle)=0
Set minimum horizontal angle.
virtual unsigned int HorizontalRayCount() const =0
Get number of horizontal rays.
virtual LidarVisualType Type() const =0
Get the type for lidar visual.
virtual double MinHorizontalAngle() const =0
Get minimum horizontal angle.
virtual double MinVerticalAngle() const =0
Get minimum vertical angle.
virtual void SetMinVerticalAngle(double _minVerticalAngle)=0
Set minimum vertical angle.
virtual ignition::math::Pose3d Offset() const =0
Get offset of visual.
virtual void SetType(const LidarVisualType _type)=0
Set type for lidar visual.
@ LVT_RAY_LINES
Ray line visual.
Definition: gz/rendering/LidarVisual.hh:43
virtual unsigned int VerticalRayCount() const =0
Get number of vertical rays.