Ask Your Question
0

depthimage_to_laserscan - image convertion error

asked 2014-08-20 01:54:56 -0500

MarkyMark2012 gravatar image

updated 2014-08-24 22:50:30 -0500

Hi,

Getting, what I can only assume is a simple problem to fix but I've yet to find it, with depthimage_to_laser scan using an XTion sensor.

I'm starting up the xtion driver and depthimage_to_laser scan thus:

rosrun openni2_camera openni2_camera_node /openni2_camera/deh/image_raw:=/image /openni2_camera/depth/camera_info:=/camera_info

rosrun depthimage_to_laserscan depthimage_to_laserscan

But get this error:

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

The camera_info topic is reporting (rostopic echo /camera_info):

header: seq: 811175 stamp: secs: 1408516955 nsecs: 604143184 frame_id: /openni2_depth_frame height: 480 width: 640 distortion_model: plumb_bob D: [0.0, 0.0, 0.0, 0.0, 0.0] K: [570.3422241210938, 0.0, 314.5, 0.0, 570.3422241210938, 235.5, 0.0, 0.0, 1.0] R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] P: [570.3422241210938, 0.0, 314.5, 0.0, 0.0, 570.3422241210938, 235.5, 0.0, 0.0, 0.0, 1.0, 0.0] binning_x: 0 binning_y: 0 roi: x_offset: 0 y_offset: 0 height: 0 width: 0 do_rectify: False

Which to me looks like the frame sizing should be fine. I can view the depth image in rviz with out issue

Does anyone have a suggestion re: what I can check?

UPDATE:

So I've updated the depthimage_to_laserscan code to give me a better idea of what is going on around this error

the if statement:

if(scan_height_/2 > cam_model_.cy() || scan_height_/2 > depth_msg->height - cam_model_.cy())
{
  ...
}

because after listing the componnet data i get:

[ERROR] [1408936282.644193807]: Could not convert depth image to laserscan: scan_height ( 1 pixels) is too large for the image height.
cam_model_.cy 235.5
depth_msg->height 120  
depth_msg->height - cam_model_.cy() -115.5

Obviously 0.5 > -115.5

If I take that check put it'll run for a while producing some data then crash with a seg fault.

Any idea on that logic?

Many Thanks

Mark

edit retag flag offensive close merge delete

Comments

did you sudo apt-get install ros-yourdistro-dephtimage-to-laserscan? I've just install my XtionPro and it work fine

Moda gravatar image Moda  ( 2014-08-20 04:12:15 -0500 )edit

I'm using hydro, and launch the openni2.launch,

Moda gravatar image Moda  ( 2014-08-20 04:13:05 -0500 )edit

No this is built from scratch - running on raspberry-pi

MarkyMark2012 gravatar image MarkyMark2012  ( 2014-08-20 04:27:23 -0500 )edit

Have you changed anything from the original code of the package? Or any parameter?

anamcarvalho gravatar image anamcarvalho  ( 2014-08-24 23:41:44 -0500 )edit

@anamcarvalho - nope changed nothing. What depth image size vs camera model size do you get? (This is with and XTion)

Thanks

Mark

MarkyMark2012 gravatar image MarkyMark2012  ( 2014-08-27 16:32:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-09-02 03:45:19 -0500

MarkyMark2012 gravatar image
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

1 follower

Stats

Asked: 2014-08-20 01:54:56 -0500

Seen: 1,093 times

Last updated: Sep 02 '14