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

Conversation

youtalk
Copy link
Member

@youtalk youtalk commented Dec 19, 2024

Description

This PR makes it possible to run the autoware:universe-localization-mapping containers using the launch files designed for the components.

Ref. #5394

How was this PR tested?

Notes for reviewers

None.

Effects on system behavior

None.

Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
@youtalk youtalk self-assigned this Dec 19, 2024
Copy link

github-actions bot commented Dec 19, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@youtalk youtalk added type:containers Docker containers, containerization of components, or container orchestration. component:openadkit Issues or Features related to Open AD Kit tag:run-health-check Run health-check labels Dec 19, 2024
@youtalk youtalk requested review from xmfcx and mitsudome-r December 19, 2024 13:23
@@ -52,6 +52,8 @@ FROM rosdep-depend AS rosdep-universe-localization-mapping-depend
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:openadkit Issues or Features related to Open AD Kit tag:run-health-check Run health-check type:containers Docker containers, containerization of components, or container orchestration.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants