Gazebo Sensors

API Reference

6.8.1
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/SuppressWarning.hh>
27 
28 #include <gz/math/Angle.hh>
29 
30 #ifdef _WIN32
31 #pragma warning(push)
32 #pragma warning(disable: 4005)
33 #pragma warning(disable: 4251)
34 #endif
35 #include <ignition/msgs.hh>
36 #ifdef _WIN32
37 #pragma warning(pop)
38 #endif
39 
40 #include "gz/sensors/config.hh"
41 #include "gz/sensors/Export.hh"
42 #include "gz/sensors/logical_camera/Export.hh"
43 #include "gz/sensors/Sensor.hh"
44 
45 namespace ignition
46 {
47  namespace sensors
48  {
49  // Inline bracket to help doxygen filtering.
50  inline namespace IGNITION_SENSORS_VERSION_NAMESPACE {
51  //
53  class LogicalCameraSensorPrivate;
54 
60  class IGNITION_SENSORS_LOGICAL_CAMERA_VISIBLE LogicalCameraSensor
61  : public Sensor
62  {
64  public: LogicalCameraSensor();
65 
67  public: virtual ~LogicalCameraSensor();
68 
72  public: virtual bool Load(sdf::ElementPtr _sdf) override;
73 
76  public: virtual bool Init() override;
77 
81  public: virtual bool Update(
82  const std::chrono::steady_clock::duration &_now) override;
83 
87  public: double Near() const;
88 
92  public: double Far() const;
93 
96  public: void SetModelPoses(std::map<std::string, math::Pose3d> &&_models);
97 
102  public: gz::math::Angle HorizontalFOV() const;
103 
107  public: double AspectRatio() const;
108 
112  public: bool HasConnections() const;
113 
117  public: msgs::LogicalCameraImage Image() const;
118 
119  IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
123  IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
124  };
125  }
126  }
127 }
128 
129 #endif
Definition: gz/sensors/AirPressureSensor.hh:31
STL class.
Logical Camera Sensor Class.
Definition: gz/sensors/LogicalCameraSensor.hh:60
a base sensor class
Definition: gz/sensors/Sensor.hh:59