Skip main navigation

Define speed of robot in response to environment

Use this simulation to define the speed of a robot in response to its environment. This simulation is part of a free online course on robotics.
1.2
It’s time for the first exercise of Week 2, which is again to define the speed of the robot wheels, but this time in response to what it sees with its sensors.
14.7
So here’s the web page, the title, the explanation, we’ve got of keyboard controls, and here are the specific tasks. And you have to define the speed pair so the robot steers away from the wall it sees. So you have to specify what the left and the right motor should be, when it doesn’t see a wall, when it sees a wall on my left only, on the right only, Or when it sees a wall on both sides. And once you’ve type those in, you can press start, and you should see the robot moving around. Does it work? We can add a complex arena, like that. Does it still work? Can it cope with the spiky bits standing out.
59.4
And if I scroll down slightly, you’ll see there’s an option for a racetrack, as before. So if I choose the racetrack, you can see, does what you’ve commanded, get the robot to go from here round to here. It might work, it might not. What you’ve done is fine, perhaps, but you do need to think a little bit more carefully about what you do when you counter here or there, so that it turns in the direction. Might make it interesting.
90.8
So just to show it’s possible, I set up a speed– well, I’ve hidden them, so you can’t see them. If I now go racing, we can see the robot. It’s bouncing a bit off the walls, as it sees them. It’s getting in the right direction. Yeah, it’s got there so it is possible to get the robot to automatically steer from here to here.
108.6
Can you do that? And then, can you do a return race? You might need to think carefully again, so that it turns the right way.
118.4
And finally, you can click on the Line to Follow option. And now you define the speed on whether both sensors see a line, or the left sensor only sees the line, or the right sensor only, or neither sensor sees the line. Can you get the robot to steer around here– and in fact, do what? What you have done here? Does it still work? Have fun.

In the exercise in the next Step, you will have the chance to define the speed of the robot in response to its environment. Before you get started, watch this video to see how the robot navigates around a racetrack or between objects.

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