Skip main navigation
We use cookies to give you a better experience, if that’s ok you can close this message and carry on browsing. For more info read our cookies policy.
We use cookies to give you a better experience. Carry on browsing if you're happy with this, or read our cookies policy for more information.

Skip to 0 minutes and 1 secondOK. I will now show you my answers to the exercises this week.

Skip to 0 minutes and 9 secondsSo this is the robot for following walls, and I set things up. Basically if it doesn't see a wall, it goes forward. If it just sees one on the left, he turns towards it. So the left motor is less than the right motor. If it's closer, then you move to turn away slightly. So the left motor should be 4, the right motor, 3. And then the opposite on the right. When wall is close to both sensors, and you want to back off, but you also want to turn, so let's press start. And we can see the robot is quite happily moving along.

Skip to 0 minutes and 50 secondsIt's following the wall.

Skip to 0 minutes and 55 secondsAnd then we'll see when he gets to the end, it should reverse, and turn, which it does. It's turning, and so forth. Following the wall, if I move into this-- out into the open, that's fine. So it's working quite nicely. Now if I put the maze on, we've got a problem, as we shall see, because as the robot should turn quite happily, it's going fine. But because we're saying go forward when he doesn't see anything, it will just carry on forward. Whereas we wanted it to turn into the gap. So we need to do something about turning into gaps.

Skip to 1 minute and 36 secondsNow we're turning in this direction, or in this point here, so we need to, sort of, turn in the same way, when you don't see a wall. So what I need to do is to slow down the left motor, so that-- we'll have to wait for it to get there-- speed it up a bit.

Skip to 1 minute and 58 secondsNow we should see, as it comes along, it will turn into the gap, which it does, and round. And then it'll carry around here, and get back to there. So that's how I got my robot to navigate the maze quite so. I wonder if you were able to do it a bit faster.

Skip to 2 minutes and 22 secondsOK. Now let's move on to the Braitenberg-type robot. I've set it up for the first task, the passive seeker. So when the robot can't see anything, the LM and RM motors are-- our neurons are set to before, so the robot will move forward. Notice I have reversed the left motor connection. But when you see something on the left, you want to slow down, and turn towards it. So we got a minus three in there. And we shall see the robot coming along like that. Sees, turns. Gets closer, and then it slows down at the end, and it's got there.

Skip to 3 minutes and 3 secondsIf I put it back to the initial position and have wider beams, then as soon as it detects it, you'll find it turning, but going slower, which is what you want for the passive seeker.

Skip to 3 minutes and 20 secondsNow for the active seeker, I'm now using the neurons that go to the opposite side. So that when, for instance, you see something on the right, then that would increase the speed of the motor. So if we run that, we see it's going on quite happily at speed three. And it sees, and it turns, and it accelerates towards it, which is exactly what we wanted.

Skip to 3 minutes and 50 secondsAnd for the active phobe, I've swapped over the LL and LR and the RL and RR neuron values, so that when the robot starts to see it, it then turns the motor with the wheel, and it will move away from it. So let's watch that. Can't see anything. Moves closely, and as soon as it sees it, it turns away. OK. And now for the line following mode, I've got LM and RM going forward, and the LL and RR going backwards. So if I start this, find the robot going forward, sees the line, turns towards it, and now follows it. So quite easily, the Braitenberg vehicle will follow lines, as well as steering towards or away from lights.

Skip to 4 minutes and 43 secondsSo did you do it that way? Or did you do it slightly differently? OK?

What you should expect to see in the simulations

If, for whatever reason, you weren’t able to try the simulations for yourself this week or you’re curious to find out how others got on, take a look at this video to find out how Richard approaches these exercises.

If you’re interested to see how many robots with potentially different behaviours work together, have a look at the Multi Robot Demo web page Richard has created. This web page features five robots and four lights, and you can choose the behaviour of each robot as an object avoider or follower, or a Braitenberg vehicle.


We hope you’ve enjoyed the simulation exercises throughout this course. Did you find the simulations useful? Was there a particular one you enjoyed the most? Were there any you think could be improved? We would love to hear your feedback on the exercises, please post your thoughts in the comments section below.

Remember you can ‘like’ a comment if you agree with a fellow learners point of view.

Share this video:

This video is from the free online course:

Begin Robotics

University of Reading

Contact FutureLearn for Support