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

Fovis_ros using freenect_launch has depth image format error

asked 2015-07-10 00:12:44 -0500

wsAndy gravatar image

updated 2015-07-13 08:36:01 -0500

Miquel Massot gravatar image

Hello, I'm running ROS in indigo and use fovis_ros by freenect with a kinect xbox360. But there is an error:

Depth image must be in 32bit floating point format!

I find a similar problem here. But , he use openni and run ROS in Hydro. Here is the launch file.

<launch>
  <arg name="camera" default="camera" />

  <node pkg="nodelet" type="nodelet" args="manager" name="nodelet_manager" />
  <node pkg="nodelet" type="nodelet" name="convert_openni_fovis" 
        args="load depth_image_proc/convert_metric nodelet_manager">
    <remap from="image_raw" to="$(arg camera)/depth_registered/hw_registered/image_rect_raw"/>
    <remap from="image" to="$(arg camera)/depth_registered/image_raw"/>
  </node>

  <node pkg="fovis_ros" type="fovis_mono_depth_odometer" name="kinect_odometer" >
    <remap from="/camera/rgb/image_rect" 
           to="$(arg camera)/rgb/image_rect_mono" />
    <remap from="/camera/rgb/camera_info" 
           to="$(arg camera)/rgb/camera_info" />
    <remap from="/camera/depth_registered/camera_info" 
           to="$(arg camera)/depth_registered/sw_registered/camera_info" />
    <remap from="/camera/depth_registered/image_rect" 
           to="$(arg camera)/depth_registered/sw_registered/image_rect_raw" />
    <param name="approximate_sync" type="bool" value="True" />
  </node>
</launch>

I wonder if I use openni, I will solve this problem.

edit retag flag offensive close merge delete

Comments

Check the example launchfile in fovis_ros at github

Miquel Massot gravatar image Miquel Massot  ( 2015-07-13 08:39:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-07-13 08:51:55 -0500

Athria gravatar image

Hello, I was indeed having your same problem and it was because of the launch file I was using, which was this one. I still don't know why it didn't work, but adding the oppeni_launch include to the example launch file that Miguel Massot linked above fixed my problem, I don't think it should be any different in your case because you use Indigo. My current, working, launch file is this one:

<launch>
   <include file="$(find openni_launch)/launch/openni.launch">
  </include>


  <arg name="camera" default="camera" />
  <node pkg="nodelet" type="nodelet" args="manager" name="nodelet_manager" />
  <node pkg="nodelet" type="nodelet" name="convert_openni_fovis" 
        args="load depth_image_proc/convert_metric nodelet_manager">
    <remap from="image_raw" to="$(arg camera)/depth_registered/sw_registered/image_rect_raw"/>
    <remap from="image" to="$(arg camera)/depth_registered/image_rect"/>
  </node>

  <node pkg="fovis_ros" type="fovis_mono_depth_odometer" name="kinect_odometer" >
    <remap from="/camera/rgb/image_rect" to="$(arg camera)/rgb/image_rect_mono" />
    <remap from="/camera/rgb/camera_info" to="$(arg camera)/rgb/camera_info" />
    <remap from="/camera/depth_registered/camera_info" to="$(arg camera)/depth_registered/sw_registered/camera_info" />
    <remap from="/camera/depth_registered/image_rect" to="$(arg camera)/depth_registered/image_rect" />
    <param name="approximate_sync" type="bool" value="True" />
    <param name="publish_tf" type="bool" value="False" />
  </node>

</launch>

Hope it helps.

edit flag offensive delete link more

Comments

Thanks for your answer! In fact, my computer can't identify kinect by openni, so I use freenect in these days. As you say, I believe when I solve this problem( be identify by openni ) , I could also use this package. Thanks again.

wsAndy gravatar image wsAndy  ( 2015-07-13 22:17:00 -0500 )edit

Too bad about openni, are you by any chance working from a virtual machine? I had a similar issue with one. I haven't used freenect, but if it publishes the required image and depth topics you might be able to use them by just changing the remaps and the upper include from the working launch file

Athria gravatar image Athria  ( 2015-07-14 04:50:20 -0500 )edit

You mean openni is not good? As far as I know, asus xtion pro can only be identified by openni. I wanna to buy xtion this summer. If I could get the right format, maybe there will be other problems. Well, my system is a 32bit one.

wsAndy gravatar image wsAndy  ( 2015-07-14 11:21:25 -0500 )edit

I use my colleague's computer ( Ubuntu14.04 ,64 bit, indigo) and test your launch file, but find some problems about TF. I solve the problem by change the openni.launch and openni2_tf_prefix.launch.here Now,I can use it.

wsAndy gravatar image wsAndy  ( 2015-07-14 13:40:58 -0500 )edit

Sorry I could not answer before, I read about some problems with the openni_launch and the Kinect in Indigo, but in Hydro it works just fine with the simple launch file. I am glad you could make it work.

Athria gravatar image Athria  ( 2015-07-22 05:57:04 -0500 )edit

I looked a bit more into it. With a fresh install of both Fovis and the freenect_launch in Indigo (14.04.2) the Kinect works well, using the same launch file but with the respective <include file="$(find freenect_launch)/launch/freenect.launch">

Athria gravatar image Athria  ( 2015-07-22 06:47:55 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-07-10 00:12:44 -0500

Seen: 694 times

Last updated: Jul 13 '15