gazebo_ros_thermal_camera.h
Go to the documentation of this file.
1 //=================================================================================================
2 // Copyright (c) 2012, Stefan Kohlbrecher, TU Darmstadt
3 // All rights reserved.
4 
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are met:
7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above copyright
10 // notice, this list of conditions and the following disclaimer in the
11 // documentation and/or other materials provided with the distribution.
12 // * Neither the name of the Simulation, Systems Optimization and Robotics
13 // group, TU Darmstadt nor the names of its contributors may be used to
14 // endorse or promote products derived from this software without
15 // specific prior written permission.
16 
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
21 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 //=================================================================================================
32 /*
33  * Gazebo - Outdoor Multi-Robot Simulator
34  * Copyright (C) 2003
35  * Nate Koenig & Andrew Howard
36  *
37  * This program is free software; you can redistribute it and/or modify
38  * it under the terms of the GNU General Public License as published by
39  * the Free Software Foundation; either version 2 of the License, or
40  * (at your option) any later version.
41  *
42  * This program is distributed in the hope that it will be useful,
43  * but WITHOUT ANY WARRANTY; without even the implied warranty of
44  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45  * GNU General Public License for more details.
46  *
47  * You should have received a copy of the GNU General Public License
48  * along with this program; if not, write to the Free Software
49  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
50  *
51  */
52 
53 #ifndef GAZEBO_ROS_THERMAL_CAMERA_HH
54 #define GAZEBO_ROS_THERMAL_CAMERA_HH
55 
56 // camera stuff
58 
59 namespace gazebo
60 {
61  template <typename Base>
63  {
66  public: GazeboRosThermalCamera_();
67 
69  public: ~GazeboRosThermalCamera_();
70 
73  public: void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf);
74  public: void LoadImpl(sensors::SensorPtr _parent, sdf::ElementPtr _sdf) {}
75 
77  protected: virtual void OnNewFrame(const unsigned char *_image,
78  unsigned int _width, unsigned int _height,
79  unsigned int _depth, const std::string &_format);
80 
82  protected: virtual void OnNewImageFrame(const unsigned char *_image,
83  unsigned int _width, unsigned int _height,
84  unsigned int _depth, const std::string &_format);
85 
87  protected: void PutCameraData(const unsigned char *_src);
88  protected: void PutCameraData(const unsigned char *_src, common::Time &last_update_time);
89  };
90 
91 }
92 #endif
93 
void LoadImpl(sensors::SensorPtr _parent, sdf::ElementPtr _sdf)
void PutCameraData(const unsigned char *_src)
Put camera data to the ROS topic.
void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf)
Load the plugin.
virtual void OnNewImageFrame(const unsigned char *_image, unsigned int _width, unsigned int _height, unsigned int _depth, const std::string &_format)
Update the controller.
virtual void OnNewFrame(const unsigned char *_image, unsigned int _width, unsigned int _height, unsigned int _depth, const std::string &_format)
Update the controller.


hector_gazebo_thermal_camera
Author(s): Stefan Kohlbrecher
autogenerated on Fri Feb 5 2021 03:48:36