Gazebo Rendering

API Reference

7.4.2
gz/rendering/base/BaseThermalCamera.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 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 GZ_RENDERING_BASE_BASETHERMALCAMERA_HH_
18 #define GZ_RENDERING_BASE_BASETHERMALCAMERA_HH_
19 
20 #include <string>
21 
24 
25 namespace gz
26 {
27  namespace rendering
28  {
29  inline namespace GZ_RENDERING_VERSION_NAMESPACE {
30  //
32  template <class T>
34  public virtual ThermalCamera,
35  public virtual BaseCamera<T>,
36  public virtual T
37  {
39  protected: BaseThermalCamera();
40 
42  public: virtual ~BaseThermalCamera();
43 
44  // Documentation inherited.
45  public: virtual void SetAmbientTemperature(float _ambient) override;
46 
47  // Documentation inherited.
48  public: virtual float AmbientTemperature() const override;
49 
50  // Documentation inherited.
51  public: virtual void SetAmbientTemperatureRange(float _range) override;
52 
53  // Documentation inherited.
54  public: virtual float AmbientTemperatureRange() const override;
55 
56  // Documentation inherited.
57  public: virtual void SetMinTemperature(float _min) override;
58 
59  // Documentation inherited.
60  public: virtual float MinTemperature() const override;
61 
62  // Documentation inherited.
63  public: virtual void SetMaxTemperature(float _max) override;
64 
65  // Documentation inherited.
66  public: virtual float MaxTemperature() const override;
67 
68  // Documentation inherited.
69  public: virtual void SetLinearResolution(float _max) override;
70 
71  // Documentation inherited.
72  public: virtual float LinearResolution() const override;
73 
74  // Documentation inherited.
75  public: virtual float HeatSourceTemperatureRange() const override;
76 
77  // Documentation inherited.
78  public: virtual void SetHeatSourceTemperatureRange(float _range) override;
79 
80  // Documentation inherted.
81  public: virtual gz::common::ConnectionPtr ConnectNewThermalFrame(
82  std::function<void(const uint16_t *, unsigned int, unsigned int,
83  unsigned int, const std::string &)> _subscriber) override;
84 
86  protected: float ambient = 0.0f;
87 
89  protected: float ambientRange = 0.0f;
90 
92  protected: float minTemp = -gz::math::INF_F;
93 
95  protected: float maxTemp = gz::math::INF_F;
96 
98  protected: float resolution = 0.01f;
99 
101  protected: float heatSourceTempRange = 0.0f;
102  };
103 
105  template <class T>
107  {
108  }
109 
111  template <class T>
113  {
114  }
115 
117  template <class T>
119  {
120  this->ambient = _ambient;
121  }
122 
124  template <class T>
126  {
127  return this->ambient;
128  }
129 
131  template <class T>
133  {
134  this->ambientRange = _range;
135  }
136 
138  template <class T>
140  {
141  return this->ambientRange;
142  }
143 
145  template <class T>
147  {
148  this->minTemp = _min;
149  }
150 
152  template <class T>
154  {
155  return this->minTemp;
156  }
157 
159  template <class T>
161  {
162  this->maxTemp = _max;
163  }
164 
166  template <class T>
168  {
169  return this->maxTemp;
170  }
171 
173  template <class T>
175  {
176  this->resolution = _resolution;
177  }
178 
180  template <class T>
182  {
183  return this->resolution;
184  }
185 
187  template <class T>
189  {
190  this->heatSourceTempRange = _range;
191  }
192 
194  template <class T>
196  {
197  return this->heatSourceTempRange;
198  }
199 
201  template <class T>
203  std::function<void(const uint16_t *, unsigned int, unsigned int,
204  unsigned int, const std::string &)>)
205  {
206  return nullptr;
207  }
208  }
209  }
210 }
211 #endif