Page 1 of 1

Robot Navigation - Mapping or Map Reading

Posted: Tue Apr 10, 2018 3:15 pm
by JonnyAlpha
Whilst prepping for PiWars 2018 I have started to look at OpenCV for robot vision. I am currently working on the Maze challenge and am looking at a couple of approaches.

One option is to navigate the maze by locating the boundaries of the maze (the walls) and driving along a centre line in between the walls. This would involve using Hough Line Transform or Canny Edge Detection.

The other that I would like help with involves mapping the maze either by building up a mental map of the maze when obstacles are detected. Or navigating the maze using a pre-loaded 2D image of the maze with symbols to confirm location.

Or better still a combination of maze mapping and OpenCV vision.

Obviously navigating in this manner and moving in a direction for a specified amount of time (based on knowing how far the robot will travel each m/s) is fraught with issues such as wheel spin etc but having the added advantage of using OpenCV for line / shape detection for identifying symbols and obstacles will help to build a relative picture of the robots world.

What I would like help with initially is a steer regarding how to get the robot to read a pee-loaded image and or make a map based on what it sees?

Thanks in advance.

Re: Robot Navigation - Mapping or Map Reading

Posted: Tue Apr 10, 2018 8:40 pm
by OutoftheBOTS
If you are designing the maze then an easy way to make this challenge is to make the maze by with a black line down the center of the pathways of the maze, strictly speaking then you don't even need the walls as your following the black line in the center not the walls. This will also make it easy for beginner to attempt this challenge as line following and detecting a side branch in the line is much easier to code.

You won't be able to move the robot a reliable distance without have a encoder on the wheels to measure wheel rotation. It might be a better approach to maybe drive till you find the side branch rather than drive a certain distance. You could possibility have some error checking like the side branch should be in this distaince with + or - 15% for error and if you have gone more than 15% past the expected distance without finding side road then your code can realize it may have missed it's turn

Re: Robot Navigation - Mapping or Map Reading

Posted: Wed Apr 11, 2018 9:57 am
by JonnyAlpha
Thanks for the reply but line following is not an option (I can already do that with OpenCV). I am trying to find a more complex method of vision. I know that sound silly but eventually I want a robot that can map an unknown area.

Re: Robot Navigation - Mapping or Map Reading

Posted: Wed Apr 11, 2018 10:09 am
by B.Goode
It sounds as though you are teetering on the brink of the knowledge domain referred to as Machine Learning?

A great topic to investigate. But I doubt you are going to get working results in the next 10 days...
What I would like help with initially is a steer regarding how to get the robot to read a pee-loaded image and or make a map based on what it sees
Do the PiWars organiser reveal the maze in advance? Or do you plan to sneek in and grab a picture for yourself?

IF (and it's a big if) there is enough visual contrast between the upper edge of the dividers and the floor of the maze you might be able to do some image processing with something like GIMP?

Re: Robot Navigation - Mapping or Map Reading

Posted: Wed Apr 11, 2018 4:42 pm
by recantha2
Hi.
I'm one of the Pi Wars organisers. We do indeed reveal the design of the maze in advance. There's several ways of completing it:
1/ Ultrasonics on multiple sides of the robot to detect the walls.
2/ Pre-encoding the robot with a route with distances and angles.
3/ Add up to 6 'targets' such as QR codes for your robot to lock onto.
4/ Use the colours of the maze walls to know where you are.

All the details and renders can be found here:
https://piwars.org/2018-competition/cha ... imal-maze/

However, maybe for next year, we may not show you the design of the maze, should the maze be a challenge we choose... :-)

Re: Robot Navigation - Mapping or Map Reading

Posted: Wed Apr 11, 2018 7:35 pm
by JonnyAlpha
Mike,

It's Bill Harvey, we have been conversing by email and on Discord. Nice to see you lurking here as well. I use the user name JonnyAlpha for several forums, a hang up from my childhood love of 2000AD. 😂

Yes I think I will really get into OpenCV and Machine Learning after PiWars.