IddoB
Posts: 56
Joined: Wed Aug 23, 2017 4:39 pm

Autonomous Indoor Car

Thu Aug 24, 2017 9:44 am

Hi there,

As part of my school project I am looking to make an autonomous car that could drive in my house from all the different rooms. I will define a route (Ex. from room 1 to room 3) and the car will drive there.

My question is what technology would you recommend me to work with to achieve my goal. Ive looked into using GPS + Ultrasonic sensor, but Im not sure how accurate that will be. Another idea that I had was placing colored lines on the floor and the robot will know which colors it needs to follow in order to reach its destination. (Using color sensors)

Im open for any suggestions.

Thank you!

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: Autonomous Indoor Car

Thu Aug 24, 2017 10:46 am

always there is lots of different way to achieve the result you want.

Colored lines on the floor would be the easiest in my mind where different colors go to different locations and follow them by using a colour sensor and line following program :)

IddoB
Posts: 56
Joined: Wed Aug 23, 2017 4:39 pm

Re: Autonomous Indoor Car

Thu Aug 24, 2017 10:52 am

OutoftheBOTS wrote:
Thu Aug 24, 2017 10:46 am
always there is lots of different way to achieve the result you want.

Colored lines on the floor would be the easiest in my mind where different colors go to different locations and follow them by using a colour sensor and line following program :)
Thank you for your input! If I dont get other ideas I think Ill go with this one

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Autonomous Indoor Car

Thu Aug 24, 2017 11:17 am

Coloured lines I a good option if you make suitable lines.

You could use a Pi camera to detect the lines although a simple colour sensor and a line following program will be easier.

Another option could be to put barcodes, QR codes or similar on stickers on walls or doors and read them with the camera. IIRC zbar is a library for reading codes. I haven't used it myself but t looks like zbar_symbol_get_loc_x() should give to location of a barcode in the image. The data read from the code could tell you where you are and the position of the code in the image could provide very accurate position information.

Round coloured stickers on walls could do the same job.

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Autonomous Indoor Car

Thu Aug 24, 2017 11:24 am

You might find that an HC SR04 or Sharp GP2Y0A distance sensor combined with dead reckoning wheel encoders (or stepper motors) might be good enough.

You can correct for errors n wheel distance by approaching a wall and checking the distance. At any point where you can see two orthogonal walls you can fix your x,y position just by turning 90 ° and measuring the distance to each wall.

You don't need any markers, just a map. The robot could create it's own map by driving around finding and following walls. Some basic trigonometry will get you from heading and distance to points along the wall boundary. Still auto-mapping is a complex topic. Much harder than following a line.

Dead reckoning and ranging to correct errors is still quite complex for a school project.

I think line following is your best option.
Last edited by PiGraham on Thu Aug 24, 2017 1:52 pm, edited 1 time in total.

IddoB
Posts: 56
Joined: Wed Aug 23, 2017 4:39 pm

Re: Autonomous Indoor Car

Thu Aug 24, 2017 11:29 am

PiGraham wrote:
Thu Aug 24, 2017 11:24 am
You might find that an HC SR04 or Sharp GP2Y0A distance sensor combined with dead reckoning wheel encoders (or stepper motors) might be good enough.

You can correct for errors n wheel distance by approaching a wall and checking the distance. At any point where you can see two orthogonal walls you can fix your x,y position just by turning 90 ° and measuring the distance to each wall.

You don't need any markers, just a map. The robot could create it's own map by driving around finding and following walls.
This idea seems very interesting. Could you please elaborate further so I can understand exactly what you meant.

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Autonomous Indoor Car

Thu Aug 24, 2017 11:49 am

IddoB wrote:
Thu Aug 24, 2017 11:29 am
PiGraham wrote:
Thu Aug 24, 2017 11:24 am
You might find that an HC SR04 or Sharp GP2Y0A distance sensor combined with dead reckoning wheel encoders (or stepper motors) might be good enough.

You can correct for errors n wheel distance by approaching a wall and checking the distance. At any point where you can see two orthogonal walls you can fix your x,y position just by turning 90 ° and measuring the distance to each wall.

You don't need any markers, just a map. The robot could create it's own map by driving around finding and following walls.
This idea seems very interesting. Could you please elaborate further so I can understand exactly what you meant.
Look up dead reckoning navigation. If you know your start point and distance and direction of any move you can calculate where have moved to.
Small errors can accumulate with each move so measuring position from known walls can be useful.
You may find something useful here http://www.doc.ic.ac.uk/~nd/surprise_97 ... /vol4/jmd/

its not a trivial task. You will have to do your research.

IddoB
Posts: 56
Joined: Wed Aug 23, 2017 4:39 pm

Re: Autonomous Indoor Car

Thu Aug 24, 2017 11:59 am

PiGraham wrote:
Thu Aug 24, 2017 11:49 am
IddoB wrote:
Thu Aug 24, 2017 11:29 am
PiGraham wrote:
Thu Aug 24, 2017 11:24 am
You might find that an HC SR04 or Sharp GP2Y0A distance sensor combined with dead reckoning wheel encoders (or stepper motors) might be good enough.

You can correct for errors n wheel distance by approaching a wall and checking the distance. At any point where you can see two orthogonal walls you can fix your x,y position just by turning 90 ° and measuring the distance to each wall.

You don't need any markers, just a map. The robot could create it's own map by driving around finding and following walls.
This idea seems very interesting. Could you please elaborate further so I can understand exactly what you meant.
Look up dead reckoning navigation. If you know your start point and distance and direction of any move you can calculate where have moved to.
Small errors can accumulate with each move so measuring position from known walls can be useful.
You may find something useful here http://www.doc.ic.ac.uk/~nd/surprise_97 ... /vol4/jmd/

its not a trivial task. You will have to do your research.
Thank you, Ive added it to my list as another option. Still looking to hear more ideas :)

User avatar
OutoftheBOTS
Posts: 711
Joined: Tue Aug 01, 2017 10:06 am

Re: Autonomous Indoor Car

Thu Aug 24, 2017 12:10 pm

I do think the colored lines on the floor will be the easiest but the idea of bar codes or qr codes on the walls and read with camera would be way cool. There is something like this that is commonly used by robotics already it is called color signatures. Basically it is strips of different color combinations to mean something different. Both the Pixy cam and the new OpenMV can can recognize them see after 4mins https://www.youtube.com/watch?v=J8sl3nMlYxM and https://www.youtube.com/watch?v=NhN7Fl57sHE or some other cpool stuff with openMV https://www.youtube.com/watch?v=Pm88BEz3upM

scotty101
Posts: 3958
Joined: Fri Jun 08, 2012 6:03 pm

Re: Autonomous Indoor Car

Thu Aug 24, 2017 12:20 pm

I've seen people using IR beacons to navigate inside building. Each beacon emits a unique code (a series of blinks like morse code) and the robot's map knows where that beacon is in the building. The robot has a movable 'eye' (IR detector) on it that can determine where a number of beacons are in relation to each other and use trigonometry to work out where the robot is in the building.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

IddoB
Posts: 56
Joined: Wed Aug 23, 2017 4:39 pm

Re: Autonomous Indoor Car

Thu Aug 24, 2017 12:26 pm

OutoftheBOTS wrote:
Thu Aug 24, 2017 12:10 pm
I do think the colored lines on the floor will be the easiest but the idea of bar codes or qr codes on the walls and read with camera would be way cool. There is something like this that is commonly used by robotics already it is called color signatures. Basically it is strips of different color combinations to mean something different. Both the Pixy cam and the new OpenMV can can recognize them see after 4mins https://www.youtube.com/watch?v=J8sl3nMlYxM and https://www.youtube.com/watch?v=NhN7Fl57sHE or some other cpool stuff with openMV https://www.youtube.com/watch?v=Pm88BEz3upM
Very cool. Ill have a look

IddoB
Posts: 56
Joined: Wed Aug 23, 2017 4:39 pm

Re: Autonomous Indoor Car

Thu Aug 24, 2017 12:27 pm

scotty101 wrote:
Thu Aug 24, 2017 12:20 pm
I've seen people using IR beacons to navigate inside building. Each beacon emits a unique code (a series of blinks like morse code) and the robot's map knows where that beacon is in the building. The robot has a movable 'eye' (IR detector) on it that can determine where a number of beacons are in relation to each other and use trigonometry to work out where the robot is in the building.
Interesting. Do I need to do the algorithm that uses trigonometry to figure out the location? Because thats not an easy job

scotty101
Posts: 3958
Joined: Fri Jun 08, 2012 6:03 pm

Re: Autonomous Indoor Car

Thu Aug 24, 2017 12:29 pm

The mathematics are quite simple but yes you'd probably need to write it yourself unless you can find something similar on the net. I can't remember where I saw it being done, think it was a universities' robotics project where they had a 'cluster' of robots working together.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

mattmiller
Posts: 2245
Joined: Thu Feb 05, 2015 11:25 pm

Re: Autonomous Indoor Car

Thu Aug 24, 2017 12:44 pm

Another option could be to put barcodes, QR codes or similar on stickers on walls or doors and read them with the camera.
Instead of using QR/barcodes (as they are hard to read at long range) I recommend using ArUco markers

OpenCV libraries support them

This is not a trivial project though

IddoB
Posts: 56
Joined: Wed Aug 23, 2017 4:39 pm

Re: Autonomous Indoor Car

Thu Aug 24, 2017 1:46 pm

mattmiller wrote:
Thu Aug 24, 2017 12:44 pm
Another option could be to put barcodes, QR codes or similar on stickers on walls or doors and read them with the camera.
Instead of using QR/barcodes (as they are hard to read at long range) I recommend using ArUco markers

OpenCV libraries support them

This is not a trivial project though
Ill read about it. Thank you

IddoB
Posts: 56
Joined: Wed Aug 23, 2017 4:39 pm

Re: Autonomous Indoor Car

Thu Aug 24, 2017 6:58 pm

Anymore ideas? Id love to hear ;)

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Autonomous Indoor Car

Fri Aug 25, 2017 8:27 pm

IddoB wrote:
Thu Aug 24, 2017 6:58 pm
Anymore ideas? Id love to hear ;)
What about your own ideas and research?

IddoB
Posts: 56
Joined: Wed Aug 23, 2017 4:39 pm

Re: Autonomous Indoor Car

Sat Aug 26, 2017 8:07 am

PiGraham wrote:
Fri Aug 25, 2017 8:27 pm
IddoB wrote:
Thu Aug 24, 2017 6:58 pm
Anymore ideas? Id love to hear ;)
What about your own ideas and research?
believe me Ive done plenty of research and currently I have one good solution. Ill make the all the roads in the house black, in each cross section ill have a NFC tag, that way I know which cross the car has reached and which direction it needs to go.

mattmiller
Posts: 2245
Joined: Thu Feb 05, 2015 11:25 pm

Re: Autonomous Indoor Car

Sat Aug 26, 2017 8:32 am

Ill make the all the roads in the house black, in each cross section ill have a NFC tag, that way I know which cross the car has reached
That's an interesting idea :)

IddoB
Posts: 56
Joined: Wed Aug 23, 2017 4:39 pm

Re: Autonomous Indoor Car

Sat Aug 26, 2017 9:02 am

mattmiller wrote:
Sat Aug 26, 2017 8:32 am
Ill make the all the roads in the house black, in each cross section ill have a NFC tag, that way I know which cross the car has reached
That's an interesting idea :)
Thank you :)

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Autonomous Indoor Car

Sat Aug 26, 2017 9:43 am

IddoB wrote:
Sat Aug 26, 2017 8:07 am
PiGraham wrote:
Fri Aug 25, 2017 8:27 pm
IddoB wrote:
Thu Aug 24, 2017 6:58 pm
Anymore ideas? Id love to hear ;)
What about your own ideas and research?
believe me Ive done plenty of research and currently I have one good solution. Ill make the all the roads in the house black, in each cross section ill have a NFC tag, that way I know which cross the car has reached and which direction it needs to go.
That is a good solution. following a black line is fairly easy and should be accurate enough to locate an NFC reader over a tag on the floor. NFC tags are cheap (e.g. £3 for 10 on eBay) and you can program them with whatever data you like within the size limits. You could have one on each approach to a junction or more if you wanted. One in the middle is probably sufficient.

I think you don't actually need the tags to ID the junctions if you have a map of the network. The routes between junctions don't change.

IddoB
Posts: 56
Joined: Wed Aug 23, 2017 4:39 pm

Re: Autonomous Indoor Car

Sat Aug 26, 2017 12:47 pm

PiGraham wrote:
Sat Aug 26, 2017 9:43 am
IddoB wrote:
Sat Aug 26, 2017 8:07 am
PiGraham wrote:
Fri Aug 25, 2017 8:27 pm


What about your own ideas and research?
believe me Ive done plenty of research and currently I have one good solution. Ill make the all the roads in the house black, in each cross section ill have a NFC tag, that way I know which cross the car has reached and which direction it needs to go.
That is a good solution. following a black line is fairly easy and should be accurate enough to locate an NFC reader over a tag on the floor. NFC tags are cheap (e.g. £3 for 10 on eBay) and you can program them with whatever data you like within the size limits. You could have one on each approach to a junction or more if you wanted. One in the middle is probably sufficient.

I think you don't actually need the tags to ID the junctions if you have a map of the network. The routes between junctions don't change.
I do have a map of the network, but how will the car know it reached a junction and know which one it is?

PiGraham
Posts: 3971
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Autonomous Indoor Car

Sat Aug 26, 2017 2:30 pm

IddoB wrote:
Sat Aug 26, 2017 12:47 pm

I do have a map of the network, but how will the car know it reached a junction and know which one it is?
If it starts at a known pointon the map and travels by the routes connecting junctions it only has to detect that it is at a junction. The map will reveal which junction it is.

Image

If you start at node A and head East you arrive at node D.

You can detect junctions with the line following sensor since the edge of the line merges with the crossing line.
You can determine what your heading is from initial heading and degrees turned or a compass sensor. The line following sensor will reveal when you are aligned with the edge of the line.

Tzarls
Authorised Reseller
Authorised Reseller
Posts: 249
Joined: Tue Feb 26, 2013 6:59 am

Re: Autonomous Indoor Car

Sat Aug 26, 2017 2:46 pm

But then the system would rely on the car starting at an exact known position and heading a known direction. With the NFC tags you can havr the car start anywhere and even if the car doesn't know where it is at the beginning once it finds the first tag it can find on whuch road it is. Second tag (at the interdection) will allow the car to know its direction.
I like the NFC idea.

User avatar
bensimmo
Posts: 4654
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Autonomous Indoor Car

Sat Aug 26, 2017 2:53 pm

Given you are reading the black, you could out colours stripes to indicate where it is in the black. An alternative to NFC.
Pass three red stripes, 1 blue, 4 blue etc.


Lego Mindstorms EV3 could mock that up quickly to see how it works (if you have access to one). Great things for this.

Return to “Automation, sensing and robotics”