mdrwiega / depth_nav_tools

A set of tools for mobile robot navigation with the depth sensor
http://wiki.ros.org/depth_nav_tools
Other
59 stars 39 forks source link

Does it work with Kinect v2? #1

Closed pallavbakshi closed 3 years ago

pallavbakshi commented 7 years ago

Hi,

Does it work with Kinectv2? It is not mentioned in your documentation.

mdrwiega commented 7 years ago

Hi, Yes, it should work with Kinect V2 and other depth sensors too.

Best regards, Michał Drwięga

lianghu3124 commented 7 years ago

hi! Thanks for your code, it's very useful! after I used it, I found the tilt angle seems opposite to the Package Summary:"Depth sensor tilt angle (in degrees). If the sensor is leaning towards the ground the tilt angle should be positive. Otherwise, the value of angle should be negative" I mounted kinect like this, 17272140972 and i thought it would work with those parameters:

output_frame_id: base_link # Frame id for the output laserscan.

output_frame_id: camera_depth_frame # Frame id for the output laserscan. range_min: 0.4 # Minimum sensor range (m). range_max: 5.0 # Maximum sensor range (m). scan_height: 480 # Height of used part of depth img (px). depth_img_row_step: 1.2 # Row step in depth image processing (px). cam_model_update: false # If continously camera data update. sensor_mount_height: 1.75 # Height of sensor optical center mount (m). sensor_tilt_angle: -70.5 # Sensor tilt angle compensation. ground_remove_en: false # Remove ground from scan. ground_margin: 0.05 # Ground margin (m). tilt_compensation_en: true # Sensor tilt angle compensation.

However, I failed. In the situation described in the picture, I intent to use kinect to recognize the three boxes in front of the robot. I tried dozens of parameter to get the kinect laser data,none of them gives the right data. Thanks for your time and help.

Best regards, lianghu

mdrwiega commented 7 years ago

Hi,

thanks for the contact. In current implementation it's true that the tilt angle should be positive when sensor is leaning towards the ground. But it may be confusing.

In your case the tilt angle should be 70 degrees (not -70) but the problem is that I haven't tested it with tilt angles higher than half of vertical fov (field of view) which in Kinect is about 49 deg. So, currently, I can't guarantee that it'll works properly with the tilt angle higher than 24.5 deg. Especially, I suggest to not exceed the full fov angle of Kinect sensor. I'll try to test it with higher tilt angles and I'll make necessary corrections in near future, when I found some time.

I noticed too that your value of depth_img_row_step is equal to 1.2 but it should be integer value (I propose to change it to 1 or 2). Have you tried to turn on/off parameters like: tilt_compenstaion_en ang ground_remove_en?

Have you tried to set lower value of san_height, lower than 460? It's related to imperfections of depth sensor (center of image is biased).

And the last question, which version of laserscan_kinect package you tried? I suggest to use the newest what mean ROS Kinetic version (there are some improvements).

Best regards, Michał Drwięga