Openni Gazebo Plugin stepsize for depth images (bug?)
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.