Gazebo Rendering

API Reference

6.6.3
gz/rendering/base/BaseBoundingBoxCamera.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 #ifndef IGNITION_RENDERING_BASE_BASEBOUNDINGBOXCAMERA_HH_
18 #define IGNITION_RENDERING_BASE_BASEBOUNDINGBOXCAMERA_HH_
19 
20 #include <vector>
21 
22 #include <ignition/common/Event.hh>
23 #include <ignition/math/Color.hh>
24 
27 
28 namespace ignition
29 {
30  namespace rendering
31  {
32  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
33 
34  template <class T>
36  public virtual BoundingBoxCamera,
37  public virtual BaseCamera<T>,
38  public virtual T
39  {
41  protected: BaseBoundingBoxCamera();
42 
44  public: virtual ~BaseBoundingBoxCamera();
45 
46  // Documentation inherited
47  public: virtual const std::vector<BoundingBox> &BoundingBoxData() const;
48 
49  // Documentation inherited
50  public: virtual ignition::common::ConnectionPtr ConnectNewBoundingBoxes(
51  std::function<void(const std::vector<BoundingBox> &)> _subscriber) = 0;
52 
53  // Documentation inherited
54  public: virtual void SetBoundingBoxType(BoundingBoxType _type);
55 
56  // Documentation inherited
57  public: virtual BoundingBoxType Type() const;
58 
59  // Documentation inherited
60  public: virtual void DrawBoundingBox(unsigned char *_data,
61  const math::Color &_color, const BoundingBox &_box) const = 0;
62 
65 
68  };
69 
71  template <class T>
73  {
74  }
75 
77  template <class T>
79  {
80  }
81 
83  template <class T>
86  {
87  return this->boundingBoxes;
88  }
89 
91  template <class T>
93  {
94  this->type = _type;
95  }
96 
98  template <class T>
100  {
101  return this->type;
102  }
103  }
104  }
105 }
106 #endif
virtual const std::vector< BoundingBox > & BoundingBoxData() const
Get the BoundingBox data.
Definition: gz/rendering/base/BaseBoundingBoxCamera.hh:85
virtual BoundingBoxType Type() const
Get the BoundingBox Type (Visible / Full)
Definition: gz/rendering/base/BaseBoundingBoxCamera.hh:99
STL class.
2D or 3D Bounding box. It stores the position / orientation / size info of the box and its label
Definition: gz/rendering/BoundingBox.hh:41
STL class.
virtual void DrawBoundingBox(unsigned char *_data, const math::Color &_color, const BoundingBox &_box) const =0
Draw a bounding box on the given image.
BaseBoundingBoxCamera()
Constructor.
Definition: gz/rendering/base/BaseBoundingBoxCamera.hh:72
Poseable BoundingBox camera used for rendering bounding boxes of objects in the scene.
Definition: gz/rendering/BoundingBoxCamera.hh:54
@ BBT_FULLBOX2D
2D box that shows the full box of occluded objects
virtual void SetBoundingBoxType(BoundingBoxType _type)
Set BoundingBox Type (Visible / Full)
Definition: gz/rendering/base/BaseBoundingBoxCamera.hh:92
virtual ignition::common::ConnectionPtr ConnectNewBoundingBoxes(std::function< void(const std::vector< BoundingBox > &)> _subscriber)=0
Connect to the new BoundingBox info.
virtual ~BaseBoundingBoxCamera()
Destructor.
Definition: gz/rendering/base/BaseBoundingBoxCamera.hh:78
BoundingBoxType type
The bounding box type.
Definition: gz/rendering/base/BaseBoundingBoxCamera.hh:64
Definition: gz/rendering/base/BaseBoundingBoxCamera.hh:35
Definition: gz/rendering/base/BaseCamera.hh:44
BoundingBoxType
BoundingBox types for Visible / Full 2D Boxes / 3D Boxes.
Definition: gz/rendering/BoundingBoxCamera.hh:37
std::vector< BoundingBox > boundingBoxes
The bounding box data.
Definition: gz/rendering/base/BaseBoundingBoxCamera.hh:67