Ignition Sensors

API Reference

5.0.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 IGN_DEPRECATED(4) Update(
84  const ignition::common::Time &_now) override;
85 
89  public: virtual bool Update(
90  const std::chrono::steady_clock::duration &_now) override;
91 
95  public: double Near() const;
96 
100  public: double Far() const;
101 
104  public: void SetModelPoses(std::map<std::string, math::Pose3d> &&_models);
105 
110  public: ignition::math::Angle HorizontalFOV() const;
111 
115  public: double AspectRatio() const;
116 
120  public: msgs::LogicalCameraImage Image() const;
121 
122  IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
126  IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
127  };
128  }
129  }
130 }
131 
132 #endif
Logical Camera Sensor Class.
Definition: LogicalCameraSensor.hh:62
a base sensor class
Definition: Sensor.hh:60
STL class.
Definition: AirPressureSensor.hh:32