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
gazebo::MultiCameraPlugin::Load
virtual void Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf)
Definition: MultiCameraPlugin.cpp:38
gazebo::MultiCameraPlugin::OnNewFrameRight
virtual void OnNewFrameRight(const unsigned char *_image, unsigned int _width, unsigned int _height, unsigned int _depth, const std::string &_format)
Definition: MultiCameraPlugin.cpp:108
gazebo
gazebo::MultiCameraPlugin::width
std::vector< unsigned int > width
Definition: MultiCameraPlugin.h:48
gazebo::MultiCameraPlugin::depth
std::vector< unsigned int > depth
Definition: MultiCameraPlugin.h:48
gazebo::MultiCameraPlugin::MultiCameraPlugin
MultiCameraPlugin()
Definition: MultiCameraPlugin.cpp:26
gazebo::MultiCameraPlugin::parentSensor
sensors::MultiCameraSensorPtr parentSensor
Definition: MultiCameraPlugin.h:46
gazebo::MultiCameraPlugin::~MultiCameraPlugin
virtual ~MultiCameraPlugin()
Destructor.
Definition: MultiCameraPlugin.cpp:31
gazebo::MultiCameraPlugin::camera
std::vector< rendering::CameraPtr > camera
Definition: MultiCameraPlugin.h:51
gazebo::MultiCameraPlugin::format
std::vector< std::string > format
Definition: MultiCameraPlugin.h:49
gazebo::MultiCameraPlugin
Definition: MultiCameraPlugin.h:30
gazebo::MultiCameraPlugin::height
std::vector< unsigned int > height
Definition: MultiCameraPlugin.h:48
gazebo::MultiCameraPlugin::newFrameConnection
std::vector< event::ConnectionPtr > newFrameConnection
Definition: MultiCameraPlugin.h:53
gazebo::MultiCameraPlugin::OnNewFrameLeft
virtual void OnNewFrameLeft(const unsigned char *_image, unsigned int _width, unsigned int _height, unsigned int _depth, const std::string &_format)
Definition: MultiCameraPlugin.cpp:95


gazebo_plugins
Author(s): John Hsu
autogenerated on Thu Sep 5 2024 02:49:55