-
Notifications
You must be signed in to change notification settings - Fork 9
/
hires.launch
95 lines (86 loc) · 3.89 KB
/
hires.launch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?xml version="1.0"?>
<!--
/****************************************************************************
* Copyright (c) 2017 Michael Shomin. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name ATLFlight nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* In addition Supplemental Terms apply. See the SUPPLEMENTAL file.
****************************************************************************/
-->
<launch>
<arg name="cam_name" default="hires"/>
<arg name="nodelet_manager_name" default="hires_nodelet_manager"/>
<arg name="skip_n_frames" default="0"/>
<arg name="do_rectification" default="false"/>
<group ns="$(arg cam_name)">
<node pkg="nodelet" type="nodelet" name="$(arg nodelet_manager_name)" args="manager" output="screen"/>
<!-- camera driver nodelet -->
<node pkg="nodelet" type="nodelet" name="snap_cam_nodelet"
args="load snap_cam_ros/driver $(arg nodelet_manager_name)">
<param name="camera_name" value="$(arg cam_name)"/>
<param name="format" value="1"/>
<param name="camera_number" value="0"/>
<param name="width" value="640"/>
<param name="height" value="480"/>
<param name="frame_id" value="hires"/>
<param name="skip_n_frames" value="$(arg skip_n_frames)"/>
<param name="yuv_remap" value="mono"/>
<!-- options are: mono, yuv422, and rgb8
Note the following limitations:
mono is the most efficient and only uses the Y channel
from the provided yuv420p image.
yuv422 converts the yuv420p to the ROS-supported yuv422
encoding. This allows standard ros transport of a color image,
but image compression via image transport is not supported.
rgb8 converts the yuv420p image to 3 channel, 8 bit rgb. This
supports ros color transport and compression, but it is by far
the most computationally expensive (4 float operations, 3 mins,
3 maxes per pixel). This could result in dropped frames.
-->
</node>
<!--
camera_number
HIRES = 0,
DOWNWARD = 1,
RIGHT_STEREO = 2,
STEREO = 3,
format
RAW_FORMAT = 0
YUV_FORMAT = 1
NV12_FORMAT = 2
-->
<!-- mono rectification -->
<group if="$(arg do_rectification)">
<node pkg="nodelet" type="nodelet" name="image_proc_rect"
args="load image_proc/rectify $(arg nodelet_manager_name)">
<remap from="image_mono" to="image_raw"/>
</node>
</group>
</group>
</launch>