Ask Your Question
3

Openni Gazebo Plugin stepsize for depth images (bug?)

asked 2012-10-11 12:01:07 -0500

Rob Janssen gravatar image

updated 2012-11-07 23:40:35 -0500

In the current Fuerte distribution of the libgazebo_ros openni plugin for Gazebo, it seems to be impossible to obtain both the RGB as well as the depth image information. If I look in the code of gazebo_plugins/src/gazebo_ros_openni_kinect.cpp, it seems that on line 381 the stepsize for the sensor_msg/image is not set correctly. It is set to 1, whereas to my opinion it should be set to the number of rows times the type (in the case of a float times 4), to obtain the correct number of bytes.

Is someone familiar with this problem? And does anybody know how to fix this nicely?

Cheers, Rob

PS: both the PR2 and Turtlebot models also seem to have erronous or non-existing depth images

PS2: our forked source code for the plugin can be found at https://amigo.wtb.tue.nl/svn/amigo/code/tue-ros-pkg/trunk/tue_simulator/amigo_simulation_controllers/src/kinect_controller_fuerte.cpp (for fuerte, including coloured pointcloud) and https://amigo.wtb.tue.nl/svn/amigo/code/tue-ros-pkg/trunk/tue_simulator/amigo_simulation_controllers/src/kinect_controller_electric.cpp (for electric, with grayscale pointcloud). A URDF configuration file can be found at https://amigo.wtb.tue.nl/svn/amigo/code/tue-ros-pkg/trunk/tue_robot_models/amigo_robot_model/description/gazebo/gazebo.urdf.xacro, where one should pay attention to the 'base_kinect' and 'openni_camera' gazebo references.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-01-04 01:55:22 -0500

This bug has been ticketed #5596. A patch is attached to the ticket.

edit flag offensive delete link more

Comments

Is it going to be repaired even in ROS Electric? There is exactly the same issue with depth map. And moreover there is also issue with simulated point cloud where max. depth is not limited properly.

ZdenekM gravatar image ZdenekM  ( 2013-01-04 02:47:24 -0500 )edit

One of the stack maintainers will be able to comment on this. I would be surprised if this bugfix will be applied to the last Electric release, as that is pretty dated. I would recommend checking out gazebo_plugins and applying this patch locally. You might have to tweak it a bit to get it to work.

piyushk gravatar image piyushk  ( 2013-01-04 04:54:58 -0500 )edit

@ZdenekM given most of us have moved on to ubuntu precise, the patch will not be applied in electric.

hsu gravatar image hsu  ( 2013-01-04 06:19:00 -0500 )edit

I've just tried the patch on my ubuntu 12.04 precise setup and haven't had any luck with getting it to work. I'm having the same issue as jamuraa, exact same image displayed in weird matrix. It looks like the depth image is correct, but it just keeps replicating itself.

ncr7 gravatar image ncr7  ( 2013-01-16 04:51:25 -0500 )edit

@ncr7: I am using this patch on simulator-gazebo 1.7.6 in ROS groovy. Could you comment on what version of ROS/simulator_gazebo you are using.

piyushk gravatar image piyushk  ( 2013-01-17 06:52:38 -0500 )edit

I'm using ROS Fuerte, and from the manifest.xml file in gazebo, it looks like Fuerte is using gazebo 1.0.2

ncr7 gravatar image ncr7  ( 2013-01-21 13:10:21 -0500 )edit

Did the patch get rejected in Fuerte? Fuerte is running simulator_gazebo 1.6.16, and it would be unlikely that it will work out of the box. You'll have to modify it by hand to get it to work.

piyushk gravatar image piyushk  ( 2013-01-22 06:48:12 -0500 )edit

I was able to run a make on the gazebo_plug-in package without any errors after applying the patch... not sure what else I would need to modify by hand.

ncr7 gravatar image ncr7  ( 2013-01-22 07:17:41 -0500 )edit
2

answered 2012-10-16 14:48:02 -0500

jamuraa gravatar image

I tried to fix this problem by just fixing the plugin as you suggested (I've installed gazebo_plugins from rosmake in fuerte, so it was not hard to change the line as suggested), and I get an interesting result when looking at the /depth/image_raw images from a simulated turtlebot:

Simulated Depth Image

This is generated with this looking from the normal /camera/image_raw:

simulated normal image

I get a similar depth image from the rviz camera view. I'm hoping to simulate kinect for some testing soon, so I will look into this some more, but I thought this would be useful information for someone in debugging this?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

4 followers

Stats

Asked: 2012-10-11 12:01:07 -0500

Seen: 651 times

Last updated: Jan 04 '13