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(avoidance): fix invalid optional access #5804

Merged

fix(avoidance): fix invalid optional access

29517fd
Select commit
Loading
Failed to load commit list.
Merged

fix(avoidance): fix invalid optional access #5804

fix(avoidance): fix invalid optional access
29517fd
Select commit
Loading
Failed to load commit list.
Deleted GitHub App / Copilot for PRs succeeded Dec 7, 2023 in 2s

Analysis complete

Summary

Improved return-to-center shift line generation in behavior_path_avoidance_module. Added a threshold and adjusted the shift point condition to reduce redundant or invalid shift lines.

Walkthrough

  • Introduce a constant RETURN_SHIFT_THRESHOLD to define the minimum shift length for return-to-center shift lines (link)
  • Modify the condition for registering return-to-center shift points to check both the initial and the last shift lengths (link)
  • Avoid a potential null pointer dereference when accessing the last_ value by adding a has_value() check (link)

Poem

To avoid path collisions with care
We improved the shift line logic there
We added RETURN_SHIFT_THRESHOLD
To reduce the shift line wealth
And checked the last line in the pair

Emoji

🛣️🔧🚗

Include these descriptions in your pull request description by including the following marker tags:

  • copilot:all: all the content, in one go
  • copilot:summary: a one paragraph summary of the code changes
  • copilot:walkthrough: a step by step walkthrough of the code changes
  • copilot:poem: a poem about the code changes!
  • copilot:emoji: three emoji that capture the changes

Feedback is welcome. Simply add a comment to this PR of the form /copilot feedback [your comments here].

Details

Copilot for PRs is a limited technical preview from GitHub Next.

It's aim is to make it easier to write pull request descriptions by providing automatically generated suggestions based on the code changes.

To find out more go to https://githubnext.com/projects/copilot-for-pull-requests or come and chat with us on Discord

Progress:

File Status Duration
Summary & Walkthrough ✅ Finished 16 seconds
planning/behavior_path_avoidance_module/src/shift_line_generator.cpp ✅ Finished 9.5 seconds