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(map_loader): change error handling when pcd_metadata file not found #6227

Conversation

SakodaShintaro
Copy link
Contributor

Description

When using a divided map, pointcloud_map_metadata.yaml is required.
However, when autoware was run without it, the cause was not displayed in the error message.

This pull request has been modified so that the following error message appears once per second.

[map.pointcloud_map_loader]: PCD metadata file not found: /path/to/pointcloud_map_metadata.yaml
Example of error messages that appears on the screen
[component_container-27] [ERROR] [1706590993.214443999] [map.pointcloud_map_loader]: PCD metadata file not found: /home/shintarosakoda/Downloads/nishishinjuku_autoware_map_divided_without_metadata/pointcloud_map_metadata.yaml
[scenario_selector-68] [INFO] [1706590993.254920052] [planning.scenario_planning.scenario_selector]: Waiting for current pose.
[rviz2-82] [INFO] [1706590993.268865110] [rviz2]: Message Filter dropping message: frame 'base_link' at time 67.083 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590993.396571425] [rviz2]: Message Filter dropping message: frame 'base_link' at time 67.183 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590993.463349786] [rviz2]: Message Filter dropping message: frame 'base_link' at time 67.283 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590993.588860103] [rviz2]: Message Filter dropping message: frame 'base_link' at time 67.383 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590993.684589796] [rviz2]: Message Filter dropping message: frame 'base_link' at time 67.483 for reason 'discarding message because the queue is full'
[component_container-76] [INFO] [1706590993.707601195] [control.trajectory_follower.controller_node_exe]: Waiting for trajectory.
[component_container-76] [INFO] [1706590993.707680319] [control.trajectory_follower.controller_node_exe]: Control is skipped since input data is not ready.
[rviz2-82] [INFO] [1706590993.780842434] [rviz2]: Message Filter dropping message: frame 'base_link' at time 67.583 for reason 'discarding message because the queue is full'
[component_container-76] [INFO] [1706590993.857439456] [control.trajectory_follower.lane_departure_checker_node]: waiting for current_twist msg...
[rviz2-82] [INFO] [1706590993.876582624] [rviz2]: Message Filter dropping message: frame 'base_link' at time 67.683 for reason 'discarding message because the queue is full'
[ndt_scan_matcher-36] [INFO] [1706590993.930756094] [localization.pose_estimator.ndt_scan_matcher]: Waiting for pcd loader service. Check the pointcloud_map_loader.
[rviz2-82] [INFO] [1706590993.973515148] [rviz2]: Message Filter dropping message: frame 'base_link' at time 67.783 for reason 'discarding message because the queue is full'
[component_container_mt-71] [INFO] [1706590994.029525023] [planning.scenario_planning.lane_driving.behavior_planning.behavior_path_planner]: waiting for scenario_topic
[component_container_mt-1] [INFO] [1706590994.095233718] [perception.object_recognition.detection.voxel_based_compare_map_filter]: service not available, waiting again ...
[rviz2-82] [INFO] [1706590994.100704500] [rviz2]: Message Filter dropping message: frame 'base_link' at time 67.883 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590994.164888226] [rviz2]: Message Filter dropping message: frame 'base_link' at time 67.983 for reason 'discarding message because the queue is full'
[component_container-27] [ERROR] [1706590994.214579152] [map.pointcloud_map_loader]: PCD metadata file not found: /home/shintarosakoda/Downloads/nishishinjuku_autoware_map_divided_without_metadata/pointcloud_map_metadata.yaml
[rviz2-82] [INFO] [1706590994.293013012] [rviz2]: Message Filter dropping message: frame 'base_link' at time 68.083 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590994.389248047] [rviz2]: Message Filter dropping message: frame 'base_link' at time 68.183 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590994.485010621] [rviz2]: Message Filter dropping message: frame 'base_link' at time 68.283 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590994.580677308] [rviz2]: Message Filter dropping message: frame 'base_link' at time 68.383 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590994.645155357] [rviz2]: Message Filter dropping message: frame 'base_link' at time 68.483 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590994.821647231] [rviz2]: Message Filter dropping message: frame 'base_link' at time 68.583 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590994.853816203] [rviz2]: Message Filter dropping message: frame 'base_link' at time 68.683 for reason 'discarding message because the queue is full'
[ndt_scan_matcher-36] [INFO] [1706590994.931021846] [localization.pose_estimator.ndt_scan_matcher]: Waiting for pcd loader service. Check the pointcloud_map_loader.
[rviz2-82] [INFO] [1706590994.980618426] [rviz2]: Message Filter dropping message: frame 'base_link' at time 68.783 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590995.076895840] [rviz2]: Message Filter dropping message: frame 'base_link' at time 68.883 for reason 'discarding message because the queue is full'
[component_container_mt-1] [INFO] [1706590995.095719142] [perception.object_recognition.detection.voxel_based_compare_map_filter]: service not available, waiting again ...
[component_container-27] [ERROR] [1706590995.214654536] [map.pointcloud_map_loader]: PCD metadata file not found: /home/shintarosakoda/Downloads/nishishinjuku_autoware_map_divided_without_metadata/pointcloud_map_metadata.yaml
[ekf_localizer-40] [WARN] [1706590995.225584397] [localization.pose_twist_fusion_filter.ekf_localizer]: The node is not activated. Provide initial pose to pose_initializer
[rviz2-82] [INFO] [1706590995.265770357] [rviz2]: Message Filter dropping message: frame 'base_link' at time 68.983 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590995.297999970] [rviz2]: Message Filter dropping message: frame 'base_link' at time 69.083 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590995.361397183] [rviz2]: Message Filter dropping message: frame 'base_link' at time 69.183 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590995.457273137] [rviz2]: Message Filter dropping message: frame 'base_link' at time 69.283 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590995.584966048] [rviz2]: Message Filter dropping message: frame 'base_link' at time 69.383 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590995.713184015] [rviz2]: Message Filter dropping message: frame 'base_link' at time 69.483 for reason 'discarding message because the queue is full'
[rviz2-82] [INFO] [1706590995.777173097] [rviz2]: Message Filter dropping message: frame 'base_link' at time 69.583 for reason 'discarding message because the queue is full'
[component_container_mt-77] [INFO] [1706590995.852325872] [default_ad_api.node.operation_mode]: control, planning, localization, perception component state is unhealthy. Autonomous is not available.
[rviz2-82] [INFO] [1706590995.872599750] [rviz2]: Message Filter dropping message: frame 'base_link' at time 69.683 for reason 'discarding message because the queue is full'
[ndt_scan_matcher-36] [INFO] [1706590995.931498228] [localization.pose_estimator.ndt_scan_matcher]: Waiting for pcd loader service. Check the pointcloud_map_loader.
[rviz2-82] [INFO] [1706590996.001703225] [rviz2]: Message Filter dropping message: frame 'base_link' at time 69.783 for reason 'discarding message because the queue is full'
[component_container_mt-1] [INFO] [1706590996.096227737] [perception.object_recognition.detection.voxel_based_compare_map_filter]: service not available, waiting again ...
[rviz2-82] [INFO] [1706590996.097127921] [rviz2]: Message Filter dropping message: frame 'base_link' at time 69.883 for reason 'discarding message because the queue is full'
[component_container-66] [INFO] [1706590996.181444623] [planning.mission_planning.mission_planner]: waiting odometry... Route API is not ready.
[rviz2-82] [INFO] [1706590996.193463338] [rviz2]: Message Filter dropping message: frame 'base_link' at time 69.983 for reason 'discarding message because the queue is full'
[component_container-27] [ERROR] [1706590996.214784703] [map.pointcloud_map_loader]: PCD metadata file not found: /home/shintarosakoda/Downloads/nishishinjuku_autoware_map_divided_without_metadata/pointcloud_map_metadata.yaml

Note: If you place the pointcloud_map_metadata.yaml after the error message appears, the map_loader startup sequence itself will probably proceed, but it is unclear whether other Autoware modules will work properly after a long wait. It is safer to restart Autoware.

Tests performed

  • It has been confirmed that Autoware works properly if pointcloud_map_metadata.yaml is present (in AWSIM).
  • It has been confirmed that the above error message continues to appear if pointcloud_map_metadata.yaml is missing (in AWSIM).

Effects on system behavior

The error message will change.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@SakodaShintaro SakodaShintaro self-assigned this Jan 30, 2024
@github-actions github-actions bot added the component:map Map creation, storage, and loading. (auto-assigned) label Jan 30, 2024
@SakodaShintaro SakodaShintaro added tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) and removed component:map Map creation, storage, and loading. (auto-assigned) labels Jan 30, 2024
@TaikiYamada4
Copy link
Contributor

@SakodaShintaro
I confirmed in my local environment via planning_simulator that

  • Normally launches if pointcloud_map_metadata.yaml exists or the map is not divided.
  • Keep streaming error messages if pointcloud_map_metadata.yaml is missing.
    • The pointcloud map is far away in rviz at this point, and no lanelet appears.
  • Autoware starts to work fine if I drag-and-drop a valid pointcloud_map_metadata.yaml to the map directory, even if Autoware is running.

It seems fine to me, but do you expect these behaviors? If so, I'd like to approve this.

@SakodaShintaro
Copy link
Contributor Author

@TaikiYamada4
I'm not familiar with planning_simulator, so please let me know.
Looking at the tutorial below, it seems that the kashiwanoha_map is used.

https://autowarefoundation.github.io/autoware-documentation/main/tutorials/scenario-simulation/planning-simulation/scenario-test-simulation/

kashiwanoha_map is https://github.com/tier4/scenario_simulator_v2/tree/master/map/kashiwanoha_map/map

In that case, there was no pointcloud_map_metadata.yaml as default, and the map was not divided.
Did you use a manually divided map for verification?

@TaikiYamada4
Copy link
Contributor

@SakodaShintaro
Oh I just used a large map (cannot share in public though) which I generally test Autoware via logging_simulator, but I just tried planning_simulator instead since I don't have a proper rosbag to test this.

@SakodaShintaro
Copy link
Contributor Author

I misunderstood psim.
I have confirmed that it works fine, so there is no problem.

Copy link
Contributor

@TaikiYamada4 TaikiYamada4 left a comment

Choose a reason for hiding this comment

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

LGTM

@SakodaShintaro SakodaShintaro enabled auto-merge (squash) January 30, 2024 07:38
Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (47f265d) 14.40% compared to head (98e2f20) 14.40%.
Report is 2 commits behind head on main.

Files Patch % Lines
...intcloud_map_loader/pointcloud_map_loader_node.cpp 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6227      +/-   ##
==========================================
- Coverage   14.40%   14.40%   -0.01%     
==========================================
  Files        1906     1906              
  Lines      129839   129840       +1     
  Branches    37571    37572       +1     
==========================================
  Hits        18697    18697              
- Misses      90147    90148       +1     
  Partials    20995    20995              
Flag Coverage Δ *Carryforward flag
differential 26.71% <0.00%> (?)
total 14.40% <ø> (+<0.01%) ⬆️ Carriedforward from 47f265d

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SakodaShintaro SakodaShintaro merged commit 25bc636 into autowarefoundation:main Jan 30, 2024
30 of 33 checks passed
@SakodaShintaro SakodaShintaro deleted the fix/change_error_handling_about_pcd_metadata branch January 30, 2024 11:20
SakodaShintaro added a commit to SakodaShintaro/autoware.universe that referenced this pull request Feb 2, 2024
SakodaShintaro added a commit that referenced this pull request Feb 2, 2024
…a file (#6294)

Revert "fix(map_loader): change error handling when pcd_metadata file not found (#6227)"

This reverts commit 25bc636.
anhnv3991 pushed a commit to anhnv3991/autoware.universe that referenced this pull request Feb 13, 2024
…a file (autowarefoundation#6294)

Revert "fix(map_loader): change error handling when pcd_metadata file not found (autowarefoundation#6227)"

This reverts commit 25bc636.
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…nd (autowarefoundation#6227)

Changed error handling when pcd_metadata file not found

Signed-off-by: Shintaro Sakoda <[email protected]>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…a file (autowarefoundation#6294)

Revert "fix(map_loader): change error handling when pcd_metadata file not found (autowarefoundation#6227)"

This reverts commit 25bc636.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants