This is a main repo for communication & intelligence team. There are three sub-folders.
- components: This folder is for individual parts, components, or experiments
- src: This folder contains the code that will be running on the rover. It is ROS2 workspace.
- tutorial: A trining module for new members.
The folder src is the main folder to work with. This ROS working space is tested on ROS Humble on Ubuntu 22.04 LTS. Installation guide can be found in tutorial To run the code, you will need to compile and install.
If you use Python virtual environment, you will need to create the virtual environment using extra option as below
python3 -m venv .venv --system-site-packagescolcon buildNote: You might need to install colcon by
sudo apt install python3-colcon-common-extensionsYou can selectively build packages by
colcon build --packages-select <name-of-pkg>After compilation, you will see a folder install appear.
You can install packages by
source install/setup.bashNote: You could use symlink-install along with colcon build to avoid building and installing every time you make changes on the code.
However, this only works with Python packages.
colcon build --symlink-installNote2: If you use virtual environment, you should use the following command to compile the code.
python -m colcon buildSome packages have dependencies.
We use rosdep to manage them.
# run the following code only once
sudo apt-get install python3-rosdep
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro humble --os=ubuntu:jammyAll dependencies should be mentioned in each package's package.xml whenever possible. Use the following command for install dependencies.
# run this command from ROS workspace
rosdep install --from-paths src -y --ignore-srcUse the following list and this tutorial.
Run source setup.bash for automatic setup.
This script will take care of building and installing packages from both brc_msgs and rover-code.
Since we are using legacy ODrive, we need to upgrade firmware and matching Python module with the firmware version.
To upgrade firmware, see this.
If the firmware is >0.5.5 and <0.6.0, there will be no precompiled package available from PyPi.
Therefore, we need to install from source.
First, clone or download the source code from GitHub.
Next run the following command in tools folder.
python3 setup.py sdistIt will compile and generate a package in dist/odrive-x.y.z.tar.gz.
Lastly, install it by
pip install dist/odrive-x.y.z.tar.gz