Skip main navigation

Define motor speeds so the robot tracks a moving object

Watch how you can define motor speeds so the robot tracks a moving object in a simulation developed by Professor Richard Mitchell.
It’s time for another exercise. This one is about a robot interacting with a moving object.
So here we see the web page. We’ve got our robot as usual, and that’s the object that moves. And the idea is you command the robot so that it moves, gets close enough to this object, which moves, but then if the object gets a bit too close, it backs away. And you need to do that because if you’re not careful, the object will eat your robot. So move down so we can see all the controls. You can specify what the speeds are of the left and the right motor when the object’s not seen, or when it’s just visible on the left, or when it’s much closer on the left, and similarly on the right.
And as ever, you can press the Reverse Left Motor option. If I put in, say, four and four, and press Start, the robot’s moving around. The object is moving. In this case we’re speed two. And we’re not doing exactly what we need to do, because you’ve got to work that out. But here we see, whoops, the object has eaten your robot. So you can put the robot in initial position. You can have wider beams as well. So investigate. See if you can get the speed so that your robot doesn’t get eaten. Try the effect of narrow beams and wide beams.
And then once you’re happy with that, change the speed of the object to 10, and then you’ll need to change the speed of your robot if it’s still to remain safe. Enjoy.

In this exercise you will need to track the robot so that it gets close to an object but not too close! In this video, Richard explains how the simulation works to show how a robot can interact with a moving object.

Once you’re ready please move on to the next Step.

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