Make robot return to base


#1

I am curious if anyone has managed to program their robot to “return to base” and if so what sensors or logic you used. The idea is that I want to setup a charging point in the house, possibly with a charging mat that the robot will park over. But how could I get the robot to reliably go there, and then know it is in the right spot?

One thought is using a compass sensor and placing the mat in a far corner of the house. But how to prevent the robot from just going to the corner of the current room it is in?

Vacuum robots can apparently do this with ease, so it would be nice to do it with my makeblock robot.


#2

Which robot are you using?

The Roombas use an infrared sensor to look for a “beacon” associated with the charger. Be forewarned that this capability is usually limited to a single room, not an entire house.

Regards,

Chuck


#3

Assumption is that your house is simply connected (see here for definition: https://en.wikipedia.org/wiki/Maze_solving_algorithm#Wall_follower

Then I would solve it like this:

Get a 2nd ultrasonic distance sensor and mount it looking to the right side of the mBot.
Use the 1st ultrasonic sensor to avoid collisions
Use 2nd ultrasonic sensor to keep a distance (e.g. 20cm) to a wall on the right

This way, the mBot would navigate along all walls in your house.

Now tape a sheet of paper (A3) with 3 thick black lines along each border on the ground along a wall as base.
Check the line follower sensor for 3 signals in quick succession. If that happens, stop robot.


#4

Thanks Chuck and Andreas. I am using the starter robot.

I think I could manage to get to a corner (assuming no obstructions) using the compass and a single infra sensor. But a second one to allow following a wall might be easier as Andreas suggests below. A coloured mat in a corner that can be picked up by the light sensor in grayscale mode might then do the job. If only there was a true RGB colour sensor!!!

An idea I had to detect the room it was in, would be to pop-up an IR sensor, and in conjunction with the compass, take the width and length of the room. That would allow some logic to check the calculated m2 (width x length) against a table of values to work out the current room. Perhaps even a single measurement across the room after aligning to the compass will be sufficient, as the downstairs only has a few rooms. The problem with this approach though is that the robot will not be tall enough to look over couches and chairs. Adding an R2D2 styled pop-up sensor to get over say 1.2m would be a bit complex and unstable.


#5