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(path_generator): add path_generator package #138

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

Conversation

mitukou1109
Copy link

Description

This PR adds path_generator package, a simplified alternative of behavior_path_planner.

Related links

How was this PR tested?

Psim on a lanelet2 map with waypoints

Screencast.from.2024.11.29.16.11.24.webm

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Copy link

github-actions bot commented Dec 23, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

Copy link
Member

@youtalk youtalk left a comment

Choose a reason for hiding this comment

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

Since it’s a porting task, I’m keeping the review to a minimum.

planning/autoware_path_generator/package.xml Outdated Show resolved Hide resolved
planning/autoware_path_generator/src/node.hpp Show resolved Hide resolved
planning/autoware_path_generator/src/node.hpp Show resolved Hide resolved
Copy link
Member

@youtalk youtalk left a comment

Choose a reason for hiding this comment

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

Thank you for your revision. LGTM

@youtalk youtalk enabled auto-merge (squash) January 9, 2025 12:58
@kosuke55
Copy link

@takayuki5168
CI failed

updated cache in /github/home/.ros/rosdep/sources.cache
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
autoware_path_generator: Cannot locate rosdep definition for [tier4_planning_msgs]

can we use tier4 msgs in core?

@takayuki5168
Copy link

@kosuke55
In principle, we cannot use tier4's msgs in autoware.core.
The CI failure is fine for now since the AWE team is working on porting some of tier4's msgs to autoware's msgs in parallel.

@youtalk youtalk disabled auto-merge January 14, 2025 06:03
Copy link
Member

@youtalk youtalk left a comment

Choose a reason for hiding this comment

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

PathWithLaneId has been ported. Please use it instead.
autowarefoundation/autoware_internal_msgs#42

<depend>generate_parameter_library</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
<depend>tier4_planning_msgs</depend>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<depend>tier4_planning_msgs</depend>
<depend>autoware_internal_planning_msgs</depend>

Please make the same changes to the other sections as well.

Copy link
Author

Choose a reason for hiding this comment

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

The package uses autoware_trajectory internally, and it depends on tier4_planning_msgs::msg::PathPointWithLaneId. Should I ask the maintainer to migrate to autoware_internal_planning_msgs?

Copy link
Member

Choose a reason for hiding this comment

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

@mitsudome-r It seems that the autoware_motion_utils and autoware_trajectory packages also need to be ported, but is any work being done on them somewhere?

Copy link
Member

Choose a reason for hiding this comment

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

I found #171.


#include "autoware/path_generator/common_structs.hpp"

#include <tier4_planning_msgs/msg/path_with_lane_id.hpp>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#include <tier4_planning_msgs/msg/path_with_lane_id.hpp>
#include <autoware_internal_planning_msgs/msg/path_with_lane_id.hpp>

Comment on lines 28 to 29
using tier4_planning_msgs::msg::PathPointWithLaneId;
using tier4_planning_msgs::msg::PathWithLaneId;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
using tier4_planning_msgs::msg::PathPointWithLaneId;
using tier4_planning_msgs::msg::PathWithLaneId;
using autoware_internal_planning_msgs::msg::PathPointWithLaneId;
using autoware_internal_planning_msgs::msg::PathWithLaneId;

<depend>generate_parameter_library</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
<depend>tier4_planning_msgs</depend>
Copy link
Member

Choose a reason for hiding this comment

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

@mitsudome-r It seems that the autoware_motion_utils and autoware_trajectory packages also need to be ported, but is any work being done on them somewhere?

<depend>generate_parameter_library</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
<depend>tier4_planning_msgs</depend>
Copy link
Member

Choose a reason for hiding this comment

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

I found #171.

@youtalk
Copy link
Member

youtalk commented Jan 24, 2025

@mitukou1109 The autoware_internal_msgs and autoware_utils are now ready to use in this PR. Please revise it.

@mitukou1109
Copy link
Author

mitukou1109 commented Jan 27, 2025

It seems autoware_trajectory still does not support autoware_internal_planning_msgs::msg::PathWithLaneId, so the build won't pass.

@mitukou1109
Copy link
Author

Plus, it needs #170 to be merged due to its dependence on autoware_vehicle_info_utils.

@mitukou1109 mitukou1109 force-pushed the feat/path_generator branch 2 times, most recently from 4d0f7b8 to 538e248 Compare February 7, 2025 07:10
@sasakisasaki
Copy link
Contributor

@mitukou1109 (CC: @mitsudome-r @kosuke55)

Thank you for working on adding features! Sorry for making you wait for a while. Let me share the current situation.

Currently we are working on resolving package dependencies.

What we doing/found:

  • Checking dependency in autoware_trajectory
  • Found the autoware_trajectory has dependencies for autoware_motion_utils and it also has another dependency to autoware_interpolation
  • Thus, with @mitsudome-r , we are still doing dependency analysis not to miss the necessary packages to be ported

We'll continuously put the update here not to miss the ongoing updates. Again, thank you so much for your contribution!

Comment on lines 33 to 115
std::optional<lanelet::ConstLanelets> get_lanelets_within_route(
const lanelet::ConstLanelet & lanelet, const PlannerData & planner_data,
const geometry_msgs::msg::Pose & current_pose, const double backward_distance,
const double forward_distance);

std::optional<lanelet::ConstLanelets> get_lanelets_within_route_up_to(
const lanelet::ConstLanelet & lanelet, const PlannerData & planner_data, const double distance);

std::optional<lanelet::ConstLanelets> get_lanelets_within_route_after(
const lanelet::ConstLanelet & lanelet, const PlannerData & planner_data, const double distance);

std::optional<lanelet::ConstLanelet> get_previous_lanelet_within_route(
const lanelet::ConstLanelet & lanelet, const PlannerData & planner_data);

std::optional<lanelet::ConstLanelet> get_next_lanelet_within_route(
const lanelet::ConstLanelet & lanelet, const PlannerData & planner_data);

std::vector<std::pair<lanelet::ConstPoints3d, std::pair<double, double>>> get_waypoint_groups(
const lanelet::LaneletSequence & lanelet_sequence, const lanelet::LaneletMap & lanelet_map,
const double group_separation_threshold, const double interval_margin_ratio);

std::optional<std::vector<geometry_msgs::msg::Point>> get_path_bound(
const lanelet::CompoundLineString2d & lanelet_bound,
const lanelet::CompoundLineString2d & lanelet_centerline, const double s_start,
const double s_end);

Choose a reason for hiding this comment

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

@mitukou1109
could you add doxygen comment? (at least @brief, @param, @return)

Signed-off-by: mitukou1109 <[email protected]>
mitukou1109 and others added 16 commits February 13, 2025 14:40
Signed-off-by: mitukou1109 <[email protected]>
Signed-off-by: mitukou1109 <[email protected]>
Co-authored-by: Yutaka Kondo <[email protected]>
Signed-off-by: mitukou1109 <[email protected]>
Co-authored-by: Yutaka Kondo <[email protected]>
Signed-off-by: mitukou1109 <[email protected]>
Co-authored-by: Yutaka Kondo <[email protected]>
Signed-off-by: mitukou1109 <[email protected]>
Signed-off-by: mitukou1109 <[email protected]>
Signed-off-by: mitukou1109 <[email protected]>
Signed-off-by: mitukou1109 <[email protected]>
@sasakisasaki
Copy link
Contributor

Now we are getting ready for porting the autoware_trajectory. After this, we'll be able to merge this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants