This is a main repo for communication & intelligence team. There are three sub-folders.
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.
colcon build
Note: You might need to install colcon by
sudo apt install python3-colcon-common-extensions
You 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.bash
Note: 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-install
Some 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:jammy
All 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-src
Use the following list and this tutorial.
We also use custom-made interfaces from brc_msgs.
Clone or download brc_msgs into the same location as this repo is required.
Since this repo depends on brc_msgs
, you will need to build and install packages from brc_msgs
as well.
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 sdist
It 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