Having trouble with the depth image to laserscan converstion
I have my robot simulation which uses Intel Realsense plugin and I wanted to do the mapping using the depth camera. However, when I launch the depthimage_to_laserscan package, I get this error: Could not convert depth image to laserscan:
Cannot call rectifyPoint when distortion is unknown.
Even though, I have remapped the necessary topics:
<node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan">
<param name="scan_height" value="3"/>
<param name="output_frame_id" value="camera_depth_frame"/>
<remap from="image" to="/realsense/camera/depth/image_rect"/>
<remap from="camera_info" to="/realsense/camera/depth/camera_info"/>
</node>
I have checked the camera_info topic and it continuously publishes the disstortion_model message:
distortion_model: ''
D: []
K: [463.8890075683594, 0.0, 320.0, 0.0, 463.8890075683594, 240.0, 0.0, 0.0, 1.0]
R: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
P: [463.8890075683594, 0.0, 320.0, 0.0, 0.0, 463.8890075683594, 240.0, 0.0, 0.0, 0.0, 1.0, 0.0]
What am I doing wrong?
Your distortion matrix D is empty as the error message says (look here at CameraInfo). Is your realsense camera well calibrated?
@l4ncelot I did not calibrate the camera, I just used this open source plugin https://github.com/SyrianSpock/realse...
Do I need to calibrate it? If yes, can you point somewhere?
Sorry, I overlooked you're using Gazebo plugin. So you don't need to calibrate it.
@l4ncelot So I guess I have to populate D matrix with 0s? Can I do it manually?
You can. Editing this should be enough. But I have no idea, if it's gonna solve the initial problem... try it though.
@l4ncelot Yes, that sucks, I wouldn't even bother doing that. Btw, do you have an idea how to launch this wrapper https://github.com/intel-ros/realsense I guess I need to add the functionality to gazebo
@stevemartin: from the code I'm not sure what's happening here.
distortion_state
should be== NONE
, asD
is empty.And with
distortion_state == NONE
, the image should just be forwarded instead of being undistorted.