If you have a rover on a far away planet you don't want to waste any bits sending commands. These scripts make sending routes more efficient (assuming going forward is used most).
- C 98.6%
- CSS 1.4%
| assets | ||
| demo.mkv | ||
| LICENSE | ||
| README.md | ||
| rover | ||
| rover.c | ||
| server | ||
| server.c | ||
| server.css | ||
EfficientRover
If you have a rover on a far away planet you don't want to waste any bits sending commands. These scripts make sending routes more efficient (assuming going forward is used most).
Workings
The server script accepts the connection from the rover. When it receives "ping" it sends a randomly generated string of 1, 01, 001 and 000. with 50% 1 for forward, 25% 01 for backwards and 12.5% 001 and 000 for left and right. the efficiency comes from the fact that the most used (forward) is only 1 character, and lesser used actions are more. 3blue1brown explains it very well (https://youtu.be/l6DKRf-fAAM?si=0wl0j-8jQxhWdPC4&t=208). That video is also where I got the idea for this project.
DEMO
Usage
- start the server
- start the rover
- press the ping button to move the rover
- press the reset button to re-center the rover
Setup
Requirements:
sudo apt install build-essential pkg-config libgtk-3-dev
Rompilation:
compile with gtk:
gcc `pkg-config --cflags gtk+-3.0` -o rover rover.c `pkg-config --libs gtk+-3.0` && gcc `pkg-config --cflags gtk+-3.0` server.c -o server `pkg-config --libs gtk+-3.0`
AI usage
NONE, no AI was used in this project