Skip to 0 minutes and 1 secondIt'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.
Skip to 0 minutes and 15 secondsSo 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.
Skip to 0 minutes and 59 secondsAnd 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.
Skip to 1 minute and 31 secondsSo 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.
Skip to 1 minute and 49 secondsCan 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.
Skip to 1 minute and 58 secondsAnd 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.
Define speed of robot in response to environment
In the exercise in the next Step, you will have the chance to define the speed of the robot in response to it’s environment. Before you get started, watch this video to see how the robot navigates around a racetrack or between objects.
© University of Reading