Skip main navigation

New offer! Get 30% off your first 2 months of Unlimited Monthly. Start your subscription for just £29.99 £19.99. New subscribers only. T&Cs apply

Find out more

Set movement

Watch Professor Richard Mitchell introduce a simulation where you can try specifying the speed in order to move a robot yourself.
OK. It’s time to do the second exercise, where you’re going to build on what you learnt from the first one. So this is the web page, same sort of layout as before. And now, on the basis of what you’ve already learnt, you know what sort of speed you need to put for the motors to make the robot go forward and to turn left and so forth. Well, now we’re going to put that in. So for instance, you would define here what to go forward. So perhaps I would say minus 4 and 4. And then if I press Go Forward, the robot moves forward.
If I then say turn right, he doesn’t do anything because at the moment, we’ve said that to turn right, you put 0 and 0. So what you need to do in this task, as it explains, you define what speeds you should do for all these different categories. And then you can press go forward, turn left, turn right, and the robot will then do what it is. Investigate it in an arena like this, but if you option for the track like so, then– I shall scroll up slightly so that you can see the bottom. If I then say Go Racing, the robot will start from the beginning there, and then you have to try and steer it around like so.
I’m going to cheat because I’ve only shown how you go forward by clicking there. And then what we see is the robot gets there and it tells me it got there after 13.7 seconds, but it was a cheat. So your task is, as I say, to first define the five speeds to the robot moves, check it works. Press T for the track. Go racing. See how quickly you can steer the robot so that it gets to the middle. Try it a few times. Note what your fastest one is. If you select Return Race and then press Go Racing, it goes in the opposite direction, and then you have to steer it around. And then I’m going to cheat again.
So you won’t perhaps be able to do quite as quickly as that unless you cheat like me. Again, you can see how you can use the keyboard to define things as well. Have fun.

In this second simulation, you will find out how to specify the speed in order to determine the movement of the robot. Before you get started, take a look at this video to learn how to change the command in order to direct the robot.

Once you’ve watched the video you’ll be ready to move on to the the next step, where you’ll be able command your robot around a racetrack.

This article is from the free online

Begin Robotics

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now