Go Down

Topic: Collision avoidance using multiple ping sensors (Read 196 times) previous topic - next topic

Northof49

Jan 24, 2019, 06:45 pm Last Edit: Jan 24, 2019, 07:02 pm by Northof49
Just thought I would post a link to a old video I made of my rover that uses three front mounted ping / ultrasonic sensors to avoid obstacles.   One centred and straight ahead.  The other two at 45 degree angles.  It also has rear sensors to avoid backup collisions.

The innate ability to run parallel to walls seems to be an inadvertent feature of the code adjusting the distance from the 45 degree front sensor to a fixed distance from the wall.  It simply keeps adjusting the course until the distance reaches the set threshold.

I know a lot of people ask about code for using a single panning ultrasonic sensor, and in my opinion multiple sensors are superior so that you don't have a delay in finding the obstacles or planning a course that avoids them.

This is using the New ping library.  My latest version of the rover uses 6 ping sensors, same setup at the front, but also at the rear.

https://www.youtube.com/watch?v=G4sgtwRBsiQ

Northof49

#1
Jan 24, 2019, 07:10 pm Last Edit: Jan 24, 2019, 07:13 pm by Northof49
Here is the code.  It was too lengthy to post, as it has code that runs a gps, compass, and runs a web server that relays all the information to a wireless router onboard.

The point of my post is to show the merit of running multiple ping sensor to enable consistency in timing of location of obstacles to be avoided.  With a panning sensor, you can't run nearly as quickly, as you might be looking in the wrong direction when you encounter an obstacle.

Go Up