Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Working Indoor Navigation?

Many members of this forum have discussed and built many styles of indoor navigation. Some designs were fairly simple with minimal accuracy. Some were developed with great sophistication and complexity and of course the resulting ability was very good.

Some controls were based on camera feedback using glyphs, colors or objects as way points, ultrasonic distance measurements, compass directions, encoder values, LIDAR feedback etc. etc. as stand alone sensors, or in combinations. Also beacons, and other point of location devices are used for references as robot is here.

I am curious what has worked for you and what has not. I am not looking for the details of the script you built (unless you want to share it), but rather a direction to go to build something that will work reasonably well. Information on your successes and failures would be appreciated. I have built a few scripts, but never got what I really wanted. I would also like to keep the cost down, so I rather not use LIDAR and specialty sensors.

I have an Adventure Bot which has a camera on a servo, 3 ultrasonic sensors mounted front and sides, a compass which is not currently mounted, but available, and the ability to get pulsed signals from the 5 spoke wheels mounted on the continuous servos (poor man encoder ( approx. 1.67 inches or 42.7 mm per step)).

Open for discussion.

I look forward to feedback on this subject.

Ron

AI Support Bot
Related Content
Synthiam
#1  
Andy, I am working on (Close to finish) a wavefront navigation plugin. How it works is:

You Define an Array called $MyMap, Assign your goal location in the array a value of 1, assign your robot position in the array a value of 254, all walls and obstacles are assigned 255, open space is assigned 0. Call the wavefront plugin.

The plugin returns an array $MyRoute, showing the best route. "G" indicating the Goal, "R" indicating the Robot and "_" indicating the route.
My plan is to the use Sonar to check ahead and if an obstacle is detected, add it to the map update the robot position and resubmit the map to the plugin and move on.
I am still working on the encoders, and how to get my initial robot position.

If You are interested I will post my code and publish the plugin.
#2  
Hello rz90208,

Thanks for the reply. Yes, if you would like to post your project it would be great. I am hoping to generate ideas and have members share their efforts to develop a decent way to bring robots to the next level.

A basic indoor navigation system is on everyone's to do list and sharing ideas should help in developing a system that works well.

Ron
#3  
I am hoping jstarne1 and Richard R give input on their past navigation projects. They have built systems and hopefully can contribute what worked and what didn't.
#4  
Andy, Keep in mind this is a work in progress:
I have not entered the robot movement code, but the robot should move approx. 1 foot per call.
I also need to add the code to turn the robot to the proper direction.
This will be done using his onboard compass.
I will try and post the plugin shortly.

***NOTE***
If you are using the variable watcher, close it before using this code!

Code:


DefineArray($MyMap,6400)
FillArray($MyMap,0)
#Load House Map from file
$MyRobotPosition = 6145
$MyGoalPosition = 44

# the number 1 indicates the Goal position
$MyMap[$MyGoalPosition] = 1
# the number 254 indicates the Robot position
$MyMap[$MyRobotPosition] = 254
# 255 on map indicates a Wall
# 0 on map indicates open space

#Now call the Wavefront Plugin
ControlCommand("Wavefront", StartWavefront Start)
# The plugin creates an array $MyRouteMap
# - on the map is the path
# This is if you used an array of 80x80
# East +1, West -1, South +80, North -80
#
$TheGoal = "G"
$TheRobot = "R"
$TheRoute = "-"
$MyArraySize = GetArraySize("$MyRoute")
$MyRoute[$MyGoalPosition] = $TheGoal
$MyRoute[$MyRobotPosition] = $TheRobot
$CurrentPosition = $TheRobot
$LastMove = "NoMove"
print($MyRobotPosition)

repeatwhile($MyRoute[$MyRobotPosition] != "G")
if($LastMove != "East" and $MyRobotPosition -1 > 0)
if($MyRoute[$MyRobotPosition-1] ="-" or $MyRoute[$MyRobotPosition-1] = "G")
Goto(MoveWest)
endif
endif
if($LastMove != "West" and $MyRobotPosition + 1 < $MyArraySize)
if ($MyRoute[$MyRobotPosition+1] = "-" or $MyRoute[$MyRobotPosition+1] = "G")
Goto(MoveEast)
endif
endif

if($LastMove != "South" and $MyRobotPosition -80 > 0)
if($MyRoute[$MyRobotPosition-80] = "-" or $MyRoute[$MyRobotPosition-80] = "G")
Goto(MoveNorth)
endif
endif
if($LastMove != "North" and $MyRobotPosition + 80 < $MyArraySize)
if($MyRoute[$MyRobotPosition+80] = "-" or $MyRoute[$MyRobotPosition+80] = "G")
Goto(MoveSouth)
endif
endif
:Main
print($MyRobotPosition)
endrepeatwhile
Halt()


:MoveWest
$MyRobotPosition = $MyRobotPosition - 1
$CurrentPosition = $MyRoute[$MyRobotPosition]
Goto(Main)

:MoveEast
$MyRobotPosition = $MyRobotPosition + 1
$CurrentPosition = $MyRoute[$MyRobotPosition]
Goto(Main)

:MoveNorth
$MyRobotPosition = $MyRobotPosition - 80
$CurrentPosition = $MyRoute[$MyRobotPosition]
Goto(Main)

:MoveSouth
$MyRobotPosition = $MyRobotPosition + 80
$CurrentPosition = $MyRoute[$MyRobotPosition]
Goto(Main)
#5  
Andy, The plugin has been published.
Try it out and let me know what you think ANY feed back is appreciated.

enjoy

RichardZ
Netherlands
#7  
@ANDY ROID
For my navigation project I'm using 5 ultrasonic sensors, 1 compass (10 DOF sensor
module), GPS and tied those to an Arduino Mega which is commanded via UART by
the EZ-B.

So far the project has been rather successful as it works and I'm continuously
improving and expanding it with extra features. However it's made to be used
outside, because of the GPS. However the obstacle avoidance and compass
navigation work everywhere.

I tried to log as much of my findings and decisions as I could in this thread.
I should update it soon with the latest improvements, however I hope it helps.
#8  
Hello budeI0,

Thanks for adding your project information. The goal of this thread is to gather ideas from working and developing projects and share them to develop a robust system. This also allows a list of components which are known to work well, which helps eliminate false starts due to poor or inadequate components.

Ron
#9  
I will be straight forward , navigation is the holy grail project for robotics. In a DIY world you need to focus your time on an achievable goal. Each environment can use a specific navigation method. Try to keep it simple. You only need two or three pieces of information to navigate a robot.

1. Relative position in a room or operating area

2. Orientation , aka North , South, East, West

3. Approximation to the nearest object or obstacles

If you simplify you needs down to these you can get some basic navigation, adding vision can smooth these out but vision is generally difficult to navigate by itself and needs these other pieces of information anyways.

Examples

Robot in the yard- in my yard I will have more than one robot that needs to come exist. So I need these robots not to collide , not leave the yard and also be able to drive back to the house and charge. I immediately thought of using RFID tags on top of spikes like a golf tee and stick them in the ground. A antenna then reads these as the robot passes over then and also reads a compass which tells it the directional orientation. Inside a home you could stick these tags under the carpet by slicing a tiny slit in the backing, sliding a RFID tag in and then stitching the backing back together.
#10  
Thanks for your input Josh. I knew you had made a number of navigation systems. Presenting the basics and your examples helps when considering the hardware and a way to attack navigation indoors or outdoors.

Ron
#11  
@Richard & @CochranRobotics

Can you share any updates on using RoboRealm?

Frank
#12  
Hey Josh,

How did you plan to read the RFID tags? I assumed you use them as way points for correction, and then as a way for directional heading changes? What is the distance from tag to receiver that will read?

I am working on a compass, encoder and 3 ultrasonic sensor idea. What I want to have is a "way marker" to either sense to travel to a current listed (way point) location or as a correction value to the track. This way if I had to deviate from the tracking due to an obstruction I could search out the next RFID and then correct the track and continue. I was going to try a camera color tracking to see if it would work.

Any info and sources would be helpful.

Ron
#13  
I saw a 433mhz transmitter/receiver for arduino on Amazon. Can something like this be used as a beacon?
PRO
USA
#14  

Quote:


I saw a 433mhz transmitter/receiver for arduino on Amazon. Can something like this be used as a beacon?

No

If you want beacons, you can use BLE Bluetooth Low Energy boards like this one:

https://www.sparkfun.com/products/13729

the design is very good, you can program the board using another board available as a kit:

https://www.sparkfun.com/products/14071

The program (firmware) is the same, the difference is the beacon Id hardcoded.
you will need a wired power source (fixed beacon) or a battery, box etc.

you will need 3 or more per room, and via trilateration you can calculate the position.

The BLE receiver (on the robot) gets a list of beacons, and the signal strength (rssi).

If you do a manual calibration, you can convert the RSSI to a distance, knowing 3 or more points (beacons) and the room configuration you can obtain the position.

Possible BLE receivers:

https://www.sparkfun.com/products/13632
https://www.adafruit.com/products/2829

You can do all the calculations on the desktop and use i2c to interact with the BLE receiver, or create a firmware to send the results via serial to the EZB.

Is not a 100% working solution, there are a few issues like interferences, room configuration.

Last year i did a POC using BLE beacons to control and managed restricted areas: e.g. under the stairs, elevators, high traffic areas.

We had some issues, but it worked, the maintenance crew, had a few beacons, and they used to flag working areas or dangerous places for the roaming robots.

Some references:

http://stackoverflow.com/questions/20332856/triangulate-example-for-ibeacons

http://stackoverflow.com/questions/20416218/understanding-ibeacon-distancing
#15  
Hello @ptp,

Thanks for the info. I will look it over and also thanks for including the references. My computer/programming/ scripting skills are VERY minimal, so examples and references are of great help.

My goal is a decent, reasonably non-complex, indoor navigation system using a minimal number of non- EZ Robot components.
Ron
#16  
@rz90208
I really like your approach.

I'll start testing it and give you feedback as soon as I get my plugin loading issue resolved. I just submitted a post on that

Regards,
Frank
#17  
Hello @rz90208,
Thanks to DJ, I was able to get my plugin loading issue resolved

When I add your plugin and code, its runs without errors, with of course the limits you mentioned of no movement or map updates... I plan on working in that area

I notice the initial array returned by the plugin seems to consist of numbers like 45 44 43 rather then the expected - or 0 or 255.

Was your plan to initially manually drive the robot through the room and have a sensor push the wall/obstacles 255 values into the array?

Does the plugin have a means to store the recorded for the playback run?

How do you intend the define when desired "-" route values were entered?

Thanks,
Frank
#18  
Hello Frank,
Have not had time to do much work on this for a while. but the plan is to draw the initial map using Microsoft Excel, then with a VB Script convert the Excel spreadsheet to a single dimension array. Then save this to a file I can load later.
This way when the robot is initialized the first thing he says is basically what anyone would say if they awake in an unknown environment. "Where am I?" I then tell the robot. "You are at home" or "You are in the garage" He then loads the appropriate map. This next step is where I am struggling. The robot needs to know where in the map he is located. One way is to always initialize the robot in the same place every time, another is to use vision. Put QR Codes around the house and use them to triangulate his position. How ever you do it. Once the robot knows where it is located on the map, it is marked in the map array. Then when you tell the robot to go to the living room, then destination location is entered into the map and the plugin is called. The plugin processes the map using a wavefront routine then returns an array $MyRoute. From the robots current location follow the dash marks "-" to the destination. EZ-AI was to be a big piece of this but with that project not being in production any more, I have to rethink a few things.

RZ90208
RichardZ