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

Add nav2_dwb_controller package #10

Merged
merged 2 commits into from
Aug 12, 2022
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
12 changes: 10 additions & 2 deletions debian/create_debians.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,15 @@ PACKAGE_LIST=(
navigation2/nav2_amcl \
navigation2/nav2_planner \
navigation2/nav2_navfn_planner \
navigation2/nav2_controller
navigation2/nav2_dwb_controller/nav_2d_msgs \
navigation2/nav2_dwb_controller/nav_2d_utils \
navigation2/nav2_controller \
navigation2/nav2_dwb_controller/dwb_msgs \
navigation2/nav2_dwb_controller/dwb_core \
navigation2/nav2_dwb_controller/dwb_plugins \
navigation2/nav2_dwb_controller/costmap_queue \
navigation2/nav2_dwb_controller/dwb_critics \
navigation2/nav2_dwb_controller/nav2_dwb_controller
)

for PACKAGE in ${PACKAGE_LIST[@]}; do
Expand All @@ -76,4 +84,4 @@ for PACKAGE in ${PACKAGE_LIST[@]}; do

done

echo "Complete!"
echo "Complete!"
3 changes: 2 additions & 1 deletion minimal_repos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ nav2_amcl
nav2_rviz_plugins
nav2_navfn_planner
geographic_msgs
nav2_controller
nav2_controller
nav2_dwb_controller
61 changes: 31 additions & 30 deletions nav2_minimal.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ COPY ./ src/navigation2
# copy manifests for caching
WORKDIR /opt
RUN find ./ -name "package.xml" | \
xargs cp --parents -t /tmp
xargs cp --parents -t /tmp

# multi-stage for building
FROM $FROM_IMAGE AS build

# install CI dependencies
RUN apt-get update && apt-get install -q -y \
ccache \
lcov \
&& rm -rf /var/lib/apt/lists/*
ccache \
lcov \
&& rm -rf /var/lib/apt/lists/*

# copy underlay manifests
ENV UNDERLAY_WS /opt/underlay_ws
Expand All @@ -45,10 +45,10 @@ WORKDIR $UNDERLAY_WS

# install underlay dependencies
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
apt-get update && rosdep install -q -y \
--from-paths src \
--ignore-src \
&& rm -rf /var/lib/apt/lists/*
apt-get update && rosdep install -q -y \
--from-paths src \
--ignore-src \
&& rm -rf /var/lib/apt/lists/*

# copy underlay source
COPY --from=cache $UNDERLAY_WS ./
Expand All @@ -57,45 +57,46 @@ COPY --from=cache $UNDERLAY_WS ./
ARG UNDERLAY_MIXINS="release ccache"
ARG FAIL_ON_BUILD_FAILURE=True
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
colcon build \
--symlink-install \
--mixin \
$UNDERLAY_MIXINS \
--event-handlers console_direct+ \
|| touch build_failed && \
if [ -f build_failed ] && [ -n "$FAIL_ON_BUILD_FAILURE" ]; then \
exit 1; \
fi
colcon build \
--symlink-install \
--mixin \
$UNDERLAY_MIXINS \
--event-handlers console_direct+ \
|| touch build_failed && \
if [ -f build_failed ] && [ -n "$FAIL_ON_BUILD_FAILURE" ]; then \
exit 1; \
fi

# copy overlay manifests
ENV OVERLAY_WS /opt/overlay_ws
COPY --from=cache /tmp/overlay_ws $OVERLAY_WS

WORKDIR $OVERLAY_WS
COPY ./minimal_repos.txt ./
COPY ./nav2_pkgs.txt ./

# install overlay dependencies
RUN . $UNDERLAY_WS/install/setup.sh && \
apt-get update && rosdep install -q -y \
--from-paths $(awk '$0="src/navigation2/"$0' ./minimal_repos.txt) \
--ignore-src \
&& rm -rf /var/lib/apt/lists/*
apt-get update && rosdep install -q -y \
--from-paths $(awk '$0="src/navigation2/"$0' ./minimal_repos.txt) \
--ignore-src \
&& rm -rf /var/lib/apt/lists/*

# copy overlay source
COPY --from=cache $OVERLAY_WS ./

# build overlay source
ARG OVERLAY_MIXINS="release ccache"
RUN . $UNDERLAY_WS/install/setup.sh && \
colcon build \
--symlink-install \
--mixin \
$OVERLAY_MIXINS \
--packages-select $(cat ./minimal_repos.txt) nav_2d_msgs nav_2d_utils \
|| touch build_failed && \
if [ -f build_failed ] && [ -n "$FAIL_ON_BUILD_FAILURE" ]; then \
exit 1; \
fi
colcon build \
--symlink-install \
--mixin \
$OVERLAY_MIXINS \
--packages-select $(cat ./nav2_pkgs.txt) $(cat ./minimal_repos.txt) \
|| touch build_failed && \
if [ -f build_failed ] && [ -n "$FAIL_ON_BUILD_FAILURE" ]; then \
exit 1; \
fi

# source overlay from entrypoint
# RUN sed --in-place \
Expand Down
7 changes: 7 additions & 0 deletions nav2_pkgs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dwb_msgs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this file? Maybe we can put it all together in minimal_repos.txt??

Copy link
Author

@biancabnd biancabnd Aug 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging into feat/update_humble sounds good!
Regarding the file, that was my first intention the problem is that this file is used in two commands:
Here in the rosdep install:

 apt-get update && rosdep install -q -y \
  --from-paths $(awk '$0="src/navigation2/"$0' ./minimal_repos.txt) \ 
  --ignore-src \
  && rm -rf /var/lib/apt/lists/*

And in the colcon build:

  --symlink-install \
  --mixin \
  $OVERLAY_MIXINS \
  --packages-select $(cat ./nav2_pkgs.txt) $(cat ./minimal_repos.txt) \

The problem is that in the first command it looks for packages at path : src/navigation2 while these packages are located in src/navigation2/nav2_dwb_controller which makes this command to fail. And if you add the entire path in the minimal_repos.txt then it fails the colcon build because it expects only the name of the package so dwb_core for example and not the entire path. I solved this issue by adding all these pkgs in a second file, but if you have a better alternative I am open to discuss it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The branch for humble is the feat/humble_main no? Because I cannot find feat/update_humble

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sorry, I meant feat/humble_main

I understand now the issue with the files. Lets leave it like this and if we think of a cleaner solution we can still do it in the PR of Humble. Thanks for the clarification Bianca!

dwb_core
dwb_plugins
costmap_queue
dwb_critics
nav_2d_msgs
nav_2d_utils