Skip to content

Commit de89a67

Browse files
authored
Fix CI (develop branch) (#1029)
* Fix CI develop * fix * typo * catch exceptions
1 parent d1e09f1 commit de89a67

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN useradd -d /${DOCKERUSER} -m \
1919
usermod -a -G video ${DOCKERUSER} && \
2020
usermod -a -G dialout ${DOCKERUSER}
2121

22-
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" && \
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" && \
2323
apt update && apt install -y wget && \
2424
wget ${WEBOTS_URL} -O /tmp/webots.deb && \
2525
apt install -y /tmp/webots.deb && \
@@ -35,6 +35,7 @@ RUN apt-get update && apt-get install -y \
3535
ros-${ROS_DISTRO}-robot-localization \
3636
ros-${ROS_DISTRO}-laser-filters \
3737
ros-${ROS_DISTRO}-tf-transformations \
38+
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
3839
gdb \
3940
git
4041

docker/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ After that, you can just attach to the container with:
2525
```bash
2626
make exec
2727
```
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: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ 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).
4947
# export QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins

scripts/ci_before_init_embed.bash

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

webots_ros2_control/src/Ros2Control.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ namespace webots_ros2_control {
9494
const rclcpp::Duration dt = rclcpp::Duration::from_seconds(mControlPeriodMs / 1000.0);
9595
mControllerManager->read(mNode->get_clock()->now(), dt);
9696

97-
mControllerManager->update(mNode->get_clock()->now(), dt);
97+
try {
98+
mControllerManager->update(mNode->get_clock()->now(), dt);
99+
} catch (const std::exception &ex) {
100+
RCLCPP_WARN_STREAM(mNode->get_logger(), "Controller manager update failed: " << ex.what());
101+
}
102+
98103
mLastControlUpdateMs = nowMs;
99104

100105
mControllerManager->write(mNode->get_clock()->now(), dt);

0 commit comments

Comments
 (0)