Skip to content

Commit 0ccd6e1

Browse files
Merge branch 'cyberbotics:master' into connector-plugin
2 parents d9bed7c + 7435cfb commit 0ccd6e1

File tree

351 files changed

+3575
-630
lines changed

Some content is hidden

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

351 files changed

+3575
-630
lines changed

docker/Dockerfile

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ARG DOCKERUSER=
88
ARG DOCKERUSERCOMMENT=
99
ARG ROS_DISTRO=jazzy
1010
ARG ROS_TESTING=0
11-
ARG WEBOTS_VERSION=2023b
11+
ARG WEBOTS_VERSION=2025a
1212

1313
RUN if [ "${ROS_DISTRO}" != "humble" ]; then userdel -r ubuntu; fi
1414
RUN useradd -d /${DOCKERUSER} -m \
@@ -19,8 +19,9 @@ RUN useradd -d /${DOCKERUSER} -m \
1919
usermod -a -G video ${DOCKERUSER} && \
2020
usermod -a -G dialout ${DOCKERUSER}
2121

22-
RUN apt update && apt install -y wget && \
23-
wget https://github.com/cyberbotics/webots/releases/download/R${WEBOTS_VERSION}/webots_${WEBOTS_VERSION}_amd64.deb -O /tmp/webots.deb && \
22+
RUN echo $WEBOTS_VERSION | grep -q "nightly" && export WEBOTS_URL="https://github.com/cyberbotics/webots/releases/download/${WEBOTS_VERSION}_amd64.deb" || export WEBOTS_URL="https://github.com/cyberbotics/webots/releases/download/R${WEBOTS_VERSION}/webots_${WEBOTS_VERSION}_amd64.deb" && \
23+
apt update && apt install -y wget && \
24+
wget ${WEBOTS_URL} -O /tmp/webots.deb && \
2425
apt install -y /tmp/webots.deb && \
2526
rm /tmp/webots.deb
2627

@@ -29,27 +30,19 @@ RUN [ "$ROS_TESTING" -eq "1" ] && echo "deb [ signed-by=/usr/share/keyrings/ros2
2930
RUN apt-get update && apt-get install -y \
3031
ros-${ROS_DISTRO}-vision-msgs \
3132
ros-${ROS_DISTRO}-xacro \
32-
ros-${ROS_DISTRO}-backward-ros \
33-
ros-${ROS_DISTRO}-control-msgs \
34-
ros-${ROS_DISTRO}-ackermann-msgs \
35-
ros-${ROS_DISTRO}-realtime-tools \
36-
ros-${ROS_DISTRO}-kinematics-interface \
37-
ros-${ROS_DISTRO}-kinematics-interface-kdl \
38-
ros-${ROS_DISTRO}-control-toolbox \
33+
ros-${ROS_DISTRO}-ros2-control \
34+
ros-${ROS_DISTRO}-ros2-controllers \
35+
ros-${ROS_DISTRO}-robot-localization \
36+
ros-${ROS_DISTRO}-laser-filters \
37+
ros-${ROS_DISTRO}-tf-transformations \
38+
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
3939
gdb \
4040
git
4141

42-
# Comment for compiled ros2_control
43-
RUN apt-get update && apt-get install -y \
44-
ros-${ROS_DISTRO}-ros2-control \
45-
ros-${ROS_DISTRO}-ros2-controllers
46-
47-
# Uncomment for compiled ros2_control
48-
# RUN git clone --branch=${ROS_DISTRO} https://github.com/ros-controls/ros2_control.git /${DOCKERUSER}/ros2_libs_ws/src/ros2_control && \
49-
# git clone --branch=${ROS_DISTRO} https://github.com/ros-controls/ros2_controllers.git /${DOCKERUSER}/ros2_libs_ws/src/ros2_controllers && \
50-
# . /opt/ros/humble/setup.sh && \
51-
# cd /${DOCKERUSER}/ros2_libs_ws && \
52-
# colcon build --symlink-install
42+
# HOTFIX: https://github.com/ros-controls/ros2_control/pull/1960
43+
RUN [ "${ROS_DISTRO}" = "humble" ] && wget -O /tmp/hotfix.deb http://snapshots.ros.org/humble/2024-08-28/ubuntu/pool/main/r/ros-humble-hardware-interface/ros-humble-hardware-interface_2.43.0-1jammy.20240823.145349_amd64.deb && \
44+
apt install -y --allow-downgrades /tmp/hotfix.deb && \
45+
rm -f /tmp/hotfix.deb || true
5346

5447
COPY ./docker/bashrc /tmp/bashrc
5548
COPY ./docker/webots.conf /${DOCKERUSER}/.config/Cyberbotics/Webots-R${WEBOTS_VERSION}.conf

docker/Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ BASENAME:=webots_ros2
66
DOCKERUSERCOMMENT:="Cyberbotics"
77
ROS_DISTRO?=jazzy
88
ROS_TESTING?=0
9-
WEBOTS_VERSION?=2023b
9+
WEBOTS_VERSION?=2025a
1010

1111
build:
1212
echo "ROS_TESTING=${ROS_TESTING}"
1313
docker build ${ROOT_DIR} \
1414
-f ${ROOT_DIR}/docker/Dockerfile \
15-
-t ${BASENAME}-image ${DOCKER_ARGS} \
15+
-t ${BASENAME} ${DOCKER_ARGS} \
1616
--build-arg UID=${UID} \
1717
--build-arg DOCKERUSER=${DOCKERUSER} \
1818
--build-arg DOCKERUSERCOMMENT=${DOCKERUSERCOMMENT} \
@@ -21,12 +21,12 @@ build:
2121
--build-arg ROS_DISTRO=${ROS_DISTRO}
2222

2323
run:
24-
@docker container rm -f ${BASENAME}-container
24+
@docker container rm -f ${BASENAME}
2525
docker run \
2626
--net=host \
2727
--ipc=host \
2828
--cap-add SYS_ADMIN \
29-
--name ${BASENAME}-container \
29+
--name ${BASENAME} \
3030
--privileged \
3131
--restart unless-stopped \
3232
-e NVIDIA_DRIVER_CAPABILITIES=all ${NVIDIA_GPU} \
@@ -37,8 +37,8 @@ run:
3737
-v ${ROOT_DIR}:/${DOCKERUSER}/ros2_ws/src/${BASENAME} \
3838
-v /dev:/dev:rw \
3939
--entrypoint bash \
40-
-d -it ${BASENAME}-image
40+
-d -it ${BASENAME}
4141

4242

4343
exec:
44-
docker exec -it ${BASENAME}-container bash
44+
docker exec -it ${BASENAME} bash

docker/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,18 @@ curl -sSL https://get.docker.com | sh && sudo usermod -aG docker $USER
1313

1414
You need to build & run the container only the first time:
1515
```bash
16-
ROS_DISTRO=jazzy ROS_TESTING=1 WEBOTS_VERSION=2023b make build run exec
16+
ROS_DISTRO=jazzy ROS_TESTING=0 WEBOTS_VERSION=2025a make build run exec
17+
```
18+
19+
if you want to test a nightly build:
20+
```bash
21+
ROS_DISTRO=jazzy ROS_TESTING=0 WEBOTS_VERSION=nightly_25_12_2024/webots_2025a make build run exec
1722
```
1823

1924
After that, you can just attach to the container with:
2025
```bash
2126
make exec
2227
```
28+
29+
> [!NOTE]
30+
> In case you get an error something like `qt.qpa.xcb: could not connect to display :0` then please run `xhost local:root` on the host.

docker/bashrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ alias teleop='ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -p
77
# For debugging
88
export WEBOTS_HOME=/usr/local/webots
99
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/cyberbotics/ros2_ws/src/webots_ros2/webots_ros2_driver/webots/lib/controller
10+
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

scripts/ci_after_init.bash

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,14 @@ fi
4141

4242
# TODO: Revert once the https://github.com/ros-planning/navigation2/issues/3033 issue is fixed.
4343
# Fast-DDS is not working properly with the Nav2 package on Humble and Iron. Using Cyclone DDS instead.
44-
if [[ "${ROS_DISTRO}" != "rolling" ]]; then
45-
apt install -y ros-${ROS_DISTRO}-rmw-cyclonedds-cpp
46-
fi
44+
apt install -y ros-${ROS_DISTRO}-rmw-cyclonedds-cpp
4745

4846
# Setup Qt plugins for RViz (can be used once RViz does not randomly crash anymore in GitHub CI).
49-
#export QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins
50-
47+
# export QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins
5148

52-
# Fixes:
53-
# MESA: error: ZINK: failed to choose pdev
54-
# 2024-07-27T19:23:20.1063344Z [webots-4] glx: failed to create drisw screen
55-
if [[ "${ROS_DISTRO}" == "rolling" ]]; then
56-
apt-get install -y libqt5quickcontrols2-5 qtquickcontrols2-5-dev
49+
# HOTFIX: https://github.com/ros-controls/ros2_control/pull/1960
50+
if [[ "${ROS_DISTRO}" == "humble" ]]; then
51+
wget -O /tmp/hotfix.deb http://snapshots.ros.org/humble/2024-08-28/ubuntu/pool/main/r/ros-humble-hardware-interface/ros-humble-hardware-interface_2.43.0-1jammy.20240823.145349_amd64.deb && \
52+
apt install -y --allow-downgrades /tmp/hotfix.deb && \
53+
rm -f /tmp/hotfix.deb
5754
fi

scripts/ci_before_init_embed.bash

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
ROS_DISTRO=$1
44

5-
export TEST_WITH_WEBOTS_NIGTHLY=0
6-
export WEBOTS_RELEASE_VERSION=2023b
5+
export TEST_WITH_WEBOTS_NIGTHLY=1
6+
export WEBOTS_RELEASE_VERSION=2025a
77
export WEBOTS_OFFSCREEN=1
88
export CI=1
99
export DEBIAN_FRONTEND=noninteractive
@@ -15,6 +15,4 @@ fi
1515

1616
# TODO: Revert once the https://github.com/ros-planning/navigation2/issues/3033 issue is fixed.
1717
# Fast-DDS is not working properly with the Nav2 package on Humble. Using Cyclone DDS instead.
18-
if [[ "${ROS_DISTRO}" != "rolling" ]]; then
19-
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
20-
fi
18+
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

tests/sources/test_clang_format.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def test_sources_are_clang_format_compliant(self):
5656
'webots_ros2_control',
5757
'webots_ros2_driver',
5858
'webots_ros2_epuck',
59+
'webots_ros2_husarion',
5960
'webots_ros2_importer',
6061
'webots_ros2_mavic',
6162
'webots_ros2_msgs',

tests/sources/test_pep8.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131
skippedDirectories = [
3232
'.git',
3333
'webots_ros2_importer/webots_ros2_importer/urdf2webots/',
34-
'webots_ros2_driver/webots/lib'
34+
'webots_ros2_driver/webots/lib',
35+
'webots_ros2_husarion/rosbot_ros',
36+
'webots_ros2_husarion/rosbot_xl_ros',
37+
'webots_ros2_husarion/ros_components_description'
3538
]
3639
skippedDirectoriesFull = [os.path.join(ROOT_FOLDER, os.path.normpath(path)) for path in skippedDirectories]
3740

webots_ros2/CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Changelog for package webots_ros2
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
2025.0.0 (2025-XX-XX)
6+
------------------
7+
* Created webots_ros2_husarion package.
8+
* Created webots_ros2_crazyflie package.
9+
510
2023.1.3 (2024-08-07)
611
------------------
712
* Added support for ROS 2 Jazzy.

webots_ros2/package.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>webots_ros2</name>
5-
<version>2023.1.3</version>
5+
<version>2025.0.0</version>
66
<description>Interface between Webots and ROS2</description>
77

88
<maintainer email="[email protected]">Cyberbotics</maintainer>
@@ -24,6 +24,8 @@
2424
<exec_depend>webots_ros2_tiago</exec_depend>
2525
<exec_depend>webots_ros2_turtlebot</exec_depend>
2626
<exec_depend>webots_ros2_universal_robot</exec_depend>
27+
<exec_depend>webots_ros2_crazyflie</exec_depend>
28+
<exec_depend>webots_ros2_husarion</exec_depend>
2729

2830
<test_depend>ament_copyright</test_depend>
2931
<test_depend>python3-pytest</test_depend>

0 commit comments

Comments
 (0)