Skip to content

Commit

Permalink
Fix USB device for game mode, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tollsimy committed Nov 27, 2023
1 parent cbe7142 commit 73b69f9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
image: roboteamtwente/roboteam:development
options: -v ${{ github.workspace }}:/home/roboteamtwente/
run: |
sudo chown -R $(id -u):$(id -g) .
./build.sh
-
name: Build and push release from sources
Expand Down
11 changes: 8 additions & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ In order to access Basestation tty from inside Docker container we first need to
echo "SUBSYSTEM==\"tty\", ATTRS{idVendor}==\"0483\", ATTRS{idProduct}==\"5740\", ATTRS{serial}==\"*\", SYMLINK+=\"rtt-basestation\"" | sudo tee -a /etc/udev/rules.d/99-rtt-basestation.rules
```

Add yourself to the dialout group:
```
sudo usermod -a -G dialout $USER
```
Finally, reboot your pc to apply.

### Normal/development usage
1) Make your edits on RTT sources
2) Spin-up "builder" compose
Expand All @@ -64,7 +70,7 @@ or, if you want to build diff (compare current ai with a previous version):
```
COMMIT=<commit> docker compose --profile diff up
```
NOTE: if you dont't specify COMMIT=<commit> the default will be origin/main~1
NOTE: if you dont't specify COMMIT=<commit>, the default will be origin/main~1

2. Start services:
```
Expand All @@ -79,8 +85,7 @@ docker compose --profile <simulator / diff /game> down
Note: you may want to use `docker logs -t <container_name>` to see output of a container (service).
Example: `docker logs -t RTT_roboteam_primary_ai`

#### Diff
Explain how diff work
NOTE: If you notice USB errors when running "game" compose, do a `docker compose --profile game down`, detach and re-attach basestation and the start game again.

### Release usage
Pull release image:
Expand Down
5 changes: 3 additions & 2 deletions docker/runner/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ services:
container_name: RTT_roboteam_robothub_game
restart: always
working_dir: "/home/roboteamtwente/"
command: sh -c "./bin/roboteam_robothub"
command: sh -c "sudo bash -c \"export LD_LIBRARY_PATH=/home/roboteamtwente/lib/ && ./bin/roboteam_robothub\"" # "sudo" needed to access USB device
network_mode: "host" # Workaround to connect from interface on host to AI websocket, please fix
expose:
- 1-65535:1-65535 # For zeromq ports
Expand All @@ -132,8 +132,9 @@ services:
- LD_LIBRARY_PATH=/home/roboteamtwente/lib/
volumes:
- ../../build/release/:/home/roboteamtwente/
privileged: true
devices:
- /dev/rtt-basestation:/dev/ttyACM1 # Fix, not working
- /dev/rtt-basestation:/dev/ttyACM1
profiles: ["game"]

roboteam_interface:
Expand Down

0 comments on commit 73b69f9

Please sign in to comment.