Skip main navigation

What you should expect to see in the simulations

Watch what happens when Professor Richard Mitchell tries the two simulations from Week two of the free online course, Begin Robotics.
So let’s see how I got on, trying to do the exercises in the second week.
So this is the web page, and I’ve set the speeds up. So the When No Wall Is Seen. The robot will go forward. I’ve ticked the reverse-left motor option. When a wall is detected on the left, the left motor goes forward, the right motor stops, so the robot will turn away from it. And then opposite and so forth. So if I press start, we see the robot’s doing fine. That is, until it hits the wall. When you can see the wall, it goes back. Then it can’t see the wall so it goes forward, which is particularly dumb. So what you actually need to do is that when you do see a wall on both sides, go back but turn.
So if I turn that minus 4 to minus 2, you see it’s now turned away quite happily. And it goes along, and when it detects the wall here, it turns. And it turns. It also works with a complex environment like so. Mind you it does get stuck in the corner. Again it’s sort of turning one way then the other way. I have to give it a little nudge. But then it’s OK. So it is working all right. I’m going to scroll up so I can see the track controls, and I’m going to put track on. And then I’m going to go racing. And does it now work? It sees– oh, it turns, yes.
It’s turning the right way, so it’s going around the track. And it’s going to turn again. Yeah. Who’s a good ERIC. Hey, presto. That’s worked quite nicely. OK. What about doing a return race? Is it going to work? So let’s go racing. And no, it’s turning the wrong way. That’s because, it’s turning right going this way, but it’s got to turn left that way. So I need to change the speeds for when it sees an object on both sides. Now when I go racing again from the start, you’ll see it’s going there around and yes. It turns the right way. So with very simple commands, the robot can navigate a race.
Though it does need to know which way it’s going.
Now put it into line follow mode, same speed, press start. It goes back, finds a line, and its happily moving around on the line, same speeds. I bet if I were to start it in the middle there it’s going around in a circle and not finding it. So perhaps we want it to move around in a bigger circle. So let’s try something like minus 8 and minus 7. And now it’s found the line.
So the same sort of commands for avoiding walls, also works for following lines.
And here’s the second exercise. Can we steer to the lights? Well again I’ve setup the speeds so that when no light is seen the robot goes forward. When the light is just signal left, it turns towards it. So the left motor goes a bit slower. The right motor stays at the same speed and it will turn. When it gets closer, it gets a bit slower still. So if I press start, you’ll see that it works. Yep. Sees it, turns. Sees it, turns. And now it gets slower, and it finds it. It works quite nicely. Stop it. Put it back to initial position with the wider beams. You’ll find it works just as well.
Go straight towards it rather than turning towards it. So that’s fine. If I want the robot to steer towards the light then veer away, then I want to change things when the light is much closer. So if instead of turning towards it we turn away– put the robot back in the initial position and press start, we will see it comes along, sees the robot, turns towards it, happy. And then when it gets very close it zooms away. OK. So it does work.

If, for whatever reason, you aren’t able to try out these exercises for yourself, Richard has recorded this brief video to show you what to expect. He demonstrates what happens when he manoeuvres the mobile robot around a race track and in an arena to avoid various obstacles.

This article is from the free online

Begin Robotics

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education