You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started-wsl.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ If you are not using Windows 11 or the latest version of Windows 10 and would pr
42
42
3. Now, let's install Ubuntu.
43
43
- Download the WSL2 kernel from [here](https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel).
44
44
- Open a PowerShell window and run command `wsl --set-default-version 2` to use WSL2 by default.
45
-
- Install Ubuntu 20.04 LTS, Ubuntu 22.04 LTS or Ubuntu 24.04 LTS from the Microsoft Store.
45
+
- Install Ubuntu 22.04 LTS or Ubuntu 24.04 LTS from the Microsoft Store.
46
46
- Open the Ubuntu app in the Start menu. It will open a command prompt and ask you to create a new UNIX username and password for your WSL2 Ubuntu installation.
Copy file name to clipboardExpand all lines: docs/getting-started.md
+43-18
Original file line number
Diff line number
Diff line change
@@ -66,13 +66,13 @@ These instructions assume you have a basic understanding of Linux and the comman
66
66
67
67
We currently only support Linux, specifically Ubuntu.
68
68
69
-
If you have a X86_64 machine, we support Ubuntu 20.04 LTS, Ubuntu 22.04 LTS and Ubuntu 24.04 LTS.
69
+
If you have a X86_64 machine, we support Ubuntu 22.04 LTS and Ubuntu 24.04 LTS.
70
70
71
71
If you have a ARM64 (also known as AARCH64) machine, we support Ubuntu 24.04 LTS.
72
72
73
73
You are welcome to use a different version or distribution of Linux, but may need to make some tweaks in order for things to work.
74
74
75
-
You can use Ubuntu 20.04 LTS, Ubuntu 22.04 LTS or Ubuntu 24.04 LTS inside Windows through Windows Subsystem for Linux, by following [this guide](./getting-started-wsl.md). **Running and developing Thunderbots on Windows is experimental and not officially supported.**
75
+
You can use Ubuntu 22.04 LTS or Ubuntu 24.04 LTS inside Windows through Windows Subsystem for Linux, by following [this guide](./getting-started-wsl.md). **Running and developing Thunderbots on Windows is experimental and not officially supported.**
76
76
77
77
### Getting the Code
78
78
@@ -231,13 +231,11 @@ Now that you're setup, if you can run it on the command line, you can run it in
231
231
232
232
- If we want to run it with real robots:
233
233
- Open your terminal, `cd` into `Software/src` and run `ifconfig`.
234
-
- Pick the network interface you would like to use:
235
-
1. If you are running things locally, you can pick any interface that is not `lo`
236
-
2. If you would like to communicate with robots on the network, make sure to select the interface that is connected to the same network as the robots.
234
+
- Pick the network interface you would like to use. If you would like to communicate with robots on the network, make sure to select the interface that is connected to the same network as the robots.
237
235
- For example, on a sample machine, the output may look like this:
238
236
239
237
```
240
-
enp0s5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
238
+
wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
241
239
...
242
240
[omitted]
243
241
...
@@ -248,22 +246,30 @@ Now that you're setup, if you can run it on the command line, you can run it in
248
246
...
249
247
```
250
248
251
-
- An appropriate interface we could choose is `enp0s5`
249
+
- An appropriate interface we could choose is `wlp3s0`
250
+
- Hint: If you are using a wired connection, the interface will likely start with `e-`. If you are using a WiFi connection, the interface will likely start with `w-`.
252
251
- If we are running the AI as "blue": `./tbots.py run thunderscope_main --interface=[interface_here] --run_blue`
253
252
- If we are running the AI as "yellow": `./tbots.py run thunderscope_main --interface=[interface_here] --run_yellow`
254
253
-`[interface_here]` corresponds to the `ifconfig` interfaces seen in the previous step
255
-
- For instance, a call to run the AI as blue on wifi could be: `./tbots.py run thunderscope_main --interface=enp0s5 --run_blue`
254
+
- For instance, a call to run the AI as blue on WiFi could be: `./tbots.py run thunderscope_main --interface=wlp3s0 --run_blue`. This will start Thunderscope and set up communication with robots over the wifi interface. It will also listen for referee and vision messages on the same interface.
255
+
-**Note: You do not need to include the `--interface=[interface_here]` argument!** You can run Thunderscope without it and use the dynamic configuration widget to set the interfaces for communication to send and receive robot, vision and referee messages.
256
+
- If you choose to include `--interface=[interface_here]` argument, Thunderscope will listen for and send robot messages on this port as well as receive vision and referee messages.
257
+
- Using the dynamic configuration widget is recommended at Robocup. To reduce latencies, it is recommended to connect the robot router to the AI computer via ethernet and use a separate ethernet connection to receive vision and referee messages. In this configuration, Thunderscope will need to bind to two different interfaces, each likely starting with a "e-".
258
+
- If you have specified `--run_blue` or `--run_yellow`, navigate to the "Parameters" widget. In "ai_config" > "ai_control_config" > "network_config", you can set the appropriate interface using the dropdowns for robot, vision and referee message communication.
256
259
- This command will set up robot communication and the Unix full system binary context manager. The Unix full system context manager hooks up our AI, Backend and SensorFusion
257
260
2. Run AI along with Robot Diagnostics:
258
261
- The Mechanical and Electrical sub-teams use Robot Diagnostics to test specific parts of the Robot.
259
262
- If we want to run with one AI and Diagnostics
260
-
-`./tbots.py run thunderscope_main [--run_blue | --run_yellow] --run_diagnostics` will start Thunderscope
263
+
-`./tbots.py run thunderscope_main [--run_blue | --run_yellow] --run_diagnostics --interface=[interface_here]` will start Thunderscope
261
264
- `[--run_blue | --run_yellow]` indicate which FullSystem to run
262
265
- `--run_diagnostics` indicates if diagnostics should be loaded as well
263
266
- Initially, the robots are all connected to the AI and only receive input from it
264
267
- To change the input source for the robot, use the drop-down menu of that robot to change it between None, AI, and Manual
265
268
- None means the robots are receiving no commands
266
269
- More info about Manual control below
270
+
-`--interface=[interface_here]` corresponds to the `ifconfig` interfaces seen in the previous step
271
+
- For instance, a call to run the AI as blue on WiFi could be: `./tbots.py run thunderscope_main --interface=wlp3s0 --run_blue --run_diagnostics`
272
+
- The `--interface` flag is optional. If you do not include it, you can set the interface in the dynamic configuration widget. See above for how to set the interface in the dynamic configuration widget.
267
273
3. Run only Diagnostics
268
274
- To run just Diagnostics
269
275
-`./tbots.py run thunderscope --run_diagnostics --interface <network_interface>`
@@ -363,6 +369,34 @@ To update binaries on a working robot, you can run:
363
369
364
370
Where `<platform>` is the robot platform you are deploying to (`PI` or `NANO`), and `<robot_ip>` is the IP address of the robot you are deploying to. The `robot_password` is the password used to login to the `robot` user on the robot.
365
371
372
+
## Testing Robot Software locally
373
+
374
+
It is possible to run Thunderloop without having a fully-working robot. Using this mode is useful when testing features that don't require the power board or motors.
375
+
376
+
1. To run Thunderloop locally on your computer
377
+
1. First, you must ensure that `redis` is installed. Installation instructions can be found [here](https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/). The result of these installation directions will likely enable `redis-server` as a service that starts on boot. You may want to run `sudo systemctl disable redis-server` to prevent this.
378
+
2. Next, run the command `redis-server` in a terminal.
379
+
3. Set up the following required REDIS constants by running the following commands in the terminal:
380
+
-`redis-cli set /robot_id "{robot_id}"` where `{robot_id}` is the robot's ID (e.g. `1`, `2`, etc.)
381
+
-`redis-cli set /network_interface "{network_interface}"` where `{network_interface}` is one of the interfaces listed by `ip a`.
382
+
-`redis-cli set /channel_id "{channel_id}"` where `{channel_id}` is the channel id of the robot (e.g. `1`, `2`, etc.)
383
+
-`redis-cli set /kick_coeff "{kick_coeff}"` where `{kick_coeff}` is a calibrated kicking parameter. When running locally, this parameter doesn't matter so `0` is fine.
384
+
-`redis-cli set /kick_constant "{kick_constant}"` where `{kick_constant}` is a calibrated kicking parameter. When running locally, this parameter doesn't matter so `0` is fine.
385
+
-`redis-cli set /chip_pulse_width "{chip_pulse_width}"` where `{chip_pulse_width}` is a calibrated kicking parameter. When running locally, this parameter doesn't matter so `0` is fine.
386
+
4. Now, run Thunderloop with the following command:
387
+
-`bazel run //software/embedded:thunderloop_main --//software/embedded:host_platform=LIMITED`
388
+
389
+
2. If you have a robot PC that doesn't have proper communication with the power or motor board, you can still run Thunderloop in a limited capacity to test software features (eg. networking).
2. Find the `<robot_ip>` of the robot you want to run Thunderloop on. This guide may help you find the IP address of the robot: [Useful Robot Commands](useful-robot-commands.md#Wifi-Disclaimer).
4. SSH into the robot using the following command:
396
+
-`ssh robot@<robot_ip>`
397
+
5. Run the Thunderloop binary on the robot:
398
+
-`sudo ./thunderloop_main`
399
+
366
400
## Setting up Virtual Robocup 2021
367
401
368
402
### Setting up the SSL Simulation Environment
@@ -371,15 +405,6 @@ Where `<platform>` is the robot platform you are deploying to (`PI` or `NANO`),
371
405
2. Clone it.
372
406
3. Follow these [instructions](https://github.com/RoboCup-SSL/ssl-simulation-setup/blob/master/Readme.md) to set up and run the repository.
373
407
374
-
### Pushing a Dockerfile to dockerhub
375
-
376
-
After editing the dockerfile, build the image and push it to dockerhub with the following steps
377
-
378
-
1. To build the image, make sure that you are in the same directory as your image, and then run `docker build -t ubcthunderbots/<image name>[:tag] .` Make sure that your chosen image name matches a repository in dockerhub. Here's an example with the Robocup 2021 setup image: `docker build -t ubcthunderbots/tbots-software-env:0.0.1`
379
-
2. Now, push your image to dockerhub. Get the credentials for the Thunderbots dockerhub account from a software lead.
380
-
1. Log into the docker account with `docker login`. You will be prompted for a username and password
381
-
2. Now, push this image by its name: `docker push ubcthunderbots/<image name>[:tag]`
Copy file name to clipboardExpand all lines: docs/useful-robot-commands.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -80,9 +80,13 @@ flowchart TD
80
80
81
81
## Wifi Disclaimer
82
82
83
-
To use most of these commands you will either need to be on the tbots wifi network (no internet access) or on a wifi with internet access (shawopen, ubc wifi) and connected to the Jetson Nano through ethernet tethering.
83
+
To use most of these commands you will either need to be on the tbots wifi network (no internet access) or on a WiFi with internet access (`ubcvisitor`) and connected to the robot through ethernet tethering. Note that ethernet tethering doesn't work on `ubcsecure` or `eduroam`.
84
84
85
-
The IP address of the robots on the tbots network is `192.168.0.20<robot_id>` so for robot id `1` the IP is `192.168.0.201`. If you are using ethernet tethering you will need to use a network utility (tshark, wireshark, arp) to determine the IP address.
85
+
On the tbots network:
86
+
- Jetson Nano robots will have an IP address of `192.168.0.20<robot_id>` so for robot id `1` the IP is `192.168.0.201`.
87
+
- Raspberry Pi robots will have an IP address of `192.168.6.20<robot_id>` so for robot id `1` the IP is `192.168.6.201`. Occasionally, these robots may have an IP address of `192.168.5.20<robot_id>`.
88
+
89
+
If you are not using the tbots network you will need to use a network utility (`tshark`, `wireshark`, `arp`) to determine the IP address.
0 commit comments