-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nav310 angle setting compability #159
Comments
Hi, did you use the most recent version of the sick_scan_xd-driver? I think you have a PI wrapping problem somewhere in the processing chain where, for example, 2PI is converted to -2PI. As a workaround you can e.g. build a small ROS node that receives the scan messages and limits them e.g. to the angle range from -150 degrees to +150 degrees and sends them as a new scan message. This then avoids the pi-wrapping problem. |
Thanks for your feedback! We checked the pointcloud and laserscan messages against our NAV-310 with firmware 1.50 using sick_scan_xd release 2.8.15 (https://github.com/SICKAG/sick_scan_xd/tree/master). rivz shows the correct orientation (example screenshot): ros command
ros commands
These values are the expected ones. It looks like your laserscan messages might be rotated for some reason. Please run the following steps:
We attach the logfile from our run for further information. nav-310.log |
I still got the same error from the launch file above:
And here is the message from the command rostopic
And:
And with the logfile nav2.log |
As written above, we think this is a numerical problem in the navigation software. The difference between start angle and stop angle in the scan message is a little larger than 2 *Pi due to numerical inaccuracies in the float representation: (((3.1415927410125732 - -3.1415927410125732) / (2*pi) = 1.00000002783 In principle, this is not a problem. However, this case is not provided for in the navigation software. The calculation (((3.1415927410125732 - -3.1415927410125732) - 4 *pi -6.28318513233 To change this behavior you can Even though we recommend b), you could start with c) for a pre-test by modifying angle_min and angle_max in the scan message header so that the difference is less than 2 * pi, e.g. angle_min := 0.9999 * angle_min The difference between angle_min and angle_max that results is then slightly smaller than 2 * pi. So the pi wrapping problem should not occur anymore. The minimum deviation lies in the size of the measurement noise and therefore, in my opinion, has no influence on further processing. With this method, the scan message would then be as follows (see modification for the three mentioned values).
Good luck! |
Can you guide me how to do c). For b) i'm trying to use package laser_filters, but its not working. Where do i need to change the angle_min, angle_max values? |
I would start around these lines:
by adding the following three lines for the patch:
|
Sorry, i couldn't find those line in Edit:
And similar line in
Do i need to edit both of those |
Thanks for your further investigation. We will give a more detailed feedback at latest until tomorrow. |
Thanks for being so patience an attentive to my problems! Can't wait for the feedback! |
Hello, we have now set up a own branch for follow up.
In the branch we have now made sure that Cf. the following output: Input:
Output:
According to ROS logic, the value "angle_min" describes the start value of the scan. Since the lidar rotates clockwise, this value must be in this case greater than "angle_max". A total of 1440 values are output during a scan. Proof:
|
Hey i tried the branch, and the laser scan output is as expected:
But it still give the same error, that is:
But, there is one thing that is working. the laser_filters, which the problem can be read in this link, has work!:
Is the laser_scan_matcher inverts the scan angle value? if we invert it the driver will the orientation of the lidar also be inverted if it works? |
Great that now the consistency of the data is correct. You can help yourself as follows: Solution I: Invert angle_min, angle_max and angle_increment so that the values look like this:
Interpret this modification as if a lidar rotating counterclockwise is mounted upside down. This means that you may then have to rotate the values from the laser scan 180 degrees around the X axis again later to bring them in line with the carrier system. If you want to avoid this, you can alternatively try the following: Solution II:
|
With these notes, I would close the discussion for now, since in our opinion the driver is now working correctly. It looks like the laser_scan_matcher has an issue with clockwise rotated laser scans with angle_max < angle_min and angle_increment < 0. According to the documentation, the laser_scan_matcher can use the cartesian pointcloud as well. We recommend to use the PointCloud2 messages to avoid angle issues resp. ambiguities due to 360 degree wrap around. The default PointCloud2 topic is "cloud" and can be configured in the launchfile or it can be overwritten by commandline parameter. |
Thanks for the help!! |
Hey!
I was trying to use NAV310 and ROS package laser_scan_matcher to do a localization as an odometry. Here is my launch file:
But, i encountered this error:
with min_ang and max_ang:
So, i was trying to find a workaround by editing the code on file sick_scan_common.cpp in line 491:
and line 2372:
But, so far, i wasn't able to find the solution for that error.
Hope anyone can help me. Thanks!
The text was updated successfully, but these errors were encountered: