Hello
I would like to use RANSAC for detection straight lines from my laser scans. So my platform has a IMU, encoders and Laser. I would like to find the minimum distance to some obstacle using the laser range sensor. So in order to know if the closest point is in some wall or some high object that can detect the laser i would like to extract the straight lines. If the point is on the longest straight line than means the closest point is on the wall if not that on some other object. So i find several methods but was told that RANSAC “RANdom SAmple Consensus” methods is the robust one.Is similar as the one used in PCL but I would like to implement for laser scans. ANY help?? Any ROS/C++ code implementation of RANSAC??
Thanks
Originally posted by Astronaut on ROS Answers with karma: 330 on 2013-07-09
Post score: 1
Original comments
Comment by lindzey on 2013-07-09:
Not directly answering your question, but RANSAC for finding lines in a 2D laser scan should be relatively simple to code. I think it's one of those algorithms that's worth implementing once just to understand it better, and this is just about its simplest use case =)
Comment by Astronaut on 2013-07-09:
yes I think so , just wonted to ask here... Do I need to work with point clouds with that transform? I mean do I need to convert a Laser Scan to a Point Cloud, means to get laser scan as a set of 3D Cartesian (x,y,z) points, converting it to a point cloud message??
Comment by lindzey on 2013-07-09:
I'd at least convert to cartesian coordinates, since I'd rather do that than work out the minimizations in polar ... however, for simplicity's sake, I might just do my own quick 2D conversion from R and theta and work in xy space, rather than xyz.
Comment by Astronaut on 2013-07-09:
So u mean to use the transformLaserScanToPointCloud to transform laser scan into a point cloud in another (preferably fixed) frame? Or projectLaser to do a straight projection from range-angle to 3D (x,y,z), without using tf?Or only 2D conversion from R and theta? Sorry for the questions
Comment by lindzey on 2013-07-09:
How I'd do it would depend on the system it was fitting into, and my goals for writing the code in the first place ... if you have a specific question about best-practices for using those tools, I'd recommend creating an entirely new question. Otherwise, just code, and see if you can make it work =)