LogicalCameraSensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 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 <string>
21 #include <sdf/sdf.hh>
22 
23 #include "gazebo/sensors/Sensor.hh"
24 #include "gazebo/util/system.hh"
25 
26 namespace gazebo
27 {
28  namespace sensors
29  {
30  // Forward declare private data class
31  class LogicalCameraSensorPrivate;
32 
35 
42  {
44  public: LogicalCameraSensor();
45 
47  public: virtual ~LogicalCameraSensor();
48 
49  // Documentation inherited
50  public: virtual void Load(const std::string &_worldName,
51  sdf::ElementPtr _sdf);
52 
53  // Documentation inherited
54  public: virtual void Load(const std::string &_worldName);
55 
56  // Documentation inherited
57  public: virtual void Init();
58 
59  // Documentation inherited
60  public: virtual std::string GetTopic() const;
61 
65  public: double Near() const;
66 
70  public: double Far() const;
71 
76  public: ignition::math::Angle HorizontalFOV() const;
77 
81  public: double AspectRatio() const;
82 
86  public: msgs::LogicalCameraImage Image() const;
87 
88  // Documentation inherited
89  protected: virtual bool UpdateImpl(bool _force);
90 
91  // \brief Finalize the logical camera
92  protected: virtual void Fini();
93 
94  // Documentation inherited
95  public: virtual bool IsActive();
96 
97  // \internal
98  // \brief Private data pointer
99  private: LogicalCameraSensorPrivate *dataPtr;
100  };
102  }
103 }
104 #endif
Definition: LogicalCameraSensorPrivate.hh:32
A camera sensor that reports locations of objects instead of rendering a scene.
Definition: LogicalCameraSensor.hh:41
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Base class for sensors.
Definition: Sensor.hh:69
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66