-
Notifications
You must be signed in to change notification settings - Fork 0
3.1. Starting remote control
This guide goes through how to remote control a robot from the controller's UI through the base station to the robot.
This was written for this commit.
Once the base station is flashed (see the README in the repository for details) you can start it up. It'll be waiting for an DHCP server to give it an ID through the ethernet port. You've got two options:
- Host an DHCP server on your local laptop (not that hard, but you'll have to set it up).
- Connect it to some kind of device that has an DHCP server and a switch (e.g. a typical router).
If you go with option (1) you'll only need to connect the base station to your laptop. If you go with option (2) you have to connect the base station to the router, then your own computer to the router. This way communication happens through the router.
To know what IP the base station the easiest way (to shortly explain) is to connect the base station with an USB cable to your computer (so that you can read USART output). Connect to it using screen (Linux) or Putty (Windows). Baud rate is 115200. You'll have to restart the base station, it only logs what IP it has when it gets it on startup.
This was written for this commit.
Once the robot's board is flashed with the correct firmware (see the repository README for details how to flash) you should only have to start it up. If there's any issues the easiest way to debug is to connect to the robot's USB board to get USART output, the procedure is the same as for the base station so see above.
This was written for this commit.
Clone down the repository and go to ./controller/internal/ui/, once there write go run ./keyboard_controller.go. Choose r for remote control, then enter the base station's IP (the port should be default). If you don't know the robots ID you'll have to get it from the USART output of the robot or the base station (which responds to a ping when the robot goes online). So check there.
The controls for remote controlling is:
Q - Rotate left
E - Rotate right
W - Go forward
A - Go left
S - Go back
D - Go right
R - Decrease movement speed for next movement command
T - Increase movement speed for next movement command
<space> - Stop all movements (stop pinging).
<esc> - Exit remote control.
There's an emergency break implemented in the robot that makes it stop all movement if it loses communication to the base station (i.e. no packets has been sent/received in a while). This is why the remote control program continually sends pings unless has been pressed.