Ignition Sensors

API Reference

6.0.1
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/SuppressWarning.hh>
27 
28 #include <ignition/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 "ignition/sensors/config.hh"
41 #include "ignition/sensors/Export.hh"
42 #include "ignition/sensors/logical_camera/Export.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: ignition::math::Angle HorizontalFOV() const;
103 
107  public: double AspectRatio() const;
108 
112  public: msgs::LogicalCameraImage Image() const;
113 
114  IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
118  IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
119  };
120  }
121  }
122 }
123 
124 #endif
Logical Camera Sensor Class.
Definition: LogicalCameraSensor.hh:60
a base sensor class
Definition: Sensor.hh:59
STL class.
Definition: AirPressureSensor.hh:31