Gazebo Sensors

API Reference

8.2.0
BoundingBoxCameraSensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 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 
18 #ifndef GZ_SENSORS_BOUNDINGBOXCAMERASENSOR_HH_
19 #define GZ_SENSORS_BOUNDINGBOXCAMERASENSOR_HH_
20 
21 #include <memory>
22 #include <vector>
23 
24 #include <gz/rendering/BoundingBoxCamera.hh>
25 #include <sdf/Sensor.hh>
26 
28 #include "gz/sensors/boundingbox_camera/Export.hh"
29 
30 namespace gz
31 {
32  namespace sensors
33  {
34  // Inline bracket to help doxygen filtering.
35  inline namespace GZ_SENSORS_VERSION_NAMESPACE {
36  // forward declarations
37  class BoundingBoxCameraSensorPrivate;
38 
46  class GZ_SENSORS_BOUNDINGBOX_CAMERA_VISIBLE
48  {
51 
53  public: virtual ~BoundingBoxCameraSensor();
54 
58  public: virtual bool Load(const sdf::Sensor &_sdf) override;
59 
63  public: virtual bool Load(sdf::ElementPtr _sdf) override;
64 
67  public: virtual bool Init() override;
68 
72  public: virtual bool Update(
73  const std::chrono::steady_clock::duration &_now) override;
74 
77  public: virtual rendering::BoundingBoxCameraPtr
79 
82  public: void OnNewBoundingBoxes(
84 
87  public: virtual void SetScene(
88  rendering::ScenePtr _scene) override;
89 
92  public: virtual unsigned int ImageWidth() const override;
93 
96  public: virtual unsigned int ImageHeight() const override;
97 
100  public: virtual bool HasConnections() const override;
101 
104  private: bool CreateCamera();
105 
106  GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
110  GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
111  };
112  }
113  }
114 }
115 
116 #endif