Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jazzy migration #628

Draft
wants to merge 37 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4d62581
refactor(devcontainer): use non absolute path in PROMPT
texhnolyze May 16, 2024
0b382de
feat(devcontainer): use non root user `bitbots`
texhnolyze May 16, 2024
b4a7437
fix(devcontainer): delete `users` group from container
texhnolyze Jun 20, 2024
c59fe1e
chore(devcontainer): upgrade to ros jazzy/ubuntu-24.04
texhnolyze Nov 6, 2024
f6c1d8a
Fix formatting, movit config, path and CMakeLists.txt for Jazzy
JanNiklasFeld Nov 23, 2024
7179449
Apply formatting
JanNiklasFeld Nov 23, 2024
154ccc9
Changes according to make format and changed ros distro to jazzy
JanNiklasFeld Nov 24, 2024
ae3d0c9
New Formating
JanNiklasFeld Nov 24, 2024
8ecfb93
test(team_comm): update snapshots
texhnolyze Nov 25, 2024
5f7f3da
Merge branch 'main' into feature/jazzy-ubuntu2404-devcontainer
Flova Dec 12, 2024
64db250
Merge branch 'main' into feature/jazzy-ubuntu2404-devcontainer
texhnolyze Dec 12, 2024
1cd061d
style(pre-commit): fix clang-format errors
texhnolyze Dec 12, 2024
ef65537
test(colcon): configure our pkgs to use `pytest`
texhnolyze Dec 12, 2024
fe27412
Merge branch 'main' into feature/jazzy-ubuntu2404-devcontainer
jaagut Dec 28, 2024
67423dc
Ignore additional easyinstall/setup.py deprecation warnings
jaagut Jan 4, 2025
ddb12cd
Resolve cmake warning from lto-wrapper
jaagut Jan 4, 2025
6291acf
Remove outdated comment
jaagut Jan 4, 2025
b3a27cd
Resolve bitbots_webots_sim warning
jaagut Jan 4, 2025
5a9f701
Cleanup
jaagut Jan 4, 2025
5e1ff70
Remove unused `realtime_tools` and `control_msgs` dependencies
jaagut Jan 4, 2025
394c6e0
Update pre-commit versions
jaagut Jan 4, 2025
ac3a467
Fixes changed headers from the `particle_filter` library
jaagut Jan 4, 2025
630b313
hcm: Fix compile warning:
jaagut Jan 4, 2025
acab50e
Reformatting
jaagut Jan 4, 2025
932dc33
Fix Localization -> `particle_filter` headers (#641)
Flova Jan 5, 2025
65d0099
TMP: Turn off warnings as errors
jaagut Jan 5, 2025
109a8e1
Replace imu_tools lib
jaagut Jan 5, 2025
5faea53
sort workspace.repos
jaagut Jan 5, 2025
c8f304f
Migrate header .h to .hpp (where available)
jaagut Jan 5, 2025
cd32802
Apply formatting
jaagut Jan 5, 2025
acdd582
blame ignore formatting
jaagut Jan 5, 2025
5ad3d5c
Merge branch 'main' into feature/jazzy-ubuntu2404-devcontainer
Flova Jan 5, 2025
354024f
Build control_toolbox from source. Revert after new version is released
Flova Jan 5, 2025
aa37e65
Revert "TMP: Turn off warnings as errors"
Flova Jan 5, 2025
a4f9d89
Build controll toolbox from source (#644)
Flova Jan 5, 2025
1e99b67
Merge with main
Flova Jan 5, 2025
44c62ca
Merge with main
Flova Jan 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 40 additions & 26 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM ros:iron
FROM ros:jazzy

ARG user=bitbots
ARG uid=1000
ARG gid=1000

# Basic Utilities
ENV DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -54,41 +58,51 @@ RUN apt update -y \
RUN apt-get install -y \
python3-rosdep \
python3-vcstool \
ros-iron-camera-calibration \
ros-iron-desktop \
ros-iron-joint-state-publisher-gui \
ros-iron-plotjuggler \
ros-iron-plotjuggler-msgs \
ros-iron-plotjuggler-ros \
ros-iron-rmw-cyclonedds-cpp \
ros-iron-rqt-robot-monitor \
ros-iron-soccer-vision-3d-rviz-markers

# Update pip and install colcon-clean
RUN pip3 install pip -U

# Install colcon extensions / patches
RUN python3 -m pip install \
git+https://github.com/ruffsl/colcon-clean \
git+https://github.com/timonegk/colcon-core.git@colors \
git+https://github.com/timonegk/colcon-notification.git@colors \
git+https://github.com/timonegk/colcon-output.git@colors
python3-virtualenv \
ros-jazzy-camera-calibration \
ros-jazzy-desktop \
ros-jazzy-joint-state-publisher-gui \
ros-jazzy-plotjuggler \
ros-jazzy-plotjuggler-msgs \
ros-jazzy-plotjuggler-ros \
ros-jazzy-rmw-cyclonedds-cpp \
ros-jazzy-rqt-robot-monitor \
ros-jazzy-soccer-vision-3d-rviz-markers

# Set zsh as default shell
SHELL ["/bin/zsh", "-c"]

# Create home directory and colcon workspace
RUN mkdir -p "/root/colcon_ws"
# Remove the users group, because when it exists on the host system
# the devcontainer will not dynamically update the containerUser GID,
# when the host user is part of the users group.
# Then create a bitbots user with home directory and add allow it to use sudo
RUN groupdel users \
&& userdel -r ubuntu \
&& useradd -m -U -u "$uid" -G sudo -s /bin/zsh $user \
&& groupmod -g "$gid" $user \
&& echo "$user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

USER $user

# Install pip colcon extensions / patches as user
RUN python3 -m pip install --user --break-system-packages \
git+https://github.com/ruffsl/colcon-clean \
git+https://github.com/timonegk/colcon-core.git@colors \
git+https://github.com/timonegk/colcon-notification.git@colors \
git+https://github.com/timonegk/colcon-output.git@colors

# Create colcon workspace
RUN mkdir -p /home/$user/colcon_ws/src

# Install oh-my-zsh for pretty terminal
RUN sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions"

# Add zshrc
COPY zshrc "/root/.zshrc"
# Add zshrc to bitbots home directory
COPY --chown=$user:$user zshrc /home/$user/.zshrc

# This is required for sharing Xauthority
ENV QT_X11_NO_MITSHM=1

# Switch to the workspace directory
WORKDIR "/root/colcon_ws"
WORKDIR /home/$user/colcon_ws
10 changes: 6 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Bit-Bots Iron Dev",
"name": "Bit-Bots Jazzy Dev",

"build": { "dockerfile": "Dockerfile" },

Expand All @@ -14,14 +14,16 @@
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.profiles.linux": { "zsh": { "path": "/bin/zsh" } }
"terminal.integrated.profiles.linux": { "zsh": { "path": "/bin/zsh" } },
"dev.containers.copyGitConfig": false,
"dev.containers.gitCredentialHelperConfigLocation": "none"
},
"extensions": ["ms-iot.vscode-ros"]
}
},

"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/root/colcon_ws/src/bitbots_main",
"workspaceFolder": "/root/colcon_ws/src/bitbots_main",
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/home/bitbots/colcon_ws/src/bitbots_main",
"workspaceFolder": "/home/bitbots/colcon_ws/src/bitbots_main",

"mounts": [
"type=bind,source=${localEnv:HOME},target=/srv/host_home,consistency=cached"
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ bindkey "^[[1;5D" backward-word


# Settings for the prompt to show that we are in a docker container
export PROMPT="%K{black} 🐋 %K{blue}%F{black}%/ %f%k%F{blue}%f " # Prefix the prompt with DOCKER
export PROMPT="%K{black} 🐋 %K{blue}%F{black} %~ %f%k%F{blue}%f " # Prefix the prompt with DOCKER

# >>> bit-bots initialize >>>

# Ignore some deprecation warnings
export PYTHONWARNINGS=ignore:::setuptools.command.install,ignore:::setuptools.command.easy_install,ignore:::pkg_resources
export PYTHONWARNINGS="ignore:::setuptools.command.install,ignore:::setuptools.command.easy_install,ignore:::pkg_resources,ignore:easy_install command is deprecated,ignore:setup.py install is deprecated"

# Limit ROS 2 communication to localhost (can be overridden when needed)
export ROS_DOMAIN_ID=24
Expand Down
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ f29fb619aef9f416cbbdc74ec77c23423dcefe07
3b9f322183bed2cb271bf6bd07d803a93c398c3e
ae9fbef74c50ba1e462d1b76da16779c76aa0d5b
476e75e3f3d17c35ac89b17f513d93078687d613
cd3280273363807e1b5df2ade0138d48178cb06b
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: ubuntu:jammy
image: ubuntu:noble

steps:
- name: Cancel outdated jobs
Expand Down Expand Up @@ -39,14 +39,14 @@ jobs:

- name: Build packages
run: |
. /opt/ros/iron/setup.sh
. /opt/ros/jazzy/setup.sh
colcon build --symlink-install
working-directory: /colcon_ws

- name: Test packages
run: |
# Source workspace
. /opt/ros/iron/setup.sh
. /opt/ros/jazzy/setup.sh
. install/setup.sh
# Run tests for all packages
colcon test --event-handlers console_direct+ --return-code-on-test-failure --parallel-workers 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:

jobs:
pre-commit:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: Install cppcheck
run: sudo apt install cppcheck -y
- uses: pre-commit/[email protected].0
- uses: pre-commit/[email protected].1
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ qtcreator-*
# Emacs
.#*

# Catkin custom files
CATKIN_IGNORE
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -220,7 +218,7 @@ doku/*
# library subdirectories
/lib/

# Path to the protocol buffer definitions, which are a diffrerent repository and managed by vcstool
# Path to the protocol buffer definitions, which are a different repository and managed by vcstool
/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/RobocupProtocol
# Protobuf generated file
/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/robocup_extension_pb2.py
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: cppcheck
args:
- "--inline-suppr"
- "--suppress=missingInclude"
- "--suppress=missingIncludeSystem"
- "--suppress=unmatchedSuppression"
- "--suppress=unusedFunction"
- "--suppress=unusedStructMember"
Expand All @@ -27,7 +27,7 @@ repos:
- id: cmake-format
- id: cmake-lint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-toml
Expand Down
7 changes: 4 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
"unpenalize",
"unpenalized",
"urdf",
"vcstool",
"walkready",
"wandb",
"webots",
Expand Down Expand Up @@ -218,13 +219,13 @@
},
// Tell the ROS extension where to find the setup.bash
// This also utilizes the COLCON_WS environment variable, which needs to be set
"ros.distro": "iron",
"ros.distro": "jazzy",
"search.useIgnoreFiles": false,
"python.autoComplete.extraPaths": [
"/opt/ros/iron/lib/python3.10/site-packages"
"/opt/ros/jazzy/lib/python3.10/site-packages"
],
"python.analysis.extraPaths": [
"/opt/ros/iron/lib/python3.10/site-packages"
"/opt/ros/jazzy/lib/python3.10/site-packages"
],
"cmake.configureOnOpen": false,
"editor.formatOnSave": true,
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ install-no-root: pull-init update-no-root

pip:
# Install and upgrade pip dependencies
pip install --upgrade -r requirements/dev.txt --user
pip install --upgrade -r requirements/dev.txt --user --break-system-packages

pre-commit:
# Install pre-commit hooks for all submodules that have a .pre-commit-config.yaml file
Expand Down Expand Up @@ -90,8 +90,8 @@ rosdep:
# Initialize rosdep if not already done
[ -f /etc/ros/rosdep/sources.list.d/20-default.list ] || sudo rosdep init
# Update rosdep and install dependencies from meta directory
rosdep update --include-eol-distros
rosdep install --from-paths . --ignore-src --rosdistro iron -y
rosdep update
rosdep install --from-paths . --ignore-src --rosdistro jazzy -y

status:
# Show status of all repositories
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build & Test](https://github.com/bit-bots/bitbots_main/actions/workflows/ci.yml/badge.svg)](https://github.com/bit-bots/bitbots_main/actions/workflows/ci.yml)
[![Code style checks](https://github.com/bit-bots/bitbots_main/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/bit-bots/bitbots_main/actions/workflows/pre-commit.yml)
[![ROS Version Iron](https://img.shields.io/badge/ROS%20Version-Iron-ab8c71)](https://docs.ros.org/en/iron/index.html)
[![ROS Version Jazzy](https://img.shields.io/badge/ROS%20Version-Jazzy-00b8ff)](https://docs.ros.org/en/jazzy/index.html)
jaagut marked this conversation as resolved.
Show resolved Hide resolved

This git repository contains all RoboCup-related code and documentation from the Hamburg Bit-Bots team.
All code is written as individual ROS 2 packages targeting Ubuntu.
Expand Down
1 change: 1 addition & 0 deletions bitbots_behavior/bitbots_body_behavior/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<depend>tf_transformations</depend>
<depend>tf2</depend>

<test_depend>python3-pytest</test_depend>

<export>
<rosdoc config="rosdoc.yaml"/>
Expand Down
4 changes: 2 additions & 2 deletions bitbots_behavior/bitbots_body_behavior/setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import glob

from setuptools import setup
from setuptools import find_packages, setup

package_name = "bitbots_body_behavior"


setup(
name=package_name,
packages=[package_name],
packages=find_packages(exclude=["test"]),
data_files=[
("share/" + package_name, ["package.xml"]),
("share/ament_index/resource_index/packages", ["resource/" + package_name]),
Expand Down
4 changes: 0 additions & 4 deletions bitbots_lowlevel/bitbots_ros_control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ find_package(moveit_core REQUIRED)
find_package(moveit_ros_planning REQUIRED)
find_package(pluginlib REQUIRED)
find_package(rclcpp REQUIRED)
find_package(realtime_tools REQUIRED)
find_package(rosidl_typesupport_cpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(std_srvs REQUIRED)
Expand Down Expand Up @@ -66,7 +65,6 @@ ament_target_dependencies(
moveit_ros_planning
pluginlib
rclcpp
realtime_tools
rosidl_typesupport_cpp
std_msgs
std_srvs
Expand All @@ -89,7 +87,6 @@ ament_target_dependencies(
hardware_interface
pluginlib
rclcpp
realtime_tools
rosidl_typesupport_cpp
std_msgs
std_srvs
Expand All @@ -107,7 +104,6 @@ ament_export_dependencies(controller_manager)
ament_export_dependencies(dynamixel_workbench_toolbox)
ament_export_dependencies(hardware_interface)
ament_export_dependencies(pluginlib)
ament_export_dependencies(realtime_tools)
ament_export_dependencies(std_msgs)
ament_export_dependencies(tf2_ros)
ament_export_dependencies(transmission_interface)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ class HardwareInterface {
public:
virtual bool init() = 0;

virtual void read(const rclcpp::Time &t, const rclcpp::Duration &dt){};
virtual void read(const rclcpp::Time &t, const rclcpp::Duration &dt) {};

virtual void write(const rclcpp::Time &t, const rclcpp::Duration &dt){};
virtual void write(const rclcpp::Time &t, const rclcpp::Duration &dt) {};

virtual void restoreAfterPowerCycle(){};
virtual void restoreAfterPowerCycle() {};

virtual ~HardwareInterface(){};
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef BITBOTS_ROS_CONTROL_INCLUDE_BITBOTS_ROS_CONTROL_UTILS_H_
#define BITBOTS_ROS_CONTROL_INCLUDE_BITBOTS_ROS_CONTROL_UTILS_H_

#include "bitbots_msgs/msg/audio.hpp"
#include "rclcpp/rclcpp.hpp"
#include <bitbots_msgs/msg/audio.hpp>
#include <rclcpp/rclcpp.hpp>

namespace bitbots_ros_control {

Expand All @@ -13,7 +13,7 @@ void speakError(rclcpp::Publisher<bitbots_msgs::msg::Audio>::SharedPtr speak_pub

uint16_t dxlMakeword(uint64_t a, uint64_t b);
uint32_t dxlMakedword(uint64_t a, uint64_t b);
float dxlMakeFloat(uint8_t* data);
float dxlMakeFloat(const uint8_t* data);

std::string gyroRangeToString(uint8_t range);
std::string accelRangeToString(uint8_t range);
Expand Down
2 changes: 1 addition & 1 deletion bitbots_lowlevel/bitbots_ros_control/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
<depend>bitbots_tts</depend>
<depend>pluginlib</depend>
<depend>rclcpp</depend>
<depend>realtime_tools</depend>
<depend>std_msgs</depend>
<depend>system_monitor</depend>
<depend>transmission_interface</depend>
<depend>yaml-cpp</depend>

<exec_depend>imu_complementary_filter</exec_depend>
<exec_depend>rviz_imu_plugin</exec_depend>


<export>
Expand Down
Loading
Loading