Skip to content

Commit f2d2a89

Browse files
committed
update README
1 parent 18c281d commit f2d2a89

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

README.md

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,50 @@ The main functionalities include:
66
- velocity commands for the robot,
77
- velocity and PWM commands for individual wheels,
88
- battery voltage feedback,
9-
- wheel states (position, velocity, PWM duty) feedback,
9+
- wheel states (position, velocity, torque, PWM duty) feedback,
1010
- odometry feedback (calculated from wheel encoders),
1111
- feedback from the IMU sensor.
1212

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.
1414

15-
[LeoCore]: https://www.leorover.tech/documentation/leo-core
15+
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.
45+
46+
[LeoCore]: https://www.leorover.tech/documentation/leo-core
47+
[leo_fw]: http://wiki.ros.org/leo_fw
48+
[Visual Studio Code]: https://code.visualstudio.com
49+
[rosserial]: http://wiki.ros.org/rosserial
50+
[stm32pio]: https://github.com/ussserrr/stm32pio
51+
[PlatformIO IDE]: https://platformio.org/platformio-ide
52+
[PlatformIO]: https://docs.platformio.org/en/latest/what-is-platformio.html
53+
[STM32Cube]: https://www.st.com/en/ecosystems/stm32cube.html
54+
[STM32CubeMX]: https://www.st.com/en/development-tools/stm32cubemx.html
55+
[Visual Studio Code]: https://code.visualstudio.com

0 commit comments

Comments
 (0)