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

Robustness with respect to unclear meaning of angle_max in LaserScan message #20

Open
moooeeeep opened this issue Mar 28, 2018 · 3 comments

Comments

@moooeeeep
Copy link

This post might be relevant to you:

In order to address this, you could change this line:

laser->SetMaximumAngle(scan->angle_max);

to this:

laser->SetMaximumAngle(scan->angle_min + (scan->ranges.size()-1)*scan->angle_increment);
@lucbettaieb
Copy link
Contributor

I don't understand why this is relevant? Please provide some more context? The two lines are equivalent but scan->angle_max is more straightforward to read.

@moooeeeep
Copy link
Author

moooeeeep commented Mar 30, 2018

In practice it's not equivalent. Currently the relation is more like this:

scan->angle_max >= scan->angle_min + (scan->ranges.size()-1)*scan->angle_increment

Therefore open_karto currently produces errors like this when it's used with laser scans published by nodes like pointcloud_to_laserscan that set scan->angle_max larger than the last available angle actually is.

@lucbettaieb
Copy link
Contributor

lucbettaieb commented Jun 14, 2018

Gotcha. Sorry for the late response.

You are welcome to open up a pull request with a test included that addresses this problem.

svwilliams added a commit to locusrobotics/slam_karto that referenced this issue Oct 26, 2022
svwilliams added a commit to locusrobotics/slam_karto that referenced this issue Nov 4, 2022
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

No branches or pull requests

2 participants