Skip to content

Commit 00f2925

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/bitbots_rl_walk
2 parents ca6b18f + ddf2ea0 commit 00f2925

1,461 files changed

Lines changed: 50302 additions & 4347 deletions

File tree

Some content is hidden

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

.devcontainer/Dockerfile

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

37
# Basic Utilities
48
ENV DEBIAN_FRONTEND=noninteractive
@@ -46,49 +50,41 @@ ENV LANG en_US.UTF-8
4650
ENV LANGUAGE en_US:en
4751
ENV LC_ALL en_US.UTF-8
4852

49-
# Setup and prioritize packages.bit-bots.de repository
53+
# Update and upgrade all packages
5054
RUN apt update -y \
5155
&& apt upgrade -y --allow-downgrades
5256

53-
# Additional robotics related packages
54-
RUN apt-get install -y \
55-
python3-rosdep \
56-
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
76-
7757
# Set zsh as default shell
7858
SHELL ["/bin/zsh", "-c"]
7959

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

8372
# Install oh-my-zsh for pretty terminal
8473
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
74+
git clone https://github.com/zsh-users/zsh-autosuggestions "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions"
8675

87-
# Add zshrc
88-
COPY zshrc "/root/.zshrc"
76+
# Add zshrc to bitbots home directory
77+
COPY --chown=$user:$user .devcontainer/zshrc /home/$user/.zshrc
8978

9079
# This is required for sharing Xauthority
9180
ENV QT_X11_NO_MITSHM=1
9281

82+
# Install pixi
83+
RUN curl -fsSL https://pixi.sh/install.sh | sh
84+
85+
# Install basler SDK
86+
COPY scripts/make_basler.sh /tmp/make_basler.sh
87+
RUN /tmp/make_basler.sh --ci
88+
9389
# Switch to the workspace directory
94-
WORKDIR "/root/colcon_ws"
90+
WORKDIR /home/$user/bitbots_main

.devcontainer/devcontainer.json

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

4-
"build": { "dockerfile": "Dockerfile" },
4+
"build": { "dockerfile": "Dockerfile", "context": ".." },
55

66
"containerEnv": {
77
"DISPLAY": "${localEnv:DISPLAY}",
@@ -14,14 +14,34 @@
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
},
19-
"extensions": ["ms-iot.vscode-ros"]
21+
"extensions": [
22+
"charliermarsh.ruff", // Ruff linting and formatting support
23+
"DavidAnson.vscode-markdownlint", // Lints markdown files
24+
"DotJoshJohnson.xml", // XML support
25+
"lextudio.restructuredtext", // Rendering rst files in preview
26+
"Mastermori.dsd", // DSD support
27+
"mohsen1.prettify-json", // JSON formatting
28+
"MS-CEINTL.vscode-language-pack-de", // German language pack
29+
"Ranch-Hand-Robotics.rde-pack", // ROS2 development environment
30+
"ms-python.python", // Python support
31+
"ms-python.vscode-pylance", // Python support
32+
"ms-vscode.cpptools-extension-pack", // C++ support
33+
"ms-vscode.cpptools-themes", // C++ support
34+
"ms-vscode.cpptools", // C++ support
35+
"streetsidesoftware.code-spell-checker-german", // Spell checker
36+
"streetsidesoftware.code-spell-checker", // Spell checker
37+
"tamasfe.even-better-toml", // TOML support
38+
"trond-snekvik.simple-rst" // Syntax highlighting for rst files
39+
]
2040
}
2141
},
2242

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

2646
"mounts": [
2747
"type=bind,source=${localEnv:HOME},target=/srv/host_home,consistency=cached"
@@ -39,5 +59,5 @@
3959
"seccomp=unconfined"
4060
],
4161

42-
"postCreateCommand": "git config --global --add safe.directory '*'"
62+
"postCreateCommand": "git config --global --add safe.directory '*' && $HOME/.pixi/bin/pixi run build"
4363
}

.devcontainer/zshrc

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# If you come from bash you might have to change your $PATH.
2-
export PATH=$HOME/bin:/usr/local/bin:$HOME/.local/bin:$PATH
2+
export PATH=$HOME/bin:/usr/local/bin:$HOME/.local/bin:$HOME/.pixi/bin:$PATH
33

44
# Set the default shell to zsh when running zsh
55
export SHELL="$(which zsh)"
@@ -48,48 +48,11 @@ bindkey "^H" backward-kill-word
4848
bindkey "^[[1;5C" forward-word
4949
bindkey "^[[1;5D" backward-word
5050

51-
5251
# 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
54-
55-
# >>> bit-bots initialize >>>
56-
57-
# Ignore some deprecation warnings
58-
export PYTHONWARNINGS=ignore:::setuptools.command.install,ignore:::setuptools.command.easy_install,ignore:::pkg_resources
59-
60-
# Limit ROS 2 communication to localhost (can be overridden when needed)
61-
export ROS_DOMAIN_ID=24
62-
export ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
63-
64-
# Set the default colcon workspace
65-
export COLCON_WS="$HOME/colcon_ws"
66-
67-
# Set the default log level for colcon
68-
export COLCON_LOG_LEVEL=30
69-
70-
# Define a log layout
71-
export RCUTILS_COLORIZED_OUTPUT=1
72-
export RCUTILS_CONSOLE_OUTPUT_FORMAT="[{severity}] [{name}]: {message}"
73-
74-
# Set the default Middleware
75-
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
76-
77-
# Load our ros plugin script containing useful functions and aliases for ROS 2 development
78-
if [[ -f $COLCON_WS/src/bitbots_main/scripts/ros.plugin.sh ]]; then
79-
source $COLCON_WS/src/bitbots_main/scripts/ros.plugin.sh
80-
fi
81-
82-
# <<< bit-bots initialize <<<
83-
84-
# Set default editor
85-
export VISUAL="vim"
52+
export PROMPT="%K{black} 🐋 %K{blue}%F{black} %~ %f%k%F{blue}%f " # Prefix the prompt with DOCKER
8653

8754
# Some user instructions
8855
echo "Hello there! Welcome to the Bit-Bots ROS 2 development environment!"
8956
echo "If you just (re)build this container a few manual steps are nessessary:"
9057
echo "Create a ssh key with 'ssh-keygen -q -f $HOME/.ssh/id_rsa -N \"\" && cat $HOME/.ssh/id_rsa.pub'."
9158
echo "Copy the commands output and add it to your GitHub account ('https://github.com/settings/keys') (ctrl+click to open in browser)."
92-
echo "Now you can install the rest of the workspace and compile everything with 'make install && cba'."
93-
echo "To update an existing workspace you can use 'make update && cba'."
94-
echo "To compile all packages in the workspace use 'cba'. If you want to compile only a specific package use 'cbs <package_name>'."
95-
echo "Run 'xhost local:root' in a terminal on the host machine to enable GUI applications (e.g. rviz2) in the container. This needs to be done after every restart of the host machine."

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ f29fb619aef9f416cbbdc74ec77c23423dcefe07
1111
3b9f322183bed2cb271bf6bd07d803a93c398c3e
1212
ae9fbef74c50ba1e462d1b76da16779c76aa0d5b
1313
476e75e3f3d17c35ac89b17f513d93078687d613
14+
cd3280273363807e1b5df2ade0138d48178cb06b
15+
5c6c1edc69b5d4e26bb7bdc3fef3399e2a61567b

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.vscode/settings.json filter=removeFullHomePath
1+
# SCM syntax highlighting & preventing 3-way merges
2+
pixi.lock merge=binary linguist-language=YAML linguist-generated=true

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Set update schedule for GitHub Actions
2+
3+
version: 2
4+
updates:
5+
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
# Check for updates to GitHub Actions every week
10+
interval: "weekly"

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
## Related issues
88
<!--- Mention (link) related issues. -->
99
<!--- If you suggest a new feature, please discuss it in an issue first. -->
10-
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
10+
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce. -->
1111

1212
## Checklist
1313

14-
- [ ] Run `colcon build`
14+
- [ ] Run `pixi run build`
1515
- [ ] Write documentation
1616
- [ ] Test on your machine
1717
- [ ] Test on the robot

.github/workflows/ci.yml

Lines changed: 25 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,44 @@
11
name: Build & Test
22
on:
33
schedule:
4-
- cron: '0 0 * * *'
4+
- cron: '12 3 * * *'
55
push:
66

77
jobs:
88
build:
99
runs-on: ubuntu-latest
10-
container:
11-
image: ubuntu:jammy
10+
env:
11+
PSModulePath: "" # Otherwise colcon might think that PowerShell is being used
1212

1313
steps:
1414
- name: Cancel outdated jobs
15-
uses: fkirc/skip-duplicate-actions@v5
15+
uses: fkirc/skip-duplicate-actions@v5.3.1
1616
with:
1717
cancel_others: 'true'
18-
- name: Set up ROS ecosystem
19-
uses: ros-tooling/setup-ros@v0.7
18+
19+
# Remove comments to spawn an interactive debugging ssh shell in the ci
20+
#- name: Setup tmate session
21+
# uses: mxschmitt/action-tmate@v3
22+
# with:
23+
# detached: true
2024

2125
- name: Check out repository
22-
uses: actions/checkout@v4
26+
uses: actions/checkout@v6.0.2
2327

2428
- name: Configure git to trust repository
2529
run: git config --global --add safe.directory /__w/bitbots_main/bitbots_main
2630

27-
- name: Add '$HOME/.local/bin' to PATH
28-
run: |
29-
mkdir -p $HOME/.local/bin
30-
echo "PATH=$PATH:/github/home/.local/bin" >> "$GITHUB_ENV"
31-
32-
- name: Pull source code for libraries and install dependencies
33-
run: make install HTTPS=true ARGS="--ci"
34-
35-
- name: Set up colcon workspace
36-
run: |
37-
mkdir -p /colcon_ws/src
38-
ln -s $(realpath .) /colcon_ws/src/bitbots_main
39-
40-
- name: Build packages
41-
run: |
42-
. /opt/ros/iron/setup.sh
43-
colcon build --symlink-install
44-
working-directory: /colcon_ws
45-
46-
- name: Test packages
47-
run: |
48-
# Source workspace
49-
. /opt/ros/iron/setup.sh
50-
. install/setup.sh
51-
# Run tests for all packages
52-
colcon test --event-handlers console_direct+ --return-code-on-test-failure --parallel-workers 1
53-
working-directory: /colcon_ws
31+
- name: Install host dependencies
32+
run: scripts/make_basler.sh --ci
33+
34+
- name: Set up workspace
35+
uses: prefix-dev/setup-pixi@v0.9.4
36+
with:
37+
pixi-version: v0.63.1
38+
cache: true
39+
40+
- name: Build
41+
run: pixi run build
42+
43+
- name: Test
44+
run: pixi run test --parallel-workers 1

.github/workflows/pre-commit.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
name: Code style checks
22

33
on:
4-
pull_request:
54
push:
6-
branches: [main]
75

86
jobs:
97
pre-commit:
10-
runs-on: ubuntu-22.04
8+
runs-on: ubuntu-slim
119
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-python@v4
14-
- name: Install cppcheck
15-
run: sudo apt install cppcheck -y
16-
- uses: pre-commit/action@v3.0.0
10+
- name: Check out repository
11+
uses: actions/checkout@v6
12+
13+
- name: Set up workspace
14+
uses: prefix-dev/setup-pixi@v0.9.4
15+
with:
16+
pixi-version: v0.59.0
17+
cache: true
18+
environments: format
19+
20+
- name: Run pre-commit
21+
run: pixi run -e format format

.gitignore

Lines changed: 25 additions & 10 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__/
@@ -203,9 +201,12 @@ bitbots_docs_internal
203201
**/__pycache__
204202
**/cmake-build-*
205203

204+
# VS Code ROS extension
205+
.vscode/browse.vc.*
206+
206207
# Neural Network Model Path
207-
/bitbots_vision/models/
208-
/bitbots_motion/bitbots_rl_motion/rl_walk_models/
208+
/src/bitbots_vision/models/
209+
/src/bitbots_motion/bitbots_rl_motion/rl_walk_models/
209210

210211
**/.*.
211212
.idea/*
@@ -217,15 +218,29 @@ ansible_robots/*
217218
doc_internal/*
218219
doku/*
219220

220-
# library subdirectories
221-
/lib/
222-
223-
# Path to the protocol buffer definitions, which are a diffrerent repository and managed by vcstool
224-
/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/RobocupProtocol
225221
# Protobuf generated file
226-
/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/robocup_extension_pb2.py
222+
/src/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/robocup_extension_pb2.py
223+
/src/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/robocup_extension_pb2.pyi
227224

228225
# Workspace git status file from the deploy tool
229226
**/workspace_status.json
230227

228+
# Do not include colcon build files
229+
/install/
230+
/build/
231+
/log/
232+
233+
# Ignore mypy cache
234+
.mypy_cache/
235+
236+
# Pytest cache
231237
.pytest_cache/
238+
239+
# pixi environments
240+
.pixi/
241+
!.pixi/config.toml
242+
243+
CMakeFiles/
244+
CMakeCache.txt
245+
246+

0 commit comments

Comments
 (0)