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(autoware_freespace_planner, autoware_freespace_planning_algorithms): modify freespace planner to use node clock instead of system clock #9152

Merged

Conversation

stevenbrills
Copy link
Contributor

Description

Modified the autoware_freespace_planner and autoware_freespace_planning_algorithms packages to use the node clock instead of rclcpp detached clock. This allows the module to make use of sim time. Previously during simulation the parking trajectory would have system time in trajectory header messages causing downstream issues like non-clearance of trajectory buffers in motion planning based on elapsed time.

How was this PR tested?

Tested in sim.

Effects on system behavior

In the previous version, the use of system time in the free-space planner trajectory header causes the trajectory buffer downstream from clearing and therefore causing the is_steering_converged flag to never reset when simulating causing the system to not change from Parking back to Lane Driving. Now, when use_sim_time is used, the parking trajectory also reflects the correct time and the buffer can be cleared appropriately.

…ng_algorithms packages to use the node clock instead of rclcpp detached clock. This allows the module to make use of sim time. Previously during simulation the parking trajectory would have system time in trajectory header messages causing downstream issues like non-clearance of trajectory buffers in motion planning based on elapsed time.
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Oct 24, 2024
Copy link

github-actions bot commented Oct 24, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

@stevenbrills stevenbrills changed the title Modify Freespace Planner to use Node Time (to reflect use_sim_time in module) Instead of System Time fix(autoware_freespace_planner, autoware_freespace_planning_algorithms): Modify Freespace Planner to use Node Time (to reflect use_sim_time in module) Instead of System Time Oct 24, 2024
@stevenbrills stevenbrills changed the title fix(autoware_freespace_planner, autoware_freespace_planning_algorithms): Modify Freespace Planner to use Node Time (to reflect use_sim_time in module) Instead of System Time fix(autoware_freespace_planner, autoware_freespace_planning_algorithms): modify freespace planner to use node clock instead of system clock Oct 24, 2024
@stevenbrills stevenbrills requested a review from mkquda October 28, 2024 17:34
@maxime-clem maxime-clem added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Oct 29, 2024
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 39.58333% with 29 lines in your changes missing coverage. Please review.

Project coverage is 30.07%. Comparing base (248bba7) to head (c1e645d).
Report is 69 commits behind head on main.

Files with missing lines Patch % Lines
...freespace_planning_algorithms/src/astar_search.cpp 15.00% 17 Missing ⚠️
...dule/src/pull_over_planner/freespace_pull_over.cpp 0.00% 4 Missing ⚠️
...th_start_planner_module/src/freespace_pull_out.cpp 0.00% 4 Missing ⚠️
...oware_freespace_planner/freespace_planner_node.cpp 33.33% 2 Missing ⚠️
...autoware/freespace_planning_algorithms/rrtstar.hpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9152      +/-   ##
==========================================
- Coverage   30.09%   30.07%   -0.02%     
==========================================
  Files        1340     1346       +6     
  Lines      103652   103720      +68     
  Branches    40362    40371       +9     
==========================================
+ Hits        31190    31195       +5     
- Misses      69450    69513      +63     
  Partials     3012     3012              
Flag Coverage Δ *Carryforward flag
differential 22.53% <39.58%> (?)
total 30.08% <ø> (-0.01%) ⬇️ Carriedforward from 248bba7

*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.

@stevenbrills
Copy link
Contributor Author

Hi @mkquda, is there anything else to be re-evaluated?

Copy link
Contributor

@mkquda mkquda left a comment

Choose a reason for hiding this comment

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

LGTM.

@kosuke55
Copy link
Contributor

kosuke55 commented Nov 7, 2024

There are other parts of autoware that use rclcpp::Clock() besides this PR change, do they all need to be replaced with node clock correctly?

@stevenbrills
Copy link
Contributor Author

There are other parts of autoware that use rclcpp::Clock() besides this PR change, do they all need to be replaced with node clock correctly?

@kosuke55 Only if they are being used to populate headers or are directly/indirectly being used by consuming nodes as a reference of when the message was created in the context of the run either in real system time or simulated time. There are places where a detached clock is used for measuring algorithm processing time which does not need to change.

@stevenbrills
Copy link
Contributor Author

stevenbrills commented Nov 7, 2024

@mkquda I forgot to add signoffs to the commit messages, and I am unable to rebase and add the signoffs directly to the pull request due to insufficient permissions. Is there a workaround?

@stevenbrills
Copy link
Contributor Author

@maxime-clem @mkquda
Gentle reminder on this pending merge.

@mkquda mkquda merged commit 9d8bd0c into autowarefoundation:main Nov 28, 2024
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) 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.

6 participants