00001 /* 00002 * Gazebo - Outdoor Multi-Robot Simulator 00003 * Copyright (C) 2003 00004 * Nate Koenig & Andrew Howard 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 /* 00022 * Desc: A dynamic controller plugin that publishes ROS image_raw camera_info topic for generic camera sensor. 00023 * Author: John Hsu 00024 * Date: 24 Sept 2008 00025 * SVN: $Id$ 00026 */ 00027 #ifndef GAZEBO_ROS_CAMERA_HH 00028 #define GAZEBO_ROS_CAMERA_HH 00029 00030 // library for processing camera data for gazebo / ros conversions 00031 #include <gazebo_plugins/gazebo_ros_camera_utils.h> 00032 #include "plugins/CameraPlugin.hh" 00033 00034 namespace gazebo 00035 { 00036 00037 class GazeboRosCamera : public CameraPlugin, GazeboRosCameraUtils 00038 { 00041 public: GazeboRosCamera(); 00042 00044 public: ~GazeboRosCamera(); 00045 00048 public: void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf); 00049 00051 protected: virtual void OnNewFrame(const unsigned char *_image, 00052 unsigned int _width, unsigned int _height, 00053 unsigned int _depth, const std::string &_format); 00054 00055 00056 }; 00057 00058 } 00059 #endif 00060