Skip to content

Commit 0d812fc

Browse files
authored
Merge branch 'main' into better-error-message-for-missing-config
2 parents 4f86506 + 30a475f commit 0d812fc

File tree

191 files changed

+1078
-1338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+1078
-1338
lines changed

.devcontainer/Dockerfile

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
FROM ros:iron
1+
FROM ros:jazzy
2+
3+
ARG user=bitbots
4+
ARG uid=1000
5+
ARG gid=1000
26

37
# Basic Utilities
48
ENV DEBIAN_FRONTEND=noninteractive
@@ -54,41 +58,51 @@ RUN apt update -y \
5458
RUN apt-get install -y \
5559
python3-rosdep \
5660
python3-vcstool \
57-
ros-iron-camera-calibration \
58-
ros-iron-desktop \
59-
ros-iron-joint-state-publisher-gui \
60-
ros-iron-plotjuggler \
61-
ros-iron-plotjuggler-msgs \
62-
ros-iron-plotjuggler-ros \
63-
ros-iron-rmw-cyclonedds-cpp \
64-
ros-iron-rqt-robot-monitor \
65-
ros-iron-soccer-vision-3d-rviz-markers
66-
67-
# Update pip and install colcon-clean
68-
RUN pip3 install pip -U
69-
70-
# Install colcon extensions / patches
71-
RUN python3 -m pip install \
72-
git+https://github.com/ruffsl/colcon-clean \
73-
git+https://github.com/timonegk/colcon-core.git@colors \
74-
git+https://github.com/timonegk/colcon-notification.git@colors \
75-
git+https://github.com/timonegk/colcon-output.git@colors
61+
python3-virtualenv \
62+
ros-jazzy-camera-calibration \
63+
ros-jazzy-desktop \
64+
ros-jazzy-joint-state-publisher-gui \
65+
ros-jazzy-plotjuggler \
66+
ros-jazzy-plotjuggler-msgs \
67+
ros-jazzy-plotjuggler-ros \
68+
ros-jazzy-rmw-cyclonedds-cpp \
69+
ros-jazzy-rqt-robot-monitor \
70+
ros-jazzy-soccer-vision-3d-rviz-markers
7671

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

80-
# Create home directory and colcon workspace
81-
RUN mkdir -p "/root/colcon_ws"
75+
# Remove the users group, because when it exists on the host system
76+
# the devcontainer will not dynamically update the containerUser GID,
77+
# when the host user is part of the users group.
78+
# Then create a bitbots user with home directory and add allow it to use sudo
79+
RUN groupdel users \
80+
&& userdel -r ubuntu \
81+
&& useradd -m -U -u "$uid" -G sudo -s /bin/zsh $user \
82+
&& groupmod -g "$gid" $user \
83+
&& echo "$user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
84+
85+
USER $user
86+
87+
# Install pip colcon extensions / patches as user
88+
RUN python3 -m pip install --user --break-system-packages \
89+
git+https://github.com/ruffsl/colcon-clean \
90+
git+https://github.com/timonegk/colcon-core.git@colors \
91+
git+https://github.com/timonegk/colcon-notification.git@colors \
92+
git+https://github.com/timonegk/colcon-output.git@colors
93+
94+
# Create colcon workspace
95+
RUN mkdir -p /home/$user/colcon_ws/src
8296

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

87-
# Add zshrc
88-
COPY zshrc "/root/.zshrc"
101+
# Add zshrc to bitbots home directory
102+
COPY --chown=$user:$user zshrc /home/$user/.zshrc
89103

90104
# This is required for sharing Xauthority
91105
ENV QT_X11_NO_MITSHM=1
92106

93107
# Switch to the workspace directory
94-
WORKDIR "/root/colcon_ws"
108+
WORKDIR /home/$user/colcon_ws

.devcontainer/devcontainer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "Bit-Bots Iron Dev",
2+
"name": "Bit-Bots Jazzy Dev",
33

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

@@ -14,14 +14,16 @@
1414
"vscode": {
1515
"settings": {
1616
"terminal.integrated.defaultProfile.linux": "zsh",
17-
"terminal.integrated.profiles.linux": { "zsh": { "path": "/bin/zsh" } }
17+
"terminal.integrated.profiles.linux": { "zsh": { "path": "/bin/zsh" } },
18+
"dev.containers.copyGitConfig": false,
19+
"dev.containers.gitCredentialHelperConfigLocation": "none"
1820
},
1921
"extensions": ["ms-iot.vscode-ros"]
2022
}
2123
},
2224

23-
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/root/colcon_ws/src/bitbots_main",
24-
"workspaceFolder": "/root/colcon_ws/src/bitbots_main",
25+
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/home/bitbots/colcon_ws/src/bitbots_main",
26+
"workspaceFolder": "/home/bitbots/colcon_ws/src/bitbots_main",
2527

2628
"mounts": [
2729
"type=bind,source=${localEnv:HOME},target=/srv/host_home,consistency=cached"

.devcontainer/zshrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ bindkey "^[[1;5D" backward-word
5050

5151

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

5555
# >>> bit-bots initialize >>>
5656

5757
# Ignore some deprecation warnings
58-
export PYTHONWARNINGS=ignore:::setuptools.command.install,ignore:::setuptools.command.easy_install,ignore:::pkg_resources
58+
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"
5959

6060
# Limit ROS 2 communication to localhost (can be overridden when needed)
6161
export ROS_DOMAIN_ID=24

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ f29fb619aef9f416cbbdc74ec77c23423dcefe07
1111
3b9f322183bed2cb271bf6bd07d803a93c398c3e
1212
ae9fbef74c50ba1e462d1b76da16779c76aa0d5b
1313
476e75e3f3d17c35ac89b17f513d93078687d613
14+
cd3280273363807e1b5df2ade0138d48178cb06b

.github/workflows/ci.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,27 @@ on:
44
- cron: '0 0 * * *'
55
push:
66

7+
env:
8+
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"
9+
710
jobs:
811
build:
912
runs-on: ubuntu-latest
1013
container:
11-
image: ubuntu:jammy
14+
image: ubuntu:noble
1215

1316
steps:
1417
- name: Cancel outdated jobs
1518
uses: fkirc/skip-duplicate-actions@v5
1619
with:
1720
cancel_others: 'true'
21+
22+
# Remove comments to spawn an interactive debigging ssh shell in the ci
23+
#- name: Setup tmate session
24+
# uses: mxschmitt/action-tmate@v3
25+
# with:
26+
# detached: true
27+
1828
- name: Set up ROS ecosystem
1929
uses: ros-tooling/setup-ros@v0.7
2030

@@ -30,7 +40,9 @@ jobs:
3040
echo "PATH=$PATH:/github/home/.local/bin" >> "$GITHUB_ENV"
3141
3242
- name: Pull source code for libraries and install dependencies
33-
run: make install HTTPS=true ARGS="--ci"
43+
run: |
44+
sudo apt-get remove -y python3-pytest-repeat #TODO remove once the upstream apt package reports the correct version on the newest pip version
45+
make install HTTPS=true ARGS="--ci"
3446
3547
- name: Set up colcon workspace
3648
run: |
@@ -39,14 +51,14 @@ jobs:
3951
4052
- name: Build packages
4153
run: |
42-
. /opt/ros/iron/setup.sh
54+
. /opt/ros/jazzy/setup.sh
4355
colcon build --symlink-install
4456
working-directory: /colcon_ws
4557

4658
- name: Test packages
4759
run: |
4860
# Source workspace
49-
. /opt/ros/iron/setup.sh
61+
. /opt/ros/jazzy/setup.sh
5062
. install/setup.sh
5163
# Run tests for all packages
5264
colcon test --event-handlers console_direct+ --return-code-on-test-failure --parallel-workers 1

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ on:
77

88
jobs:
99
pre-commit:
10-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-24.04
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-python@v4
1414
- name: Install cppcheck
1515
run: sudo apt install cppcheck -y
16-
- uses: pre-commit/action@v3.0.0
16+
- uses: pre-commit/action@v3.0.1

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ qtcreator-*
9797
# Emacs
9898
.#*
9999

100-
# Catkin custom files
101-
CATKIN_IGNORE
102100
### Python template
103101
# Byte-compiled / optimized / DLL files
104102
__pycache__/
@@ -220,10 +218,11 @@ doku/*
220218
# library subdirectories
221219
/lib/
222220

223-
# Path to the protocol buffer definitions, which are a diffrerent repository and managed by vcstool
221+
# Path to the protocol buffer definitions, which are a different repository and managed by vcstool
224222
/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/RobocupProtocol
225223
# Protobuf generated file
226224
/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/robocup_extension_pb2.py
225+
/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/robocup_extension_pb2.pyi
227226

228227
# Workspace git status file from the deploy tool
229228
**/workspace_status.json

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.1.6
3+
rev: v0.9.6
44
hooks:
55
- id: ruff
66
args:
@@ -16,18 +16,18 @@ repos:
1616
- id: cppcheck
1717
args:
1818
- "--inline-suppr"
19-
- "--suppress=missingInclude"
19+
- "--suppress=missingIncludeSystem"
2020
- "--suppress=unmatchedSuppression"
2121
- "--suppress=unusedFunction"
2222
- "--suppress=unusedStructMember"
2323
- "--suppress=useStlAlgorithm"
2424
- repo: https://github.com/cheshirekow/cmake-format-precommit
25-
rev: v0.6.10
25+
rev: v0.6.13
2626
hooks:
2727
- id: cmake-format
2828
- id: cmake-lint
2929
- repo: https://github.com/pre-commit/pre-commit-hooks
30-
rev: v4.5.0
30+
rev: v5.0.0
3131
hooks:
3232
- id: check-merge-conflict
3333
- id: check-toml

.vscode/settings.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
"unpenalize",
118118
"unpenalized",
119119
"urdf",
120+
"vcstool",
120121
"walkready",
121122
"wandb",
122123
"webots",
@@ -219,13 +220,13 @@
219220
},
220221
// Tell the ROS extension where to find the setup.bash
221222
// This also utilizes the COLCON_WS environment variable, which needs to be set
222-
"ros.distro": "iron",
223+
"ros.distro": "jazzy",
223224
"search.useIgnoreFiles": false,
224225
"python.autoComplete.extraPaths": [
225-
"/opt/ros/iron/lib/python3.10/site-packages"
226+
"/opt/ros/jazzy/lib/python3.12/site-packages"
226227
],
227228
"python.analysis.extraPaths": [
228-
"/opt/ros/iron/lib/python3.10/site-packages"
229+
"/opt/ros/jazzy/lib/python3.12/site-packages"
229230
],
230231
"cmake.configureOnOpen": false,
231232
"editor.formatOnSave": true,
@@ -237,4 +238,8 @@
237238
"[json]": {
238239
"editor.defaultFormatter": "vscode.json-language-features"
239240
},
241+
"makefile.configureOnOpen": true,
242+
"[jsonc]": {
243+
"editor.defaultFormatter": "vscode.json-language-features"
244+
},
240245
}

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ install-no-root: pull-init update-no-root
1717

1818
pip:
1919
# Install and upgrade pip dependencies
20-
pip install --upgrade pip --user
21-
pip install --upgrade -r requirements/dev.txt --user -v
20+
pip install --upgrade pip --user --break-system-packages -v
21+
pip install --upgrade -r requirements/dev.txt --user --break-system-packages -v
2222

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

9797
status:
9898
# Show status of all repositories

0 commit comments

Comments
 (0)