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

feat(docker): add localization/map launch files to autoware:universe-localization-mapping images #5586

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ARG AUTOWARE_BASE_CUDA_IMAGE

# hadolint ignore=DL3006
FROM $BASE_IMAGE AS rosdep-depend

Check warning on line 6 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 6 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO

Expand Down Expand Up @@ -52,6 +52,8 @@
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO

COPY src/universe/autoware.universe/launch/tier4_localization_launch /autoware/src/universe/autoware.universe/launch/tier4_localization_launch
Copy link
Member

Choose a reason for hiding this comment

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

tier4_localization_launch depends on the following packages from other folders:

  • autoware.universe/system/default_ad_api_helpers/automatic_pose_initializer
  • autoware.universe/sensing/autoware_pcl_extensions
  • autoware.universe/sensing/autoware_pointcloud_preprocessor

Should we copy these packages as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

If exec_depend is properly written, the health-check should fail when there are missing dependency packages, but it is succeeding.
https://github.com/autowarefoundation/autoware/actions/runs/12413593055/job/34655835144?pr=5586

It seems necessary to actually create the image and test whether it launches with ros2 launch.

Copy link
Member Author

Choose a reason for hiding this comment

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

I created container images with all PRs merged in the forked repository.
youtalk#158
https://hub.docker.com/repository/docker/youtalk/autoware/tags?name=20241220

ros2 launch has started, but I don’t know what parameters to provide. @mitsudome-r Could you check the launch validity instead of me?

docker run --rm -it youtalk/autoware:universe-localization-mapping-20241220-amd64 ros2 launch tier4_localization_launch localization.launch.xml
[INFO] [launch]: All log files can be found below /root/.ros/log/2024-12-20-05-47-32-395432-b78797c5f174-1
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Included launch description missing required argument 'pose_source' (description: 'A string consisting of ndt, yabloc, artag and eagleye joined by underscores no matter the order. e.g. ndt_yabloc'), given: []

Copy link
Member

@mitsudome-r mitsudome-r Dec 20, 2024

Choose a reason for hiding this comment

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

If exec_depend is properly written, the health-check should fail when there are missing dependency packages, but it is succeeding.

The rosdep script is actually outputting error messages, but the build passes because they are just exec depends.
We might need to report it as a CI error when ever we get error messages out of the scripts.
https://github.com/autowarefoundation/autoware/actions/runs/12413593055/job/34655835144?pr=5586#step:5:1472
image

ros2 launch has started, but I don’t know what parameters to provide. @mitsudome-r Could you check the launch validity instead of me?

At the moment, the launch file is expected to be launched via autoware.launch.xml so it requires lengthy arguments. I will write them down here. Give me few minutes.

Copy link
Member

Choose a reason for hiding this comment

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

In order to launch you need to give arguments and parameters to the launch file:

  1. Download localization_config.zip

  2. Mount the extracted localization to the docker container e.g., docker run -it -v $HOME/Downloads/localization_config:=/localization_config youtalk/autoware:universe-localization-mapping-20241220-amd64

  3. Run the following commands:

ros2 launch tier4_localization_launch localization.launch.xml \
  pose_source:=ndt \
  twist_source:=twist_source \
  initial_pose:=[] \
  system_run_mode:=online \
  ndt_scan_matcher/pointcloud_preprocessor/crop_box_filter_measurement_range_param_path:=/localization_config/ndt_scan_matcher/pointcloud_preprocessor/crop_box_filter_measurement_range.param.yaml \
  ndt_scan_matcher/pointcloud_preprocessor/voxel_grid_downsample_filter_param_path:=/localization_config/ndt_scan_matcher/pointcloud_preprocessor/voxel_grid_filter.param.yaml \
  ndt_scan_matcher/pointcloud_preprocessor/random_downsample_filter_param_path:=/localization_config/ndt_scan_matcher/pointcloud_preprocessor/random_downsample_filter.param.yaml \
  ndt_scan_matcher/ndt_scan_matcher_param_path:=/localization_config/ndt_scan_matcher/ndt_scan_matcher.param.yaml \
  localization_error_monitor_param_path:=/localization_config/localization_error_monitor.param.yaml \
  ekf_localizer_param_path:=/localization_config/ekf_localizer.param.yaml \
  stop_filter_param_path:=/localization_config/stop_filter.param.yaml \
  pose_initializer_param_path:=/localization_config/pose_initializer.param.yaml \
  eagleye_param_path:=/localization_config/localization/eagleye_config.param.yaml \
  ar_tag_based_localizer_param_path:=/localization_config/ar_tag_based_localizer.param.yaml \
  lidar_marker_localizer/lidar_marker_localizer_param_path:=/localization_config/lidar_marker_localizer/lidar_marker_localizer.param.yaml \
  lidar_marker_localizer/pointcloud_preprocessor/crop_box_filter_measurement_range_param_path:=/localization_config/lidar_marker_localizer/pointcloud_preprocessor/crop_box_filter_measurement_range.param.yaml \
  lidar_marker_localizer/pointcloud_preprocessor/ring_filter_param_path:=/localization_config/lidar_marker_localizer/pointcloud_preprocessor/ring_filter.param.yaml \
  twist2accel_param_path:=/localization_config/twist2accel.param.yaml

If we are able to set default parameters for the launch files, then I think we could simplify the command, but that can be done as a separate PR.

Copy link
Member

Choose a reason for hiding this comment

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

When I launch with ghcr.io/autowarefoundation/autoware:universe-devel, it works.

However, when I try to run with youtalk/autoware:universe-localization-mapping-20241220-amd64, it fails with the following error:

[ERROR] [launch]: Caught exception in launch (see debug for traceback): "package 'automatic_pose_initializer' not found, searching: ['/opt/autoware', '/opt/ros/humble']"

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you very much for your detail explanation. I understood. I will fix them.

COPY src/universe/autoware.universe/launch/tier4_map_launch /autoware/src/universe/autoware.universe/launch/tier4_map_launch
COPY src/universe/autoware.universe/localization /autoware/src/universe/autoware.universe/localization
COPY src/universe/autoware.universe/map /autoware/src/universe/autoware.universe/map
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
Expand Down Expand Up @@ -113,7 +115,7 @@
&& cat /rosdep-exec-depend-packages.txt

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS core-devel

Check warning on line 118 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 118 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ENV CCACHE_DIR="/root/.ccache"
Expand Down Expand Up @@ -251,6 +253,8 @@

# hadolint ignore=SC1091
RUN --mount=type=cache,target=${CCACHE_DIR} \
--mount=type=bind,from=rosdep-universe-localization-mapping-depend,source=/autoware/src/universe/autoware.universe/launch/tier4_localization_launch,target=/autoware/src/universe/autoware.universe/launch/tier4_localization_launch \
--mount=type=bind,from=rosdep-universe-localization-mapping-depend,source=/autoware/src/universe/autoware.universe/launch/tier4_map_launch,target=/autoware/src/universe/autoware.universe/launch/tier4_map_launch \
--mount=type=bind,from=rosdep-universe-localization-mapping-depend,source=/autoware/src/universe/autoware.universe/localization,target=/autoware/src/universe/autoware.universe/localization \
--mount=type=bind,from=rosdep-universe-localization-mapping-depend,source=/autoware/src/universe/autoware.universe/map,target=/autoware/src/universe/autoware.universe/map \
source /opt/ros/"$ROS_DISTRO"/setup.bash \
Expand Down Expand Up @@ -369,7 +373,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe-sensing-perception

Check warning on line 376 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 376 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -395,7 +399,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_CUDA_IMAGE AS universe-sensing-perception-cuda

Check warning on line 402 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_CUDA_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 402 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_CUDA_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -417,7 +421,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe-localization-mapping

Check warning on line 424 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 424 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -443,7 +447,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe-planning-control

Check warning on line 450 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 450 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -469,7 +473,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe-vehicle-system

Check warning on line 476 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 476 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -495,7 +499,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe

Check warning on line 502 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 502 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand All @@ -521,7 +525,7 @@
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_CUDA_IMAGE AS universe-cuda

Check warning on line 528 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_CUDA_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 528 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / docker-build-nightly

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $AUTOWARE_BASE_CUDA_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand Down
Loading