LogicalCameraSensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 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 _GAZEBO_LOGICAL_CAMERASENSOR_HH_
18 #define _GAZEBO_LOGICAL_CAMERASENSOR_HH_
19 
20 #include <memory>
21 #include <string>
22 #include <sdf/sdf.hh>
23 
24 #include "gazebo/sensors/Sensor.hh"
25 #include "gazebo/util/system.hh"
26 
27 namespace gazebo
28 {
29  namespace sensors
30  {
31  // Forward declare private data class
32  class LogicalCameraSensorPrivate;
33 
36 
43  {
45  public: LogicalCameraSensor();
46 
48  public: virtual ~LogicalCameraSensor();
49 
50  // Documentation inherited
51  public: virtual void Load(const std::string &_worldName,
52  sdf::ElementPtr _sdf);
53 
54  // Documentation inherited
55  public: virtual void Load(const std::string &_worldName);
56 
57  // Documentation inherited
58  public: virtual void Init();
59 
60  // Documentation inherited
61  // Remove this in gazebo8.
62  public: virtual std::string GetTopic() const;
63 
67  public: double Near() const;
68 
72  public: double Far() const;
73 
78  public: ignition::math::Angle HorizontalFOV() const;
79 
83  public: double AspectRatio() const;
84 
88  public: msgs::LogicalCameraImage Image() const;
89 
90  // Documentation inherited
91  protected: virtual bool UpdateImpl(const bool _force);
92 
93  // \brief Finalize the logical camera
94  protected: virtual void Fini();
95 
96  // Documentation inherited
97  public: virtual bool IsActive() const;
98 
99  // Documentation inherited.
100  // Move this to the public section in gazebo8. Basically move this
101  // function up in this file to be grouped with other public functions
102  // per the Gazebo style guide. This should replace the GetTopic
103  // function.
104  public: virtual std::string Topic() const;
105 
106  // \internal
107  // \brief Private data pointer
108  private: std::unique_ptr<LogicalCameraSensorPrivate> dataPtr;
109  };
111  }
112 }
113 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
A camera sensor that reports locations of objects instead of rendering a scene.
Definition: LogicalCameraSensor.hh:42
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Base class for sensors.
Definition: Sensor.hh:50
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59