Skip to content

Commit

Permalink
Transition Beluga to Noble with Rolling (#349)
Browse files Browse the repository at this point in the history
### Proposed changes

ROS 2 Rolling Ridley has moved on from Ubuntu Jammy. This patch updates
Beluga packages to follow Rolling to Ubuntu Noble.

#### Type of change

- [x] 🐛 Bugfix (change which fixes an issue)
- [ ] 🚀 Feature (change which adds functionality)
- [ ] 📚 Documentation (change which fixes or extends documentation)

### Checklist

- [x] Lint and unit tests (if any) pass locally with my changes
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added necessary documentation (if appropriate)
- [x] All commits have been signed for
[DCO](https://developercertificate.org/)

### Additional comments

The build is not quite fixed yet because not all our dependencies are
available yet (or even build) for Rolling on Noble.

---------

Signed-off-by: Michel Hidalgo <[email protected]>
  • Loading branch information
hidmic authored May 7, 2024
1 parent 75f182a commit 3b6e23c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
5 changes: 5 additions & 0 deletions beluga/test/beluga/sensor/data/test_occupancy_grid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,13 @@ TEST(OccupancyGrid2, AllFreeCells) {
TEST(OccupancyGrid2, ObstacleData) {
const auto grid = StaticOccupancyGrid<5, 2>{{false, false, false, false, true, false, false, false, true, false}};

// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111118
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#pragma GCC diagnostic ignored "-Wstringop-overflow"
// Data and obstacle data are equivalent in this case
ASSERT_THAT(grid.obstacle_data() | ranges::to<std::vector>, testing::Pointwise(testing::Eq(), grid.data()));
#pragma GCC diagnostic pop
}

TEST(OccupancyGrid2, GlobalCoordinatesForCells) {
Expand Down
5 changes: 3 additions & 2 deletions beluga/test/beluga/views/test_random_intersperse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <range/v3/view/generate.hpp>
#include <range/v3/view/iota.hpp>
#include <range/v3/view/take.hpp>
#include <range/v3/view/take_exactly.hpp>

namespace {

Expand Down Expand Up @@ -101,7 +102,7 @@ TEST(RandomIntersperseView, GuaranteedIntersperseWithNullaryFunction) {
auto input = std::array{10, 20, 30};
auto output = input | //
beluga::views::random_intersperse([]() { return 4; }, probability) | //
ranges::views::take(5) | //
ranges::views::take_exactly(5) | //
ranges::to<std::vector>;
ASSERT_EQ(ranges::size(output), 5);
ASSERT_THAT(output, testing::ElementsAre(10, 4, 4, 4, 4));
Expand All @@ -112,7 +113,7 @@ TEST(RandomIntersperseView, GuaranteedIntersperseWithUnaryFunction) {
auto input = std::array{10, 20, 30};
auto output = input | //
beluga::views::random_intersperse([](auto&) { return 42; }, probability) | //
ranges::views::take(2) | //
ranges::views::take_exactly(2) | //
ranges::to<std::vector>;
ASSERT_EQ(ranges::size(output), 2);
ASSERT_THAT(output, testing::ElementsAre(10, 42));
Expand Down
13 changes: 7 additions & 6 deletions docker/images/rolling/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ros:rolling-ros-base-jammy AS cacher
FROM ros:rolling-ros-base AS cacher

WORKDIR /ws/src

Expand All @@ -12,7 +12,7 @@ RUN mkdir -p /tmp/ws/src \
&& find ./ -name "COLCON_IGNORE" | xargs cp --parents -t /tmp/ws/src \
|| true

FROM ros:rolling-ros-base-jammy AS timem-builder
FROM ros:rolling-ros-base AS timem-builder

RUN apt-get update \
&& apt-get install --no-install-recommends -y \
Expand All @@ -32,7 +32,7 @@ RUN git clone -b develop https://github.com/NERSC/timemory.git \
. \
&& cmake --build ./build --target timem

FROM ros:rolling-ros-base-jammy AS builder
FROM ros:rolling-ros-base AS builder

ENV DEBIAN_FRONTEND noninteractive

Expand All @@ -52,6 +52,7 @@ RUN apt-get update \
tmux \
&& rm -rf /var/lib/apt/lists/*

ENV PIP_BREAK_SYSTEM_PACKAGES 1
RUN pip install \
evo==1.21.0 \
pre-commit==2.20.0
Expand All @@ -67,8 +68,8 @@ RUN perf help || ( \
ARG USER=developer
ARG GROUP=ekumen

RUN addgroup --gid 1000 $GROUP \
&& adduser --uid 1000 --ingroup $GROUP --home /home/$USER --shell /bin/sh --disabled-password --gecos "" $USER \
RUN addgroup --gid 1001 $GROUP \
&& adduser --uid 1001 --ingroup $GROUP --home /home/$USER --shell /bin/sh --disabled-password --gecos "" $USER \
&& adduser $USER sudo \
&& echo "$USER ALL=NOPASSWD: ALL" >> /etc/sudoers.d/$USER

Expand Down Expand Up @@ -98,7 +99,7 @@ RUN sudo apt-get update \
&& sudo apt-get -y dist-upgrade \
&& . /opt/ros/rolling/setup.sh \
&& rosdep update \
&& rosdep install -i -y --from-path src --skip-keys 'slam_toolbox' \
&& rosdep install -i -y --from-path src --skip-keys 'turtlebot3_gazebo gazebo_ros_pkgs slam_toolbox' \
&& rosdep install -i -y --from-path src -t doc \
&& sudo rm -rf /var/lib/apt/lists/*

Expand Down

0 comments on commit 3b6e23c

Please sign in to comment.