Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add arg for camera_info and camera_transformation #3

Merged
merged 1 commit into from
Jan 5, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions launch/stereo.launch
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
<arg if="$(arg respawn)" name="bond" value="" />
<arg unless="$(arg respawn)" name="bond" value="--no-bond" />

<!-- arguments for camera param uri -->
<arg name="camera_info_url_default" default="file://$(find ps4eye)/camera_info/default.yaml" />
<arg name="camera_info_url_right" default="file://$(find ps4eye)/camera_info/right.yaml" />
<arg name="camera_info_url_left" default="file://$(find ps4eye)/camera_info/left.yaml" />

<!-- arguments for tf coords -->
<arg name="parent_frame" default="/map" />
<arg name="parent_transform" default="0 0 1 -1.57 0 -1.57" />

<!-- This launchfile should bring up a node that broadcasts a ros image
transport on /webcam/image_raw -->
<arg name="DEVICE" default="/dev/video1"/>
Expand All @@ -20,12 +29,12 @@
<param name="gscam_config" value="v4l2src device=$(arg DEVICE) ! video/x-raw-yuv,framerate=$(arg FPS),width=$(arg width),height=$(arg height) ! ffmpegcolorspace"/>
<param name="frame_id" value="/ps4eye_frame"/>
<param name="sync_sink" value="true"/>
<param name="camera_info_url" value="file://$(find ps4eye)/camera_info/default.yaml" />
<param name="camera_info_url" value="$(arg camera_info_url_default)" />
</node>
<!-- Split image to left and right image -->
<node pkg="nodelet" type="nodelet" name="standalone" args="manager"/>
<node pkg="nodelet" type="nodelet" name="split_right" args="load image_proc/crop_decimate standalone">
<param name="camera_info_url" value="file://$(find ps4eye)/camera_info/right.yaml" />
<param name="camera_info_url" value="$(arg camera_info_url_right)" />
<param name="queue_size" type="int" value="10" />
<param name="x_offset" type="int" value="48" />
<param name="y_offset" type="int" value="0" />
Expand All @@ -38,7 +47,7 @@
<remap from="/stereo/right/camera_info" to="/null/right/camera_info" />
</node>
<node pkg="nodelet" type="nodelet" name="split_left" args="load image_proc/crop_decimate standalone">
<param name="camera_info_url" value="file://$(find ps4eye)/camera_info/left.yaml" />
<param name="camera_info_url" value="$(arg camera_info_url_left)" />
<param name="queue_size" type="int" value="10" />
<param name="x_offset" type="int" value="688" />
<param name="y_offset" type="int" value="0" />
Expand All @@ -50,8 +59,8 @@
<!-- Dont use original camera info -->
<remap from="/stereo/left/camera_info" to="/null/left/camera_info" />
</node>
<node name="camera_transform" pkg="tf" type="static_transform_publisher" args="0 0 1 -1.57 0 -1.57 /map /ps4eye_frame 10"/>
<node name="camera_transform" pkg="tf" type="static_transform_publisher" args="$(arg parent_transform) $(arg parent_frame) /ps4eye_frame 10"/>

<node pkg="ps4eye" type="camera_info_publisher.py" name="camera_info_publisher" />
<node name="stereo_image_proc" pkg="stereo_image_proc" type="stereo_image_proc" ns="stereo"/>
</launch>
</launch>