Ask Your Question
0

Having issues with the ray tracer ROS package

asked 2017-04-28 00:12:44 -0500

Hi,

I'm using the following ROS package to do ray tracing on a occupancy grid map:

https://github.com/clearpathrobotics/...

but I'm having the following issue as you can see in the following image:

image description

which shows a weird pattern because the walls are flat, as you can see in the following image:

image description

I was expecting something like the Laser Scan in ROS:

image description

Any suggestion?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-04-28 01:16:53 -0500

Geoff gravatar image

updated 2017-05-02 20:25:03 -0500

If you look carefully, you will see that the raytraced points are forming line segments that are oriented perpendicular to rays from the origin. Each line segment is also centred on a cell in the grid map. I haven't used the package you mentioned, but this suggests to me that quantization due to the cell size on the grid map is causing the effect you are seeing.

I had a look at the code for the ray tracer. It is calculating the distance for each ray from the sensor's pose as the distance from the sensor pose to the centre of the nearest grid cell. I haven't had time to try it out myself because it's not just a node that I can plug data into, but I bet that if you changed your grid size to be really large, you would see a nice arc within each cell. This is why you get the pattern you are seeing. It is not tracing around the edge of each cell: that would be much more computationally expensive, involving intersecting rays and polygons.

If you need to have better data from the raytracer, you will need to resample your grid map with a smaller cell size. Other than that, you could reduce the number of points in your range scan to reduce the number of little lines, although you will miss data at longer distances, or you could filter the laser data to match lines (longer than a few cells).

edit flag offensive delete link more

Comments

Thanks! you are right! I'm getting better data from the raytracer with smaller cell size. Although I still don't get it why is this happening. I thought that the raytracer will work for any type of cell size. I mean, it works but with this weird pattern.

andrestoga gravatar image andrestoga  ( 2017-04-30 21:01:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-04-28 00:12:44 -0500

Seen: 247 times

Last updated: May 02 '17