MultiCameraPlugin.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012 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_MULTI_CAMERA_PLUGIN_HH_
18 #define _GAZEBO_MULTI_CAMERA_PLUGIN_HH_
19 
20 #include <string>
21 #include <vector>
22 
23 #include <gazebo/common/Plugin.hh>
24 #include <gazebo/sensors/MultiCameraSensor.hh>
25 #include <gazebo/rendering/Camera.hh>
26 #include <gazebo/gazebo.hh>
27 
28 namespace gazebo
29 {
30  class MultiCameraPlugin : public SensorPlugin
31  {
32  public: MultiCameraPlugin();
33 
35  public: virtual ~MultiCameraPlugin();
36 
37  public: virtual void Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf);
38 
39  public: virtual void OnNewFrameLeft(const unsigned char *_image,
40  unsigned int _width, unsigned int _height,
41  unsigned int _depth, const std::string &_format);
42  public: virtual void OnNewFrameRight(const unsigned char *_image,
43  unsigned int _width, unsigned int _height,
44  unsigned int _depth, const std::string &_format);
45 
46  protected: sensors::MultiCameraSensorPtr parentSensor;
47 
48  protected: std::vector<unsigned int> width, height, depth;
49  protected: std::vector<std::string> format;
50 
51  protected: std::vector<rendering::CameraPtr> camera;
52 
53  private: std::vector<event::ConnectionPtr> newFrameConnection;
54  };
55 }
56 #endif
virtual ~MultiCameraPlugin()
Destructor.
std::vector< rendering::CameraPtr > camera
virtual void OnNewFrameLeft(const unsigned char *_image, unsigned int _width, unsigned int _height, unsigned int _depth, const std::string &_format)
std::vector< unsigned int > width
sensors::MultiCameraSensorPtr parentSensor
virtual void Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf)
std::vector< unsigned int > depth
std::vector< unsigned int > height
std::vector< std::string > format
std::vector< event::ConnectionPtr > newFrameConnection
virtual void OnNewFrameRight(const unsigned char *_image, unsigned int _width, unsigned int _height, unsigned int _depth, const std::string &_format)


gazebo_plugins
Author(s): John Hsu
autogenerated on Tue Apr 6 2021 02:19:39