Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierJCallait authored Feb 1, 2025
1 parent 3c7e7bf commit 2af842c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,17 @@ If you need to build and source the workspace, you can use the following command
colcon build
source install/setup.bash
```

## ROS2 Commands

On the device to run X17-Core (typically the Raspberry Pi), create a directory called ```ros2_ws```, within this work space create another directory called ```src```. Inside the ```src``` directory, clone this repository. While inside the ```ros2_ws``` directory, run the command ```source /opt/ros/humble/setup.bash```. ROS2 (Humble) needs to be installed for this work; the installation commands are found in https://docs.ros.org/en/humble/Installation.html. The source command will "initialize" ROS2 on the device. From there, run ```colcon build``` which will create the executables that will run. After that completes, run the command ```. install/setup.bash```. To run specific files, do the command ```ros2 run _project-name_ _file-name_```. To have multiple files running, you can open multiple terminals and run that command for each file.

## Communication Protocol

X17-Core uses UART for its communication protocol between the Raspberry Pi and the STMs on the electrical boards. There are four different message types.
- Thrust data message
- ESC data message
- Power data message
- Tools data message

The UART protocol used will not have parity bits enabled. It will be running at a baud rate of 9600. Each message has a device ID which is the ID of the destination of the message. Each message will also have CRC which uses the CRC-32 MPEG2 polynomial, however, we only save the last 8-bits of the 32-bit CRC value. There are two UART lines, one for the tools, and one for the thrusters/ESC/power bricks. The acknowledge will be of the same structure as the data messages.

0 comments on commit 2af842c

Please sign in to comment.