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 CI (develop branch) #1029

Merged
merged 4 commits into from
Feb 18, 2025
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
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN useradd -d /${DOCKERUSER} -m \
usermod -a -G video ${DOCKERUSER} && \
usermod -a -G dialout ${DOCKERUSER}

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" && \
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" && \
apt update && apt install -y wget && \
wget ${WEBOTS_URL} -O /tmp/webots.deb && \
apt install -y /tmp/webots.deb && \
Expand All @@ -35,6 +35,7 @@ RUN apt-get update && apt-get install -y \
ros-${ROS_DISTRO}-robot-localization \
ros-${ROS_DISTRO}-laser-filters \
ros-${ROS_DISTRO}-tf-transformations \
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
gdb \
git

Expand Down
3 changes: 3 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ After that, you can just attach to the container with:
```bash
make exec
```

> [!NOTE]
> 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.
1 change: 1 addition & 0 deletions docker/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ alias teleop='ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -p
# For debugging
export WEBOTS_HOME=/usr/local/webots
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/cyberbotics/ros2_ws/src/webots_ros2/webots_ros2_driver/webots/lib/controller
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
4 changes: 1 addition & 3 deletions scripts/ci_after_init.bash
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ fi

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

# 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
Expand Down
4 changes: 1 addition & 3 deletions scripts/ci_before_init_embed.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@ fi

# TODO: Revert once the https://github.com/ros-planning/navigation2/issues/3033 issue is fixed.
# Fast-DDS is not working properly with the Nav2 package on Humble. Using Cyclone DDS instead.
if [[ "${ROS_DISTRO}" != "rolling" ]]; then
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
fi
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
7 changes: 6 additions & 1 deletion webots_ros2_control/src/Ros2Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ namespace webots_ros2_control {
const rclcpp::Duration dt = rclcpp::Duration::from_seconds(mControlPeriodMs / 1000.0);
mControllerManager->read(mNode->get_clock()->now(), dt);

mControllerManager->update(mNode->get_clock()->now(), dt);
try {
mControllerManager->update(mNode->get_clock()->now(), dt);
} catch (const std::exception &ex) {
RCLCPP_WARN_STREAM(mNode->get_logger(), "Controller manager update failed: " << ex.what());
}

mLastControlUpdateMs = nowMs;

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