Ignition Sensors

API Reference

3.2.0
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 IGNITION_SENSORS_LOGICALCAMERASENSOR_HH_
18 #define IGNITION_SENSORS_LOGICALCAMERASENSOR_HH_
19 
20 #include <map>
21 #include <memory>
22 #include <string>
23 
24 #include <sdf/sdf.hh>
25 
26 #include <ignition/common/PluginMacros.hh>
27 #include <ignition/common/SuppressWarning.hh>
28 #include <ignition/common/Time.hh>
29 
30 #include <ignition/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 "ignition/sensors/config.hh"
43 #include "ignition/sensors/Export.hh"
44 #include "ignition/sensors/logical_camera/Export.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: ignition::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
Logical Camera Sensor Class.
Definition: LogicalCameraSensor.hh:62
a base sensor class
Definition: Sensor.hh:60
STL class.
Definition: AirPressureSensor.hh:32