sensor2D.hpp
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (c) 2016
3  * VoXel Interaction Design GmbH
4  *
5  * @author Angel Merino Sastre
6  *
7  * Permission is hereby granted, free of charge, to any person obtaining a copy
8  * of this software and associated documentation files (the "Software"), to deal
9  * in the Software without restriction, including without limitation the rights
10  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11  * copies of the Software, and to permit persons to whom the Software is
12  * furnished to do so, subject to the following conditions:
13  *
14  * The above copyright notice and this permission notice shall be included in
15  * all copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23  * THE SOFTWARE.
24  *
25  ******************************************************************************/
26 
27 #ifndef __SENSOR2D_HPP__
28 #define __SENSOR2D_HPP__
29 
30 
31 #include <gst/gst.h>
32 #include <string.h>
33 #include <math.h>
34 #include <stdio.h>
35 #include <glib-object.h>
36 #include <stdlib.h>
37 #include <gst/app/gstappsink.h>
38 
39 #include <ros/ros.h>
42 #include <sensor_msgs/Image.h>
43 #include <sensor_msgs/CameraInfo.h>
44 #include <sensor_msgs/SetCameraInfo.h>
46 #include <boost/thread/locks.hpp>
47 //#include <opencv2/highgui/highgui.hpp>
48 //#include <cv_bridge/cv_bridge.h>
49 
50 
51 #include <ros/console.h>
52 
53 namespace bta_tof_driver {
54 
55  class Sensor2D
56  {
58  std::string nodeName_;
62 
63  std::string address_;
64 
65  GstElement *pipeline_;
66  GstElement *appsink;
67  GMainLoop *loop;
68 
69  //boost::thread* streaming;
70 
71  public:
72 
73  Sensor2D(ros::NodeHandle nh_camera,
74  ros::NodeHandle nh_private,
75  std::string nodeName);
76  virtual ~Sensor2D();
77 
78  void init();
79  void stop();
80  void getFrame();
81 
82  };
83 }
84 
85 #endif
camera_info_manager::CameraInfoManager cim_rgb_
Definition: sensor2D.hpp:59
image_transport::ImageTransport it_
Definition: sensor2D.hpp:60
ros::NodeHandle nh_
Definition: sensor2D.hpp:57
GstElement * pipeline_
Definition: sensor2D.hpp:65
GstElement * appsink
Definition: sensor2D.hpp:66
Sensor2D(ros::NodeHandle nh_camera, ros::NodeHandle nh_private, std::string nodeName)
Definition: sensor2D.cpp:46
image_transport::CameraPublisher pub_rgb_
Definition: sensor2D.hpp:61
ros::NodeHandle nh_private_
Definition: sensor2D.hpp:57


bta_tof_driver
Author(s): Angel Merino , Simon Vogl
autogenerated on Sun Jun 26 2022 02:45:00