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.md
+20-10Lines changed: 20 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -376,16 +376,26 @@ Where `<platform>` is the robot platform you are deploying to (`PI` or `NANO`),
376
376
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.
377
377
378
378
1. To run Thunderloop locally on your computer
379
-
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.
380
-
2. Next, run the command `redis-server` in a terminal.
381
-
3. Set up the following required REDIS constants by running the following commands in the terminal:
382
-
-`redis-cli set /robot_id "{robot_id}"` where `{robot_id}` is the robot's ID (e.g. `1`, `2`, etc.)
383
-
-`redis-cli set /network_interface "{network_interface}"` where `{network_interface}` is one of the interfaces listed by `ip a`.
384
-
-`redis-cli set /channel_id "{channel_id}"` where `{channel_id}` is the channel id of the robot (e.g. `1`, `2`, etc.)
385
-
-`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.
386
-
-`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.
387
-
-`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.
388
-
4. Now, run Thunderloop with the following command:
379
+
1. Create a TOML configuration file in the opt/tbotspython directory with the following content (replace values as needed):
380
+
```toml
381
+
robot_id = "1"
382
+
channel_id = "0"
383
+
network_interface = "tbotswifi5"
384
+
kick_constant = "0"
385
+
kick_coeff = "0.0"
386
+
chip_pulse_width = "0"
387
+
battery_voltage = "0.0"
388
+
current_draw = "0.0"
389
+
cap_voltage = "0.0"
390
+
```
391
+
Where:
392
+
- `robot_id` is the robot's ID (e.g. `1`, `2`, etc.)
393
+
- `network_interface` is one of the interfaces listed by `ip a`.
394
+
- `channel_id` is the channel id of the robot (e.g. `1`, `2`, etc.)
395
+
- `kick_coeff` is a calibrated kicking parameter. When running locally, this parameter doesn't matter so `0` is fine.
396
+
- `kick_constant` is a calibrated kicking parameter. When running locally, this parameter doesn't matter so `0` is fine.
397
+
- `chip_pulse_width` is a calibrated kicking parameter. When running locally, this parameter doesn't matter so `0` is fine.
398
+
2. Now, run Thunderloop with the following command:
389
399
- `bazel run //software/embedded:thunderloop_main --//software/embedded:host_platform=LIMITED`
390
400
391
401
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).
Copy file name to clipboardExpand all lines: docs/robot-software-architecture.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
-[Tools](#tools)
10
10
-[Ansible](#ansible)
11
11
-[Systemd](#systemd)
12
-
-[Redis](#redis)
12
+
-[TOML Configuration](#toml-configuration)
13
13
-[Thunderloop](#thunderloop)
14
14
15
15
<!--TOC-->
@@ -37,9 +37,9 @@ More commands available [here](useful-robot-commands.md#off-robot-commands)
37
37
38
38
[Systemd](https://www.freedesktop.org/wiki/Software/systemd/) allows us to have services which start as soon as we boot the robot, will automatically restart and are individually controllable. All services have the file {service}.service, which controls the configuration of that service. Our core service brought up by systemd is thunderloop. The thunderloop.service file can be seen [here](https://github.com/UBC-Thunderbots/Software/blob/master/src/software/embedded/linux_configs/systemd/thunderloop.service).
39
39
40
-
## Redis
40
+
## TOML Configuration
41
41
42
-
[Redis](https://redis.io/docs/about/)is an in-memory key-value store. This allows us to share state between processes as well as modify values dynamically through the provided [cli](useful-robot-commands#redis). Values also persists between boots.
42
+
Robot configuration is stored in a TOML file in home directory. This file contains both static configuration values and dynamic runtime values.
0 commit comments