ros-drivers / hokuyo_node

A ROS node to provide access to SCIP 2.0-compliant Hokuyo laser range finders (including 04LX).
GNU Lesser General Public License v2.1
26 stars 52 forks source link

noncompliant rep-117 behavior in hydro #5

Closed piyushk closed 11 years ago

piyushk commented 11 years ago

I am using a URG-04LX-UG01 with hokuyo_node v1.7.5 on Hydro beta (system deb).

My robot is facing an open corridor. This is an excerpt of the scan output

3.1530001163482666, 3.1530001163482666, 3.1610000133514404, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.176000118255615, 4.176000118255615, 4.166999816894531, 4.1539998054504395, 4.1539998054504395, 4.1539998054504395, 4.1539998054504395, 5.177000045776367, 5.184999942779541, 5.184999942779541, 5.177000045776367, 5.171000003814697, 5.171000003814697, 5.171000003814697, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.007000000216066837, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5299999713897705, 2.4749999046325684, 2.4130001068115234, 2.36899995803833, 2.322999954223633, 2.2699999809265137, 2.2179999351501465, 2.177999973297119, 2.122999906539917, 2.0799999237060547, 2.0510001182556152, 2.0269999504089355, 1.9839999675750732, 1.9459999799728394, 1.906999945640564, 1.8839999437332153, 1.86899995803833, 1.8300000429153442, 1.7940000295639038, 1.7630000114440918, 1.7410000562667847, 1.715999960899353, 1.680999994277954, 1.6599999

All of these used to be nans in hokuyo_node in groovy with use_rep_117 set to true (as expected). I am slighlty worried by the one 0.007 reading in the middle, but as far as I can tell, all these values should have been nans.

chadrockey commented 11 years ago

Looks like the latest version never made it into debs. I've released v1.7.6 today, thanks for catching this. https://github.com/ros/rosdistro/pull/1427

Although, I'm not sure the little Hokuyos report as many errors codes in practice as the larger ones. Can you get me a short bag of behaviors with both groovy and hydro using the same laser? I just looked with one of my little hokuyos, and I don't see NaNs, but I do see +infs.

Here is the relevant lines of code: https://github.com/ros-drivers/hokuyo_node/blob/hydro-devel/src/hokuyo.cpp#L535

chadrockey commented 11 years ago

I see the same (non-compliant behavior in both Groovy and Hydro). 0s and Infs. Can you confirm?

chadrockey commented 11 years ago

Oh! I found it. dmax is in in millimeters and is an int. I was comparing it against '20' which means that our short range lasers weren't going through the right logic since they had '5600' for dmax.

chadrockey commented 11 years ago

Looks like these rangers don't have an error function for 'inf'. I'll take a look and see under what conditions +Inf should be output.

piyushk commented 11 years ago

@chadrockey Nice catch! I just realized that I've got both URG-04LX-UG01 and URG-04LX sensors, and may have been seeing nans on the other one. I will run some tests tomorrow and report back.

piyushk commented 11 years ago

Here are a couple of links for reference: SCIP 2.0 Specification (See Page 12) https://github.com/gbiggs/hokuyoaist/issues/1

The output in the issue report plus the bug you found perfectly explains my excerpt above (include the 0.007, which was an error). I believe that some of the error codes mentioned as other are explained in the SCIP 1.1 Specification.

I've also got a pesky fridge in my wing that has been causing some problems for the Hokuyo. I'll see if I can get different returns from that.

piyushk commented 11 years ago

I tested open space, object too close and strong reflection and printed all errors/laser output to the screen. I am using ROS Hydro with the hydro-devel branch.

URG-04LX-UG01

I also received the following error occasionally:

URG-04LX

I also received the following errors occasionally:

piyushk commented 11 years ago

I've opened a pull request for Hydro: https://github.com/ros-drivers/hokuyo_node/pull/6

chadrockey commented 11 years ago

Merged. https://github.com/ros-drivers/hokuyo_node/pull/6

Will release now.