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

Fix Webots R2025a compability #1022

Merged
merged 10 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 13 additions & 21 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARG DOCKERUSER=
ARG DOCKERUSERCOMMENT=
ARG ROS_DISTRO=jazzy
ARG ROS_TESTING=0
ARG WEBOTS_VERSION=2023b
ARG WEBOTS_VERSION=2025a

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

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

Expand All @@ -29,27 +30,18 @@ RUN [ "$ROS_TESTING" -eq "1" ] && echo "deb [ signed-by=/usr/share/keyrings/ros2
RUN apt-get update && apt-get install -y \
ros-${ROS_DISTRO}-vision-msgs \
ros-${ROS_DISTRO}-xacro \
ros-${ROS_DISTRO}-backward-ros \
ros-${ROS_DISTRO}-control-msgs \
ros-${ROS_DISTRO}-ackermann-msgs \
ros-${ROS_DISTRO}-realtime-tools \
ros-${ROS_DISTRO}-kinematics-interface \
ros-${ROS_DISTRO}-kinematics-interface-kdl \
ros-${ROS_DISTRO}-control-toolbox \
ros-${ROS_DISTRO}-ros2-control \
ros-${ROS_DISTRO}-ros2-controllers \
ros-${ROS_DISTRO}-robot-localization \
ros-${ROS_DISTRO}-laser-filters \
ros-${ROS_DISTRO}-tf-transformations \
gdb \
git

# Comment for compiled ros2_control
RUN apt-get update && apt-get install -y \
ros-${ROS_DISTRO}-ros2-control \
ros-${ROS_DISTRO}-ros2-controllers

# Uncomment for compiled ros2_control
# RUN git clone --branch=${ROS_DISTRO} https://github.com/ros-controls/ros2_control.git /${DOCKERUSER}/ros2_libs_ws/src/ros2_control && \
# git clone --branch=${ROS_DISTRO} https://github.com/ros-controls/ros2_controllers.git /${DOCKERUSER}/ros2_libs_ws/src/ros2_controllers && \
# . /opt/ros/humble/setup.sh && \
# cd /${DOCKERUSER}/ros2_libs_ws && \
# colcon build --symlink-install
# HOTFIX: https://github.com/ros-controls/ros2_control/pull/1960
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 && \
apt install -y --allow-downgrades /tmp/hotfix.deb && \
rm -f /tmp/hotfix.deb || true

COPY ./docker/bashrc /tmp/bashrc
COPY ./docker/webots.conf /${DOCKERUSER}/.config/Cyberbotics/Webots-R${WEBOTS_VERSION}.conf
Expand Down
12 changes: 6 additions & 6 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ BASENAME:=webots_ros2
DOCKERUSERCOMMENT:="Cyberbotics"
ROS_DISTRO?=jazzy
ROS_TESTING?=0
WEBOTS_VERSION?=2023b
WEBOTS_VERSION?=2025a

build:
echo "ROS_TESTING=${ROS_TESTING}"
docker build ${ROOT_DIR} \
-f ${ROOT_DIR}/docker/Dockerfile \
-t ${BASENAME}-image ${DOCKER_ARGS} \
-t ${BASENAME} ${DOCKER_ARGS} \
--build-arg UID=${UID} \
--build-arg DOCKERUSER=${DOCKERUSER} \
--build-arg DOCKERUSERCOMMENT=${DOCKERUSERCOMMENT} \
Expand All @@ -21,12 +21,12 @@ build:
--build-arg ROS_DISTRO=${ROS_DISTRO}

run:
@docker container rm -f ${BASENAME}-container
@docker container rm -f ${BASENAME}
docker run \
--net=host \
--ipc=host \
--cap-add SYS_ADMIN \
--name ${BASENAME}-container \
--name ${BASENAME} \
--privileged \
--restart unless-stopped \
-e NVIDIA_DRIVER_CAPABILITIES=all ${NVIDIA_GPU} \
Expand All @@ -37,8 +37,8 @@ run:
-v ${ROOT_DIR}:/${DOCKERUSER}/ros2_ws/src/${BASENAME} \
-v /dev:/dev:rw \
--entrypoint bash \
-d -it ${BASENAME}-image
-d -it ${BASENAME}


exec:
docker exec -it ${BASENAME}-container bash
docker exec -it ${BASENAME} bash
7 changes: 6 additions & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ curl -sSL https://get.docker.com | sh && sudo usermod -aG docker $USER

You need to build & run the container only the first time:
```bash
ROS_DISTRO=jazzy ROS_TESTING=1 WEBOTS_VERSION=2023b make build run exec
ROS_DISTRO=jazzy ROS_TESTING=0 WEBOTS_VERSION=2025a make build run exec
```

if you want to test a nightly build:
```bash
ROS_DISTRO=jazzy ROS_TESTING=0 WEBOTS_VERSION=nightly_25_12_2024/webots_2025a make build run exec
```

After that, you can just attach to the container with:
Expand Down
13 changes: 6 additions & 7 deletions scripts/ci_after_init.bash
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ if [[ "${ROS_DISTRO}" != "rolling" ]]; then
fi

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


# Fixes:
# MESA: error: ZINK: failed to choose pdev
# 2024-07-27T19:23:20.1063344Z [webots-4] glx: failed to create drisw screen
if [[ "${ROS_DISTRO}" == "rolling" ]]; then
apt-get install -y libqt5quickcontrols2-5 qtquickcontrols2-5-dev
# HOTFIX: https://github.com/ros-controls/ros2_control/pull/1960
if [[ "${ROS_DISTRO}" == "humble" ]]; then
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 && \
apt install -y --allow-downgrades /tmp/hotfix.deb && \
rm -f /tmp/hotfix.deb
fi
4 changes: 2 additions & 2 deletions scripts/ci_before_init_embed.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

ROS_DISTRO=$1

export TEST_WITH_WEBOTS_NIGTHLY=0
export WEBOTS_RELEASE_VERSION=2024a
export TEST_WITH_WEBOTS_NIGTHLY=1
export WEBOTS_RELEASE_VERSION=2025a
export WEBOTS_OFFSCREEN=1
export CI=1
export DEBIAN_FRONTEND=noninteractive
Expand Down
3 changes: 2 additions & 1 deletion webots_ros2/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
Changelog for package webots_ros2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2024.0.0 (2024-XX-XX)
2025.0.0 (2025-XX-XX)
------------------
* Created webots_ros2_husarion package.
* Created webots_ros2_crazyflie package.

2023.1.3 (2024-08-07)
------------------
Expand Down
4 changes: 3 additions & 1 deletion webots_ros2/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>webots_ros2</name>
<version>2023.1.3</version>
<version>2025.0.0</version>
<description>Interface between Webots and ROS2</description>

<maintainer email="support@cyberbotics.com">Cyberbotics</maintainer>
Expand All @@ -24,6 +24,8 @@
<exec_depend>webots_ros2_tiago</exec_depend>
<exec_depend>webots_ros2_turtlebot</exec_depend>
<exec_depend>webots_ros2_universal_robot</exec_depend>
<exec_depend>webots_ros2_crazyflie</exec_depend>
<exec_depend>webots_ros2_husarion</exec_depend>

<test_depend>ament_copyright</test_depend>
<test_depend>python3-pytest</test_depend>
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name=package_name,
version='2023.1.3',
version='2025.0.0',
packages=[package_name],
data_files=[
('share/' + package_name, ['package.xml']),
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_control/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>webots_ros2_control</name>
<version>2023.1.3</version>
<version>2025.0.0</version>
<description>ros2_control plugin for Webots</description>
<maintainer email="support@cyberbotics.com">Cyberbotics</maintainer>
<url type="website">http://wiki.ros.org/webots_ros2</url>
Expand Down
3 changes: 2 additions & 1 deletion webots_ros2_crazyflie/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>webots_ros2_crazyflie</name>
<version>2023.1.1</version>
<version>2025.0.0</version>
<description>ROS2 package for Crazyflie webots simulator</description>
<maintainer email="kimberly@bitcraze.io">Kimberly McGuire (Bitcraze AB)</maintainer>
<license>MIT</license>

<exec_depend>rclpy</exec_depend>
<exec_depend>builtin_interfaces</exec_depend>
<exec_depend>webots_ros2_driver</exec_depend>
<exec_depend>tf_transformations</exec_depend>

<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_crazyflie/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name=package_name,
version='2023.1.1',
version='2025.0.0',
packages=find_packages(exclude=['test']),
data_files=data_files,
install_requires=['setuptools', 'launch'],
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_driver/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>webots_ros2_driver</name>
<version>2023.1.3</version>
<version>2025.0.0</version>
<description>Implementation of the Webots - ROS 2 interface</description>
<maintainer email="support@cyberbotics.com">Cyberbotics</maintainer>
<license>Apache License 2.0</license>
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_driver/webots_ros2_driver/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@


# The minimal version should be the last stable release of Webots (both on master and develop branches)
MINIMUM_VERSION_STR = 'R2023b'
MINIMUM_VERSION_STR = 'R2025a'


@functools.total_ordering
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_epuck/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>webots_ros2_epuck</name>
<version>2023.1.3</version>
<version>2025.0.0</version>
<description>E-puck2 driver for Webots simulated robot</description>

<maintainer email="support@cyberbotics.com">Cyberbotics</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_epuck/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

setup(
name=package_name,
version='2023.1.3',
version='2025.0.0',
packages=[package_name],
data_files=data_files,
install_requires=['setuptools', 'launch'],
Expand Down
1 change: 1 addition & 0 deletions webots_ros2_husarion/launch/rosbot_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def get_ros2_nodes(*args):
],
remappings=[
('rosbot_base_controller/cmd_vel_unstamped', '/cmd_vel'),
('rosbot_base_controller/cmd_vel', '/cmd_vel'),
('rosbot/laser', '/scan'),
('rosbot/rl_range', '/range/rl'),
('rosbot/rr_range', '/range/rr'),
Expand Down
1 change: 1 addition & 0 deletions webots_ros2_husarion/launch/rosbot_xl_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def get_ros2_nodes(*args):
],
remappings=[
('rosbot_xl_base_controller/cmd_vel_unstamped', '/cmd_vel'),
('rosbot_xl_base_controller/cmd_vel', '/cmd_vel'),
('rosbot_xl/laser', '/scan')
]
)
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_husarion/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>webots_ros2_husarion</name>
<version>2023.0.4</version>
<version>2025.0.0</version>
<description>Husarion ROSbot 2R and XL robots ROS2 interface for Webots.</description>

<author email="jakub.delicat@husarion.com">Jakub Delicat</author>
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_husarion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

setup(
name=package_name,
version='2023.0.4',
version='2025.0.0',
packages=[package_name],
data_files=data_files,
install_requires=['setuptools'],
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_importer/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>webots_ros2_importer</name>
<version>2023.1.3</version>
<version>2025.0.0</version>
<description>This package allows to convert URDF and XACRO files into Webots PROTO files.</description>

<maintainer email="support@cyberbotics.com">Cyberbotics</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_importer/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name=package_name,
version='2023.1.3',
version='2025.0.0',
packages=[package_name, package_name + '.urdf2webots.urdf2webots'],
data_files=data_files,
install_requires=[
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_mavic/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>webots_ros2_mavic</name>
<version>2023.1.3</version>
<version>2025.0.0</version>
<description>Mavic 2 Pro robot ROS2 interface for Webots.</description>

<maintainer email="support@cyberbotics.com">Cyberbotics</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_mavic/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

setup(
name=package_name,
version='2023.1.3',
version='2025.0.0',
packages=[package_name],
data_files=data_files,
install_requires=['setuptools', 'launch'],
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>webots_ros2_msgs</name>
<version>2023.1.3</version>
<version>2025.0.0</version>
<description>Services and Messages of the webots_ros2 packages.</description>

<maintainer email="support@cyberbotics.com">Cyberbotics</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_tesla/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>webots_ros2_tesla</name>
<version>2023.1.3</version>
<version>2025.0.0</version>
<description>Tesla ROS2 interface for Webots.</description>

<maintainer email="support@cyberbotics.com">Cyberbotics</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_tesla/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

setup(
name=package_name,
version='2023.1.3',
version='2025.0.0',
packages=[package_name],
data_files=data_files,
install_requires=['setuptools', 'launch'],
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_tests/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>webots_ros2_tests</name>
<version>2023.1.3</version>
<version>2025.0.0</version>
<description>System tests for `webots_ros2` packages.</description>

<maintainer email="support@cyberbotics.com">Cyberbotics</maintainer>
Expand Down
2 changes: 1 addition & 1 deletion webots_ros2_tests/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name=package_name,
version='2023.1.3',
version='2025.0.0',
packages=[package_name],
data_files=data_files,
install_requires=['setuptools', 'launch'],
Expand Down
Loading
Loading