Skip to content

5. Controlling the car

SamVanderstraeten edited this page Feb 4, 2021 · 16 revisions

Controlling the car

Once all hardware is configured and all software is installed, you should be able to control the car. If the steps on this page are not working, please double-check if you executed all previous steps properly. If problems keep occurring, please contact the organization for further support.

Emergency stop button

On the side of the RF controller, you'll see a small grey button. When you hold the RF controller properly, the button should be somewhere around your thumb. This button is the emergency stop button for your RC car.

When the button is pressed, the car will execute an emergency stop. All commands to the wheels of the car will be ignored immediately and this will bring the car to a halt instantaneously. This feature is particularly useful when testing an AI model, as it is very likely that the car will make some unpredictable moves. To cancel emergency stop, click the button again. The car will react to the wheel commands again now.

Note: It is possible that the car is in 'emergency stop mode' when it is booted, depending on your action in the previous run. If your car seems to ignore all driving commands from the RF controller or the software, try toggling the emergency stop by simply clicking the button again.

TODO add picture of emergency button

Switch driving mode

2 driving modes are available to control the car: manual mode and software (AI) mode. In manual mode you use the RF controller to steer the car. In software mode, the AI module in the car driver component will take over control of the wheels.

By default, the driving mode will be set to manual driving. To switch to software mode, you'll have to execute some commands.

First of all, make sure you are connected with your Raspberry Pi and that you have an open terminal in the cardrivers container. View the Accessing your Raspberry Pi page to see the necessary steps to do this.

If you want to switch on software/AI driving, perform the following command:

rostopic pub /master/ai/start_driving std_msgs/Bool True --once

Likewise, to stop the AI steering (software driving mode), execute the command below:

rostopic pub /master/ai/start_driving std_msgs/Bool False --once

Important!! Note that the emergency stop button will still be available when the AI is driving. Make sure to stay alert when your software is steering the car and to put it to a halt when things go wrong!

Example SW drive script

TODO

Useful links

TODO

  • opencv
  • donkeycar
  • ...

RTTF logo

Clone this wiki locally