Gazebo Sensors

API Reference

3.6.0
gz/sensors/LogicalCameraSensor.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_SENSORS_LOGICALCAMERASENSOR_HH_
18 #define GZ_SENSORS_LOGICALCAMERASENSOR_HH_
19 
20 #include <map>
21 #include <memory>
22 #include <string>
23 
24 #include <sdf/sdf.hh>
25 
26 #include <gz/common/PluginMacros.hh>
27 #include <gz/common/SuppressWarning.hh>
28 #include <gz/common/Time.hh>
29 
30 #include <gz/math/Angle.hh>
31 
32 #ifdef _WIN32
33 #pragma warning(push)
34 #pragma warning(disable: 4005)
35 #pragma warning(disable: 4251)
36 #endif
37 #include <ignition/msgs.hh>
38 #ifdef _WIN32
39 #pragma warning(pop)
40 #endif
41 
42 #include "gz/sensors/config.hh"
43 #include "gz/sensors/Export.hh"
44 #include "gz/sensors/logical_camera/Export.hh"
45 #include "gz/sensors/Sensor.hh"
46 
47 namespace ignition
48 {
49  namespace sensors
50  {
51  // Inline bracket to help doxygen filtering.
52  inline namespace IGNITION_SENSORS_VERSION_NAMESPACE {
53  //
55  class LogicalCameraSensorPrivate;
56 
62  class IGNITION_SENSORS_LOGICAL_CAMERA_VISIBLE LogicalCameraSensor
63  : public Sensor
64  {
66  public: LogicalCameraSensor();
67 
69  public: virtual ~LogicalCameraSensor();
70 
74  public: virtual bool Load(sdf::ElementPtr _sdf) override;
75 
78  public: virtual bool Init() override;
79 
83  public: virtual bool Update(const common::Time &_now) override;
84 
88  public: double Near() const;
89 
93  public: double Far() const;
94 
97  public: void SetModelPoses(std::map<std::string, math::Pose3d> &&_models);
98 
103  public: gz::math::Angle HorizontalFOV() const;
104 
108  public: double AspectRatio() const;
109 
113  public: msgs::LogicalCameraImage Image() const;
114 
115  IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
119  IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
120  };
121  }
122  }
123 }
124 
125 #endif
Definition: gz/sensors/AirPressureSensor.hh:32
STL class.
Logical Camera Sensor Class.
Definition: gz/sensors/LogicalCameraSensor.hh:62
a base sensor class
Definition: gz/sensors/Sensor.hh:60