MultiCameraPlugin.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2012 Open Source Robotics Foundation
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  *
00016 */
00017 #ifndef _GAZEBO_MULTI_CAMERA_PLUGIN_HH_
00018 #define _GAZEBO_MULTI_CAMERA_PLUGIN_HH_
00019 
00020 #include <string>
00021 #include <vector>
00022 
00023 #include <gazebo/common/Plugin.hh>
00024 #include <gazebo/sensors/MultiCameraSensor.hh>
00025 #include <gazebo/rendering/Camera.hh>
00026 #include <gazebo/gazebo.hh>
00027 
00028 namespace gazebo
00029 {
00030   class MultiCameraPlugin : public SensorPlugin
00031   {
00032     public: MultiCameraPlugin();
00033 
00035     public: virtual ~MultiCameraPlugin();
00036 
00037     public: virtual void Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf);
00038 
00039     public: virtual void OnNewFrameLeft(const unsigned char *_image,
00040                               unsigned int _width, unsigned int _height,
00041                               unsigned int _depth, const std::string &_format);
00042     public: virtual void OnNewFrameRight(const unsigned char *_image,
00043                               unsigned int _width, unsigned int _height,
00044                               unsigned int _depth, const std::string &_format);
00045 
00046     protected: boost::shared_ptr<sensors::MultiCameraSensor> parentSensor;
00047 
00048     protected: std::vector<unsigned int> width, height, depth;
00049     protected: std::vector<std::string> format;
00050 
00051     protected: std::vector<rendering::CameraPtr> camera;
00052 
00053     private: std::vector<event::ConnectionPtr> newFrameConnection;
00054   };
00055 }
00056 #endif


gazebo_plugins
Author(s): John Hsu
autogenerated on Fri Aug 28 2015 10:47:25