slam_karto
slam_karto copied to clipboard
Robustness with respect to unclear meaning of angle_max in LaserScan message
This post might be relevant to you:
- https://answers.ros.org/question/286695
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);
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.
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.
Gotcha. Sorry for the late response.
You are welcome to open up a pull request with a test included that addresses this problem.