gazebo_ros_multicamera.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 
00018 #ifndef GAZEBO_ROS_MULTICAMERA_HH
00019 #define GAZEBO_ROS_MULTICAMERA_HH
00020 
00021 #include <string>
00022 #include <vector>
00023 
00024 // library for processing camera data for gazebo / ros conversions
00025 #include <gazebo_plugins/gazebo_ros_camera_utils.h>
00026 #include <gazebo_plugins/MultiCameraPlugin.h>
00027 
00028 namespace gazebo
00029 {
00030   class GazeboRosMultiCamera : public MultiCameraPlugin
00031   {
00034     public: GazeboRosMultiCamera();
00035 
00037     public: ~GazeboRosMultiCamera();
00038 
00041     public: void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf);
00042 
00043     std::vector<GazeboRosCameraUtils*> utils;
00044 
00045     protected: void OnNewFrame(const unsigned char *_image,
00046                    GazeboRosCameraUtils* util);
00049     protected: virtual void OnNewFrameLeft(const unsigned char *_image,
00050                    unsigned int _width, unsigned int _height,
00051                    unsigned int _depth, const std::string &_format);
00052     protected: virtual void OnNewFrameRight(const unsigned char *_image,
00053                    unsigned int _width, unsigned int _height,
00054                    unsigned int _depth, const std::string &_format);
00055 
00059     private: boost::shared_ptr<int> image_connect_count_;
00060     private: boost::shared_ptr<boost::mutex> image_connect_count_lock_;
00061     private: boost::shared_ptr<bool> was_active_;
00062   };
00063 }
00064 #endif
00065 


gazebo_plugins
Author(s): John Hsu
autogenerated on Thu Feb 23 2017 03:43:22