DepthCameraSensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-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_DEPTHCAMERASENSOR_HH_
18 #define _GAZEBO_DEPTHCAMERASENSOR_HH_
19 
20 #include <string>
21 
22 #include "gazebo/sensors/Sensor.hh"
23 #include "gazebo/msgs/MessageTypes.hh"
25 #include "gazebo/util/system.hh"
26 
27 namespace gazebo
28 {
31  namespace sensors
32  {
40  {
42  public: DepthCameraSensor();
43 
45  public: virtual ~DepthCameraSensor();
46 
50  protected: virtual void Load(const std::string &_worldName,
51  sdf::ElementPtr _sdf);
52 
55  protected: virtual void Load(const std::string &_worldName);
56 
58  protected: virtual void Init();
59 
60  // Documentation inherited
61  protected: virtual bool UpdateImpl(bool _force);
62 
64  protected: virtual void Fini();
65 
68  public: virtual void SetActive(bool _value);
69 
73  {return this->camera;}
74 
78  public: bool SaveFrame(const std::string &_filename);
79 
81  private: void Render();
82 
84  private: rendering::DepthCameraPtr camera;
85 
87  private: bool rendered;
88  };
90  }
91 }
92 #endif
boost::shared_ptr< DepthCamera > DepthCameraPtr
Definition: RenderTypes.hh:95
Definition: DepthCameraSensor.hh:39
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
rendering::DepthCameraPtr GetDepthCamera() const
Returns a pointer to the rendering::DepthCamera.
Definition: DepthCameraSensor.hh:72