Please change the branch to use one of our provided templates.
Setup up a WiFi with the following settings:
SSID: <animal>
(lowercase)
Password: Donkeycar2021
You can do this on your your phone, or similar.
The car will connect to this network and start the server immediately after being turned on.
Connect to the same WiFi LAN as your car and you will be able to control it
remotely. To test this, navigate to http://<animal>:8887/drive
,
here you will see a camera feed from the car and controls for steering/throttle.
Your program will use the same underlying interface to programmatically drive
the car.
You can find the camera feed at http://<animal>:8887/video
. Do with
it whatever you like. If you don't have any other preferences, we suggest you
try using OpenCV to fetch and analyze the feed.
To steer and throttle the car you send a simple message to it over WebSocket.
The address here is ws://<animal>:8887/wsDrive
.
The message you send is in JSON format and should look like this:
{
"angle": 0.0,
"throttle": 0.2,
"drive_mode": "user",
"recording": false
}
The angle
property goes from -1.0
, for full left, and 1.0
, for full right.
Likewise, the throttle
goes from -1.0
, for full reverse, and 1.0
, for full
forward.
Don't mind, or change, the other properties.