Using the Simulator¶
Try controlling the racecar manually using your keyboard. Press
K to give driving control to the keyboard, you should see the following in your terminal:
Then, drive using the standard WASD keys:
Wdrives the car forward
Asteers to the left
Sdrives it backwards
Dsteers to the right.
spacebar to bring the car to a stop.
Be aware that if you crash, the keyboard will be turned off, and you’ll have to press
K again to turn it back on. Also, it can only handle one key press at a time, so holding down multiple keys at once does not work. Lastly, pressing
D will steer to a fixed angle, and the only way to straighten out is with
The controls are a bit tricky, but hopefully you won’t have to do too much manual driving!
If you are using a joystick, make sure the correct axis is set in params.yaml for steering and acceleration- this changes between different joysticks.
Instant Pose Setting¶
A useful function of the simulator is that you can instantly move the car without driving it to its new location. To do this, click the
2D Pose Estimate pose button at the top of the rViz window, and then click the desired location on the track to move the car there.