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: README.md
+43-3Lines changed: 43 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,50 @@ The main functionalities include:
6
6
- velocity commands for the robot,
7
7
- velocity and PWM commands for individual wheels,
8
8
- battery voltage feedback,
9
-
- wheel states (position, velocity, PWM duty) feedback,
9
+
- wheel states (position, velocity, torque, PWM duty) feedback,
10
10
- odometry feedback (calculated from wheel encoders),
11
11
- feedback from the IMU sensor.
12
12
13
-
It uses [rosserial] client library to expose its functionalities on ROS topics, services and parameters.
13
+
The project is written for [PlatformIO] and uses the [STM32Cube] embedded software libraries. The low-level code is generated by the [STM32CubeMX] tool.
The firmware also uses [rosserial] client library to expose its functionalities on ROS topics, services and parameters. For the documentation of the ROS API, visit [leo_fw] on the ROS wiki.
16
+
17
+
## Prerequisites
18
+
To build the project, all you'll need is [Visual Studio Code] with the [PlatformIO IDE] extension.
19
+
20
+
To change the [STM32CubeMX] configuration, you will also need the [stm32pio] tool in order to properly regenerate the code.
21
+
22
+
## Building
23
+
Open the project in [PlatformIO IDE], then run the `PlatformIO: Build` task.
24
+
25
+
## Flashing
26
+
### Using ST-Link programmer
27
+
Connect the ST-Link to the pins on the [LeoCore] debug pin header, then run the `PlatformIO: Upload` task.
28
+
29
+
You can also run the GDB debugger by running the `PIO Debug` launch configuration (or just clicking `F5`).
30
+
31
+
### Using RPi on Leo Rover
32
+
Upload the `.pio/build/genericSTM32F401RC/firmware.bin` to Leo Rover, then, on the robot, run:
33
+
```
34
+
rosrun leo_fw flash firmware.bin
35
+
```
36
+
37
+
## Modifying STM32CubeMX configuration\
38
+
Open the `leocore.ioc` project in [STM32CubeMX], make the changes and save the project.
39
+
40
+
**Don't** click `GENERATE CODE`. Instead, type:
41
+
```
42
+
stm32pio generate
43
+
```
44
+
The current configuration assumes that [STM32CubeMX] is installed under `/opt/STM32CubeMX`. You can change the path in the `stm32pio.ini` file.
0 commit comments