Skip to content
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

Bugfix issue #174 #178

Merged
merged 2 commits into from
Aug 20, 2018
Merged

Conversation

sts-thm
Copy link
Contributor

@sts-thm sts-thm commented Aug 1, 2018

This pull request should be able to fix issue #174.

@JWhitleyWork
Copy link
Contributor

Has this code been tested on a sensor? If so, which one? And was it tested with strongest, last, and dual-return modes?

@sts-thm
Copy link
Contributor Author

sts-thm commented Aug 6, 2018

The code has been tested on a VLP-16 on strongest return mode.

@JWhitleyWork JWhitleyWork merged commit 797eead into ros-drivers:master Aug 20, 2018
raw_azimuth_diff = raw->blocks[block+1].rotation - raw->blocks[block].rotation;
azimuth_diff = (float)((36000 + raw_azimuth_diff)%36000);
// some packets contain an angle overflow where azimuth_diff < 0
if(raw_azimuth_diff < 0)//raw->blocks[block+1].rotation - raw->blocks[block].rotation < 0)
Copy link

@wenbin1989 wenbin1989 Oct 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could I ask what's the purpose of this part? I don't think there will be an angle overflow here.

@sts-thm @JWhitleyAStuff

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request fixed the issue linked above. Please refer to #174 (comment). If you do still have any questions feel free to ask away.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reply. I understand the change of driver.cc, which you mentioned in the issue. But I couldn’t understand the change of rawdata.cc. It will be nice if you can explain a little, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The packages of the velodyne in certain modes specify the azimuth only for every second group of points (16 or 32, depending on the velodyne). The azimuth update for the group of points in between is calculated as half of the difference between the previous group's azimuth and the next group's azimuth. However if the azimuth 0° is inside your package the difference will be the reflex angle (> 180°) and not its complement, which we would need.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case azimuth 0° is inside the packet, let's say the previous group's azimuth is 359°, the next group's azimuth is 1°.

azimuth_diff = (float)((36000 + raw->blocks[block+1].rotation - raw->blocks[block].rotation)%36000); is 2°, which I think is what we need?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants