ros-perception / depthimage_to_laserscan

Converts a depth image to a laser scan for use with navigation and localization.
253 stars 170 forks source link

Could not convert depth image to laserscan: scan_height ( 1 pixels) is too large for the image height. #32

Open dehavenm opened 6 years ago

dehavenm commented 6 years ago

I've just tried running depthimage_to_laserscan from a launch file, and the terminal window is giving me the error: "Could not convert depth image to laserscan: scan_height ( 1 pixels) is too large for the image height.". I'm running ROS Kinetic, and I'm trying to use it on depth images collected through the Airsim simulator code. The depth image shows up properly when I load it in Rviz.

I've checked the node with "rosnode info depthimage_to_laserscan", and it appears to be publishing and subscribing normally (I know it does the "lazy subscriber" thing, but my attempt at viewing the scan in Rviz is supposed to satisfy that). I have the latest version of the depthimage_to_laserscan package installed. Does anyone have any idea what could be wrong here? Could there be a bug in the camera info being published? Here's what's I get from rostopic echo:

`--- header: seq: 923 stamp: secs: 1538271513 nsecs: 114595890 frame_id: "front_center_optical" height: 480 width: 640 distortion_model: "plumb_bob" D: [0.0, 0.0, 0.0, 0.0] K: [360.0, 0.0, 360.0, 0.0, 360.0, 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: [360.0, 0.0, 360.0, 0.0, 0.0, 360.0, 240.0, 0.0, 0.0, 0.0, 1.0, 0.0] binning_x: 0 binning_y: 0 roi: x_offset: 0 y_offset: 0 height: 480 width: 640 do_rectify: False

`

Thank you.

jadhm commented 5 years ago

have you solved this problem ?

dehavenm commented 5 years ago

No, I have not.

wraysx commented 5 years ago

i think maybe your P: [360.0, 0.0, 360.0, 0.0, 0.0, 360.0, 240.0, 0.0, 0.0, 0.0, 1.0, 0.0] parameters is not correct. try to change p[2] to something no more than 320(half of 640)