Main Page
Classes
Files
File List
File Members
include
tuw_uvc
uvc_ros.h
Go to the documentation of this file.
1
/***************************************************************************
2
* Copyright (C) 2012 by Markus Bader *
3
* markus.bader@tuwien.ac.at *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
* *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
14
* *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
20
21
22
#ifndef V4R_CAM_NODE_H
23
#define V4R_CAM_NODE_H
24
25
#include <
ros/ros.h
>
26
#include <
tuw_uvc/uvc.h
>
27
#include <tuw_uvc/Sphere.h>
28
#include <opencv2/opencv.hpp>
29
#include <
image_transport/image_transport.h
>
30
#include <
image_transport/camera_publisher.h
>
31
#include <sensor_msgs/SetCameraInfo.h>
32
34
class
V4RCamNode
:
public
V4RCam
{
35
public
:
36
static
const
int
CONVERT_RAW
= 0;
37
static
const
int
CONVERT_YUV422toRGB
= 1;
38
static
const
int
CONVERT_YUV422toBGR
= 2;
39
static
const
int
CONVERT_YUV422toGray
= 3;
40
41
V4RCamNode
(
ros::NodeHandle
&n );
42
~V4RCamNode
();
43
void
publishCamera
();
44
void
showCameraImage
();
45
protected
:
46
ros::NodeHandle
n_
;
47
ros::NodeHandle
n_param_
;
48
image_transport::ImageTransport
imageTransport_
;
49
image_transport::CameraPublisher
cameraPublisher_
;
50
image_transport::Publisher
cameraThumbnailPublisher_
;
51
sensor_msgs::CameraInfo
cameraInfo_
;
52
sensor_msgs::Image
cameraImage_
;
53
sensor_msgs::Image
cameraThumbnail_
;
54
ros::ServiceServer
set_camera_info_srv_
;
55
ros::Subscriber
subSphere_
;
56
void
callbackSphere
(
const
tuw_uvc::SphereConstPtr& msg);
57
bool
setCameraInfo
(sensor_msgs::SetCameraInfoRequest &req, sensor_msgs::SetCameraInfoResponse &rsp);
58
bool
generate_dynamic_reconfigure_
;
59
bool
show_camera_image_
;
60
bool
camera_freeze_
;
61
bool
queueRosParamToV4LCommit_
;
62
bool
showCameraImageThreadActive_
;
63
boost::thread
showCameraImageThread_
;
64
protected
:
65
void
readInitParams
();
66
void
commitRosParamsToV4L
(
bool
force =
false
);
67
void
commitV4LToRosParams
();
68
void
loopCamera
();
69
int
convert_image_
;
70
int
ratioThumbnail_
;
71
76
void
readCameraControls
();
81
void
writeCameraControls
();
82
87
void
readControlEntryInfo
(
ControlEntry
*entry );
92
void
updateControlEntry
(
ControlEntry
*entry );
96
void
updateDynamicReconfigureFile
(
const
char
* filename )
const
;
97
};
98
99
#endif // V4R_CAM_NODE_H
V4RCamNode::queueRosParamToV4LCommit_
bool queueRosParamToV4LCommit_
Definition:
uvc_ros.h:61
V4RCamNode::imageTransport_
image_transport::ImageTransport imageTransport_
Definition:
uvc_ros.h:48
V4RCamNode::cameraImage_
sensor_msgs::Image cameraImage_
Definition:
uvc_ros.h:52
V4RCamNode::showCameraImage
void showCameraImage()
Definition:
uvc_ros.cpp:254
ros::NodeHandle
V4RCamNode::updateDynamicReconfigureFile
void updateDynamicReconfigureFile(const char *filename) const
V4RCam
v4l2 camera abstraction
Definition:
uvc.h:40
V4RCamNode::readInitParams
void readInitParams()
Definition:
uvc_ros.cpp:107
V4RCamNode::camera_freeze_
bool camera_freeze_
Definition:
uvc_ros.h:60
V4RCamNode::set_camera_info_srv_
ros::ServiceServer set_camera_info_srv_
Definition:
uvc_ros.h:54
V4RCamNode::cameraPublisher_
image_transport::CameraPublisher cameraPublisher_
Definition:
uvc_ros.h:49
image_transport.h
image_transport::CameraPublisher
V4RCamNode::writeCameraControls
void writeCameraControls()
V4RCamNode::showCameraImageThread_
boost::thread showCameraImageThread_
Definition:
uvc_ros.h:63
V4RCamNode::setCameraInfo
bool setCameraInfo(sensor_msgs::SetCameraInfoRequest &req, sensor_msgs::SetCameraInfoResponse &rsp)
Definition:
uvc_ros.cpp:297
V4RCamNode
ROS camera abstraction.
Definition:
uvc_ros.h:34
V4RCamNode::n_
ros::NodeHandle n_
Definition:
uvc_ros.h:46
V4RCamNode::CONVERT_YUV422toBGR
static const int CONVERT_YUV422toBGR
Definition:
uvc_ros.h:38
V4RCamNode::cameraInfo_
sensor_msgs::CameraInfo cameraInfo_
Definition:
uvc_ros.h:51
V4RCamNode::CONVERT_YUV422toGray
static const int CONVERT_YUV422toGray
Definition:
uvc_ros.h:39
V4RCamNode::~V4RCamNode
~V4RCamNode()
Definition:
uvc_ros.cpp:39
V4RCamNode::cameraThumbnailPublisher_
image_transport::Publisher cameraThumbnailPublisher_
Definition:
uvc_ros.h:50
V4RCamNode::showCameraImageThreadActive_
bool showCameraImageThreadActive_
Definition:
uvc_ros.h:62
ros::ServiceServer
ros::Subscriber
V4RCamNode::n_param_
ros::NodeHandle n_param_
Definition:
uvc_ros.h:47
V4RCamNode::CONVERT_RAW
static const int CONVERT_RAW
Definition:
uvc_ros.h:36
V4RCamNode::loopCamera
void loopCamera()
uvc.h
V4RCamNode::subSphere_
ros::Subscriber subSphere_
Definition:
uvc_ros.h:55
V4RCamNode::commitV4LToRosParams
void commitV4LToRosParams()
Definition:
uvc_ros.cpp:92
ros.h
V4RCamNode::readControlEntryInfo
void readControlEntryInfo(ControlEntry *entry)
V4RCamNode::generate_dynamic_reconfigure_
bool generate_dynamic_reconfigure_
Definition:
uvc_ros.h:58
V4RCamNode::show_camera_image_
bool show_camera_image_
Definition:
uvc_ros.h:59
V4RCamNode::convert_image_
int convert_image_
Definition:
uvc_ros.h:69
V4RCamNode::callbackSphere
void callbackSphere(const tuw_uvc::SphereConstPtr &msg)
Definition:
uvc_ros.cpp:290
V4RCamNode::commitRosParamsToV4L
void commitRosParamsToV4L(bool force=false)
Definition:
uvc_ros.cpp:63
V4RCamNode::updateControlEntry
void updateControlEntry(ControlEntry *entry)
V4RCamNode::cameraThumbnail_
sensor_msgs::Image cameraThumbnail_
Definition:
uvc_ros.h:53
V4RCamNode::CONVERT_YUV422toRGB
static const int CONVERT_YUV422toRGB
Definition:
uvc_ros.h:37
V4RCamNode::readCameraControls
void readCameraControls()
image_transport::ImageTransport
image_transport::Publisher
camera_publisher.h
V4RCamNode::publishCamera
void publishCamera()
Definition:
uvc_ros.cpp:183
V4RCamNode::V4RCamNode
V4RCamNode(ros::NodeHandle &n)
Definition:
uvc_ros.cpp:45
V4RCam::ControlEntry
shared pointer for v4l2 control entries
Definition:
uvc.h:52
V4RCamNode::ratioThumbnail_
int ratioThumbnail_
Definition:
uvc_ros.h:70
tuw_uvc
Author(s): Markus Bader
autogenerated on Mon Jun 10 2019 15:39:24