ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Edit openni2.launch to only use the openni2_driver

asked 2014-07-22 19:40:36 -0500

Xegara gravatar image

Given the openni2.launch, I only want to stream raw images and remove all other processed images. But I also wanted the same parameters like the the rgb/image is pushed down into the camera workspace, rgb_frame_id is named to camera_rgb_optical_frame. How do I edit openni2.launch in order to do this? Apparently, I can't seem to find any node executed here in the launch file. So I assume the nodes are executed in the included launch files. Here is my attempted edit of openni2.launch but it looks like nodelet manager must definitely be ran. I tried

 roslaunch openni2_camera openni2_camera_node

But the namespace is not pushed down into the camera namespace and so does the rgb_frame_id is not set to camer_rgb_optical_frame.. Help...

     <!-- Entry point for using OpenNI2 devices -->

     <!-- "camera" should uniquely identify the device. All topics are pushed down
       into the "camera" namespace, and it is prepended to tf frame ids. -->
  <arg name="camera" default="camera" />
  <arg name="tf_prefix" default="" />
  <arg name="rgb_frame_id"   default="$(arg tf_prefix)/$(arg camera)_rgb_optical_frame" />
  <arg name="depth_frame_id" default="$(arg tf_prefix)/$(arg camera)_depth_optical_frame" />

  <!-- device_id can have the following formats:
         "#1"  : the first device found
         "2@X" : the Xth device on USB bus 2 -->
  <arg name="device_id" default="#1" />

  <!-- By default, calibrations are stored to file://${ROS_HOME}/camera_info/${NAME}.yaml,
       where ${NAME} is of the form "[rgb|depth]_[serial#]", e.g. "depth_B00367707227042B".
       See camera_info_manager docs for calibration URL details. -->
  <arg name="rgb_camera_info_url"   default="" />
  <arg name="depth_camera_info_url" default="" />

  <!-- Hardware depth registration 
  <arg name="depth_registration" default="false" />
  <!-- Driver parameters -->
  <arg name="color_depth_synchronization"     default="false" />
  <arg name="auto_exposure"                   default="true" />
  <arg name="auto_white_balance"              default="true" />

  <!-- Arguments for remapping all device namespaces -->
  <arg name="rgb"              default="rgb" />
  <arg name="ir"               default="ir" />
  <arg name="depth"            default="depth" />

  <!-- Optionally suppress loading the driver nodelet and/or publishing the default tf
       tree. Useful if you are playing back recorded raw data from a bag, or are
       supplying a more accurate tf tree from calibration. -->
  <arg name="load_driver" default="true" />
  <arg name="publish_tf" default="true" />

  <!-- Processing Modules 
  <arg name="rgb_processing"                  default="true"  />
  <arg name="debayer_processing"              default="false" />
  <arg name="ir_processing"                   default="false" />
  <arg name="depth_processing"                default="true" />
  <arg name="depth_registered_processing"     default="true" />
  <arg name="disparity_processing"            default="false" />
  <arg name="disparity_registered_processing" default="false" />
  <arg name="hw_registered_processing"        default="true" if="$(arg depth_registration)" />
  <arg name="sw_registered_processing"        default="false" if="$(arg depth_registration)" />
  <arg name="hw_registered_processing"        default="false" unless="$(arg depth_registration)" />
  <arg name="sw_registered_processing"        default="true" unless="$(arg depth_registration)" />

  <!-- Disable bond topics by default -->
  <arg name="respawn" default="false" />

  <!-- Worker threads for the nodelet manager -->
  <arg name="num_worker_threads" default="4" />

  <!-- Push down all topics/nodelets into "camera" namespace -->
  <group ns="$(arg camera)">

      <!-- Start nodelet manager 
      <arg name="manager" value="$(arg camera)_nodelet_manager" />
      <arg name="debug" default="false" />  Run manager in GDB? -->
          <include file="$(find rgbd_launch)/launch/includes/manager.launch.xml">
        <arg name="name" value="$(arg manager)" />
        <arg name="debug" value="$(arg debug)" />
        <arg name="num_worker_threads"  value="$(arg num_worker_threads)" />

    <!-- Load driver -->
    <include if="$(arg load_driver)"
         file="$(find openni2_launch)/launch/includes/device.launch.xml">
      <!-- <arg ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-24 00:58:09 -0500

McMurdo gravatar image

You do not have to edit openni2.launch.

To push the topics/frames to a namespace just do:

roslaunch openni2_camera openni2_camera_node camera:=xyzrgb_camera

where xyzrgb_camera is the name of your namespace. /camera/depth/points will now be,


edit flag offensive delete link more

Question Tools



Asked: 2014-07-22 19:40:36 -0500

Seen: 1,351 times

Last updated: Jul 24 '14