Gazebo Rendering

API Reference

3.7.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 ignition
26 {
27  namespace rendering
28  {
29  inline namespace IGNITION_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
virtual void SetMinTemperature(float _min) override
Set the minimum temperature the sensor can detect.
Definition: gz/rendering/base/BaseThermalCamera.hh:146
STL class.
STL class.
virtual float MaxTemperature() const override
Get the maximum temperature the sensor can detect.
Definition: gz/rendering/base/BaseThermalCamera.hh:167
float maxTemp
Maximum temperature.
Definition: gz/rendering/base/BaseThermalCamera.hh:95
float ambient
Ambient temperature of the environment.
Definition: gz/rendering/base/BaseThermalCamera.hh:86
float heatSourceTempRange
Range of heat source temperature variation.
Definition: gz/rendering/base/BaseThermalCamera.hh:101
float ambientRange
Ambient temperature range.
Definition: gz/rendering/base/BaseThermalCamera.hh:89
virtual float MinTemperature() const override
Get the minimum temperature the sensor can detect.
Definition: gz/rendering/base/BaseThermalCamera.hh:153
virtual float LinearResolution() const override
Get the temperature linear resolution.
Definition: gz/rendering/base/BaseThermalCamera.hh:181
virtual gz::common::ConnectionPtr ConnectNewThermalFrame(std::function< void(const uint16_t *, unsigned int, unsigned int, unsigned int, const std::string &)> _subscriber) override
Connect to the new thermal image event.
Definition: gz/rendering/base/BaseThermalCamera.hh:202
float resolution
Linear resolution. Defaults to 10mK.
Definition: gz/rendering/base/BaseThermalCamera.hh:98
virtual void SetMaxTemperature(float _max) override
Set the maximum temperature the sensor can detect.
Definition: gz/rendering/base/BaseThermalCamera.hh:160
virtual void SetAmbientTemperature(float _ambient) override
Set the ambient temperature of the environment.
Definition: gz/rendering/base/BaseThermalCamera.hh:118
Base implementation of the ThermalCamera class.
Definition: gz/rendering/base/BaseThermalCamera.hh:33
virtual void SetHeatSourceTemperatureRange(float _range) override
Set the range of temperature variation for all heat sources. If set, the temperature reading of heat ...
Definition: gz/rendering/base/BaseThermalCamera.hh:188
virtual void SetAmbientTemperatureRange(float _range) override
Set the range of ambient temperature.
Definition: gz/rendering/base/BaseThermalCamera.hh:132
virtual float AmbientTemperatureRange() const override
Get the range of ambient temperature.
Definition: gz/rendering/base/BaseThermalCamera.hh:139
Thermal camera that produces temperature data. An object's temperature can be set through the Visual ...
Definition: gz/rendering/ThermalCamera.hh:40
virtual void SetLinearResolution(float _max) override
Set the temperature linear resolution. The thermal image data returned will be temperature in kelvin ...
Definition: gz/rendering/base/BaseThermalCamera.hh:174
float minTemp
Minimum temperature.
Definition: gz/rendering/base/BaseThermalCamera.hh:92
virtual float AmbientTemperature() const override
Get the ambient temperature of the environment.
Definition: gz/rendering/base/BaseThermalCamera.hh:125
BaseThermalCamera()
Constructor.
Definition: gz/rendering/base/BaseThermalCamera.hh:106
Definition: gz/rendering/base/BaseCamera.hh:44
virtual ~BaseThermalCamera()
Destructor.
Definition: gz/rendering/base/BaseThermalCamera.hh:112
virtual float HeatSourceTemperatureRange() const override
Get the range of temperature variation for all heat sources.
Definition: gz/rendering/base/BaseThermalCamera.hh:195