Framework built on top of modern ROS2 architecture.
The framework can be developed locally on Ubuntu 22.04, follow the relevant instructions below.
These instructions have been tested on Ubuntu 22.04, which is the only officially supported Linux distro.
- Install ROS2 Humble by following the official instructions for your OS.
NOTE: installation via Debian packages is the recommended installation method. Make sure to install both ros-humble-desktop
and ros-dev-tools
.
- Install other system level dependencies:
sudo apt-get install \
ccache \
clang \
clang-format \
cmake \
curl \
clang-tidy \
git \
git-lfs \
ninja-build \
python3-colcon-mixin \
python3-pip
- Install conan (at least version 2.2.2) with pip:
pip install conan==2.2.2
If you get this warning:
WARNING: The script conan is installed in '/home/user/.local/bin' which is not on PATH.
you will need to add ~/.local/bin
to your $PATH
with:
export PATH=~/.local/bin:$PATH
NOTE: this will only add it for your current shell session, to make this change permanent (recommended), you need to add that line to your .bashrc
:
echo 'export PATH=~/.local/bin:$PATH' >> ~/.bashrc
- Clone this repository:
git clone https://github.com/nomadz-ethz/nomadz-code-release.git
cd nomadz-ng
- In case you haven't install the vcstool, you can install it using:
sudo apt install python3-vcstool
- Setup the workspace using the provided setup script:
./tools/setup/setup-workspace.sh
- Source the ROS setup script, i.e.
setup.bash
, in the ROS install directory:
source /opt/ros/humble/setup.bash
NOTE: if you added this line to your .bashrc
during the installation of ROS 2, this step is not required (this is automatically the case in the Docker devcontainer setup).
- Set the
COLCON_HOME
environment variable to the./.colcon
directory of the workspace:
export COLCON_HOME=./.colcon
NOTE: this must be done for every new terminal before building the workspace
- Build with colcon:
colcon build
This will build workspace in Debug
mode by default. To build in Release
mode, pass the host-release
mixin:
colcon build --mixin host-release
We utilize Webots to simulate our robot soccer environment. Follow the official website installation instructions to set it up.
nomadz_bringup
provides a collection of launch scripts for starting the software stack.
- Make sure to always source the workspace setup script in the ROS install directory. E.g:
source install/setup.bash
- Launch the bringup node using
ros2 launch
:ros2 launch nomadz_bringup single_robot_sim_launch.py
Note: you can also start the simulation in isolation by launching single_robot_sim_webots_launch.py
and single_robot_sim_robot_launch.py
in different terminals. Similarly, you can start the full game using the full_game_sim_launch.py
file.
By default, the robot is controlled by the behavior_node
. For manual control, you can disable it inside the sim_robot_nodes_launch.py
and enable the manual_control_node
for keyboard control
To make sure that all source code merged into master is compliant with our style guidelines, this repository includes configuration files for all the formatting tools that we use, namely:
clang-format
version 14 for C/C++black
for Pythoncmake-format
for CMakeLists.txt files
In order to enforce formatting rules on all the commits, we use pre-commit
. To install the pre-commit hooks in your local copy:
- Install
pre-commit
pip install pre-commit
- Run
pre-commit install
from the root of the repository:
pre-commit install
We primarily use Foxglove Studio for debugging and visualization, but you can use any tools you prefer (e.g. rqt, rviz, plotjuggler).
Note: ROS Foxglove bridge is required to interface with the Foxglove Studio.
NomadZ Obama is the deployment tool for our code, that allows for multirobot deployment and gives visual feedback for the robot status. For more information, refer to the NomadZ Obama README.
This software is distributed under the MIT License.