Skip to content

Instantly share code, notes, and snippets.

@jonbinney
Created January 11, 2013 19:04
Show Gist options
  • Save jonbinney/4513079 to your computer and use it in GitHub Desktop.
Save jonbinney/4513079 to your computer and use it in GitHub Desktop.
openni_launch patch
diff -r 7126145eb885 launch/includes/depth.launch
--- a/launch/includes/depth.launch Tue Dec 11 11:23:14 2012 -0800
+++ b/launch/includes/depth.launch Thu Dec 13 18:04:46 2012 -0600
@@ -4,6 +4,8 @@
<arg name="manager" />
<arg name="points_xyz" default="true" />
<arg name="rectify" default="true" />
+ <arg name="publish_metric" default="true" />
+ <arg name="publish_metric_rect" default="true" />
<arg name="respawn" default="false" />
<arg if="$(arg respawn)" name="bond" value="" />
@@ -22,7 +24,7 @@
</node>
<!-- Rectified depth image -->
- <node pkg="nodelet" type="nodelet" name="metric_rect"
+ <node if="$(arg publish_metric_rect)" pkg="nodelet" type="nodelet" name="metric_rect"
args="load depth_image_proc/convert_metric $(arg manager) $(arg bond)"
respawn="$(arg respawn)">
<remap from="image_raw" to="image_rect_raw" />
@@ -30,7 +32,7 @@
</node>
<!-- Unrectified depth image -->
- <node pkg="nodelet" type="nodelet" name="metric"
+ <node if="$(arg publish_metric)" pkg="nodelet" type="nodelet" name="metric"
args="load depth_image_proc/convert_metric $(arg manager) $(arg bond)"
respawn="$(arg respawn)" />
diff -r 7126145eb885 launch/includes/depth_registered.launch
--- a/launch/includes/depth_registered.launch Tue Dec 11 11:23:14 2012 -0800
+++ b/launch/includes/depth_registered.launch Thu Dec 13 18:04:46 2012 -0600
@@ -8,6 +8,16 @@
<arg if="$(arg respawn)" name="bond" value="" />
<arg unless="$(arg respawn)" name="bond" value="--no-bond" />
+ <!-- Enabling both will lead to a trivial error during launch -->
+ <!-- http://www.ros.org/wiki/openni_launch#Error_during_launch -->
+ <arg name="allow_software_registration" default="true" />
+ <arg name="allow_hardware_registration" default="true" />
+
+ <!-- (optional) publish the registered xyzrgb cloud -->
+ <arg name="publish_metric" default="true" />
+ <arg name="publish_metric_rect" default="true" />
+ <arg name="points_xyzrgb" default="true" />
+
<!-- TODO: Instead "rgb", "depth" and "depth_registered" should be remapped as
necessary by top-level launch file -->
<arg name="rgb" default="rgb" />
@@ -18,7 +28,7 @@
<arg name="suffix" default="$(arg depth)_$(arg rgb)" />
<!-- Registration nodelet, projecting depth to RGB camera -->
- <node pkg="nodelet" type="nodelet" name="register_$(arg suffix)"
+ <node if="$(arg allow_software_registration)" pkg="nodelet" type="nodelet" name="register_$(arg suffix)"
args="load depth_image_proc/register $(arg manager) $(arg bond)"
respawn="$(arg respawn)">
<!-- Explicit topic remappings, shouldn't need all of these -->
@@ -34,10 +44,13 @@
<arg name="manager" value="$(arg manager)" />
<arg name="points_xyz" value="false" /> <!-- Suppress XYZ point cloud -->
<arg name="respawn" value="$(arg respawn)" />
+ <arg name="rectify" value="$(arg allow_hardware_registration)" />
+ <arg name="publish_metric" value="$(arg publish_metric)" />
+ <arg name="publish_metric_rect" value="$(arg publish_metric_rect)" />
</include>
<!-- Instead publish registered XYZRGB point cloud -->
- <node pkg="nodelet" type="nodelet" name="points_xyzrgb_$(arg suffix)"
+ <node if="$(arg points_xyzrgb)" pkg="nodelet" type="nodelet" name="points_xyzrgb_$(arg suffix)"
args="load depth_image_proc/point_cloud_xyzrgb $(arg manager) $(arg bond)"
respawn="$(arg respawn)">
<!-- Explicit topic remappings, shouldn't need all of these -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment