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 12, 2025
1 parent f83fc3a commit 0305434
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ source install/setup.bash

Example publisher: ```ros2 topic pub /final_thrust shared_msgs/FinalThrustMsg "thrusters: [127,127,127,127,127,127,127,127]"```

### ROS2 file structure
Under the root of the repository, there will be different folders which are packages. Packages are used to group files with together, an example is the ```thrust_control``` folder. Each package directory will have launch folder, src folder, a folder with the same name as the package, a ```CMakeLists.txt```, and a ```package.xml``` file. The folder with the package name will have just an init.py file that is empty. The src folder will contain all of the python files that we have created containing the source code. The launch folder contains a yaml file that is used to launch the different files automatically. The ```package.xml``` file contains dependencies and information regarding the package. The ```CMakeLists.txt``` is what is used to compile all the files. All of the files location in the src folder should be added to the install(PROGRAMS ... ) section. An example is shown for the ```thrust_control``` file below. The ```shared_msgs``` is where all of the topic message structures are located. There is a msg folder containing a ```.msg``` file for each message which has the data structures used for each message. Each message file needs to be included in the ```CMakeLists.txt``` within the ```shared_msgs``` folder for ROS2 to find the messages.

Example ```CMakeLists.txt``` install section:

install(PROGRAMS
src/ROV_main.py
src/packets.py
src/test_thrust_spi.py
src/thrust_control.py
src/thrust_mapping.py
src/thrust_to_spi.py
src/thrust_to_uart.py
DESTINATION lib/${PROJECT_NAME}
)

## 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.
Expand Down

0 comments on commit 0305434

Please sign in to comment.