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

refactor(lane_change): separate path-related function to utils/path #9633

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zulfaqar-azmi-t4
Copy link
Contributor

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 commented Dec 12, 2024

Description

Move candidate path generator/constructor-related function to utils/path.hpp/cpp.

If we planning on adding new path generation functions, utils.hpp/cpp file might be overcrowded. So for maintainability purpose, it is better to isolate these functions.

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Dec 12, 2024
Copy link

github-actions bot commented Dec 12, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 marked this pull request as ready for review December 12, 2024 14:27
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 marked this pull request as draft December 13, 2024 01:57
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 marked this pull request as ready for review December 16, 2024 05:23
@@ -60,15 +61,9 @@ using geometry_msgs::msg::Pose;
using geometry_msgs::msg::Twist;
using path_safety_checker::CollisionCheckDebugMap;
using tier4_planning_msgs::msg::PathWithLaneId;

rclcpp::Logger get_logger();
Copy link
Contributor

Choose a reason for hiding this comment

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

do you need to declare it in the header?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want dont want to re-use the logger in utils/path, so this have to be in the header.

Comment on lines 161 to 164
const CommonDataPtr & common_data_ptr, const lanelet::ConstLanelets & target_lanes,
const Pose & lane_changing_start_pose, const double target_lane_length,
const double lane_changing_length, const double lane_changing_velocity,
const double buffer_for_next_lane_change)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can get target_lanes, target_lane_length and buffer_for_next_lane_changefrom common_data_ptr
Just to reduce number of inputs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

since it is only used in the old calcTerminalLaneChange, as discussed yesterday, I remove the function together with the calcTerminalLaneChange function.

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)
Projects
Status: To Triage
Development

Successfully merging this pull request may close these issues.

2 participants