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

Bug with 360 degree scans #19

Open
max-kuzmin opened this issue Apr 16, 2018 · 3 comments
Open

Bug with 360 degree scans #19

max-kuzmin opened this issue Apr 16, 2018 · 3 comments

Comments

@max-kuzmin
Copy link

Some laser rangefinders cast rays on 360 degree and publish messages with angle_min=0 and angle_max=6.28. But algorithm only uses rays from 0 to 3.14. Other rays drop in function obvious::SensorPolar2D::backProject()

Possible fix without modifying Obvious sources is to check angle_min in functions ThreadLocalize::init and ThreadLocalize::eventLoop. And then rotate ranges vector

std::rotate(ranges.begin(), ranges.begin() + (int)round(M_PI / inc), ranges.end());
@philko4711
Copy link
Contributor

Hi,
could you please post your launch file here. The slam has been tested successfully with 360° scanners. It loads automatically all parameters from the ros message.

@max-kuzmin
Copy link
Author

max-kuzmin commented Apr 16, 2018

I think that this is mostly problem of Obviously. ThreadLocalize correctly creates obvious::SensorPolar2D object from scan messages. I use Turtlebot3 model inside simulator Gazebo. In my case laser rays have angles from 0 to 2*Pi. And at the step of integrating it into grid method obvious::SensorPolar2D::backProject() drops all rays that not between angle_min and Pi. Even in comments to obvious::SensorPolar2D said that _phiLowerBound should be less than 0. Taking into account the fact that the algorithm normalizes inverted scan messages (parameter ThreadLocalize::_reverseScan) it also will be better to normalize rays angles to interval [-Pi; Pi] as I wrote above.

@philko4711
Copy link
Contributor

Hi,
Im pretty sure, that the obviously lib remained unchanged regarding these classes. We have used an RPLidar and a high resolution 360° laser scanner. The 3D version of this lib has been tested with a velodyne 32 laser scanner. I promise to look into that. The SLAM and the obvision lib will be refactored in the near future.

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