StaudtEngineering / LidaRx

C# / .NET Reactive Extensions (Rx) for LIDAR scanners
GNU Lesser General Public License v3.0
8 stars 1 forks source link

Using sweep for collision detection in rover hobby project #5

Open johnkattenhorn opened 6 years ago

johnkattenhorn commented 6 years ago

I stumbled upon this library whilst looking for code to study for my windows-powered rover which I'm planning to enhance by fitting my Sweep.

I'm a huge fan of RX and also thought it was a great fit this type of library. I'm still researching and very new to processing scan data in a way to be useful for this type of application.

I'm going to study both the theory and this code to see how I could put together a collision detection routine and turn this into motor control instructions.

I figured that I could relate the direction of travel of the rover + distance of the centre of the sweep to the boundaries of the rover to the scan point data to be able to determine if there's anything in its way and simply stop as a first pass.

Any thoughts or views would be greatly appreciated.

As a stretch goal I could then consider post-processing the scan data to establish shapes / edges and try to move around the object in range.

pysco68 commented 6 years ago

Hello John,

For the collision detection things are relatively simple as this really boils down to check whether or not there's something immediately in front of your rover / enough room to move (that's pretty trivial maths in the Cartesian coordinates world - so no need for any fancy projection).

OTOH your stretch goal is a lot more tricky to implement and will probably be rather heavy on memory. I'd recommend not doing this in post processing but rather to have a kind of "world" map. If you implement some sort of voxel map in which you classify the points you may end up with points you can tell "static" (a wall, table chair, tree...) and moving things (the dog just went by...) and could start doing fancy autonomous driving things.

There are a bunch of papers on the topic, and I was planning to implement such a voxel map class for LidaRx - when I have some time. At the moment I can't tell when that will happen (unless I end up with a paid project requiring such a feature).

If you'd like to try and implement such a concept I'd happily try to scrape a few spare minutes and help you with design and or reviewing.

johnkattenhorn commented 6 years ago

Thanks for your thoughts, you've given me plenty to research and these concepts are completely new to me.

I'm really interested in the Voxel map capability for LidaRx, I'll do some research by this weekend and come back and let you know if I felt it was within my current understanding and capability, I'd be happy to contribute the work back to the LidaRx.

pysco68 commented 6 years ago

That sound awesome! Looking forward to hear your feedback!

johnkattenhorn commented 6 years ago

Hey Yannic,

Did you get my email to your personal email box ?

Thanks

John

pysco68 commented 6 years ago

Hi John, didn't get anything, wrote one to your address (the one on your profile page),

Have a nice evening ;)