-
Notifications
You must be signed in to change notification settings - Fork 677
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(obstacle_cruise_planner): support pointcloud-based obstacles #6907
feat(obstacle_cruise_planner): support pointcloud-based obstacles #6907
Conversation
@@ -87,6 +117,8 @@ struct Obstacle | |||
std::vector<PredictedPath> predicted_paths; | |||
double ego_to_obstacle_distance; | |||
double lat_dist_from_obstacle_to_traj; | |||
PointCloud pointcloud; | |||
bool pointcloud_repr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain the purpose of this variable?
twist.linear.x = twist.linear.y = twist.angular.z = 0.0; | ||
|
||
Eigen::Vector4d centroid; | ||
pcl::compute3DCentroid(pointcloud, centroid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you calculate centroid of pointcloud?
if ( | ||
(obstacle.source_type == Obstacle::SourceType::PREDICTED_OBJECT && | ||
!isStopObstacle(obstacle.classification.label)) || | ||
(obstacle.source_type == Obstacle::SourceType::POINTCLOUD && !use_pointcloud_for_stop_)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[imo] it's a little bit difficult to understand this condition.
This is my suggestion.
if (
(obstacle.source_type == Obstacle::SourceType::PREDICTED_OBJECT &&
!isStopObstacle(obstacle.classification.label)) {
return std::nullopt;
}
if (
(obstacle.source_type == Obstacle::SourceType::POINTCLOUD && !use_pointcloud_for_stop_)) {
return std::nullopt;
}
!enable_slow_down_planning_ || | ||
(obstacle.source_type == Obstacle::SourceType::PREDICTED_OBJECT && | ||
!isSlowDownObstacle(obstacle.classification.label)) || | ||
(obstacle.source_type == Obstacle::SourceType::POINTCLOUD && !use_pointcloud_for_slow_down_)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6907 +/- ##
==========================================
- Coverage 28.69% 28.32% -0.37%
==========================================
Files 1587 1585 -2
Lines 116143 115614 -529
Branches 49559 49305 -254
==========================================
- Hits 33326 32750 -576
- Misses 73723 73871 +148
+ Partials 9094 8993 -101
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…towarefoundation#6907) * add pointcloud to obstacle properties * add tf listener & pointcloud subscriber * add parameters for pointcloud obstacle * add type aliases * convert pointcloud to obstacle * add type alias * add polygon conversion for pointcloud obstacle * initialize twist & pose of pointcloud obstacle * overload to handle both obstacle & predicted path * implement ego behavior determination against pointcloud obstacles * generate obstacle from point * revert getCollisionIndex() * generate obstacle from each point in cloud * set pointcloud obstacle velocity to 0 * use tf buffer & listener with pointers * update latest pointcloud data * add topic remap * remove unnecessary includes * set slow down obstacle velocity to 0 * add flag to consider pointcloud obstacle for stopping & slowing down * style(pre-commit): autofix * downsample pointcloud using voxel grid * change shape type of pointcloud obstacle to polygon * convert pointcloud to obstacle by clustering * add parameters for clustering * add max_num_points parameter to dummy object * downsample pointcloud when the number of points is larger than max_num_points * add max_num_points property to dummy bus * add parameters for pointcloud based obstacles * store pointcloud in obstacle struct * change obstacle conversion method * migrate previous changes to new package * store necessary points only * move use_pointcloud to common parameter * extract necessary points from pointcloud * add use_pointcloud parameter to planner interface * fix obstacle conversion * fix collision point determination * simplify pointcloud transformation * style(pre-commit): autofix * fix collision point determination * pick nearest stop collision point * check collision for every point in cluster * migrate previous changes to new files * reduce diff * remove use_pointcloud parameter * add parameters for pointcloud filtering * add autoware namespace * Revert "add max_num_points parameter to dummy object" This reverts commit 98bcd08. * Revert "downsample pointcloud when the number of points is larger than max_num_points" This reverts commit fb00b59. * Revert "add max_num_points property to dummy bus" This reverts commit 5f9e4ab. * feat(diagnostic_graph_utils): add logging tool Signed-off-by: Takagi, Isamu <[email protected]> * fix all OK Signed-off-by: Takagi, Isamu <[email protected]> * feat(default_ad_api): add log when operation mode change fails Signed-off-by: Takagi, Isamu <[email protected]> * get only the necessary one of object or pointcloud data * addfield for obstacle source type * enable simultaneous use of PredictedObjects and PointCloud * separate convertToObstacles() by source type * avoid using pointer * reduce diff * make nest shallower * define vector concatenate function * shorten variable names * fix redundant condition --------- Signed-off-by: Takagi, Isamu <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Takagi, Isamu <[email protected]> Co-authored-by: Satoshi OTA <[email protected]> Signed-off-by: palas21 <[email protected]>
…towarefoundation#6907) * add pointcloud to obstacle properties * add tf listener & pointcloud subscriber * add parameters for pointcloud obstacle * add type aliases * convert pointcloud to obstacle * add type alias * add polygon conversion for pointcloud obstacle * initialize twist & pose of pointcloud obstacle * overload to handle both obstacle & predicted path * implement ego behavior determination against pointcloud obstacles * generate obstacle from point * revert getCollisionIndex() * generate obstacle from each point in cloud * set pointcloud obstacle velocity to 0 * use tf buffer & listener with pointers * update latest pointcloud data * add topic remap * remove unnecessary includes * set slow down obstacle velocity to 0 * add flag to consider pointcloud obstacle for stopping & slowing down * style(pre-commit): autofix * downsample pointcloud using voxel grid * change shape type of pointcloud obstacle to polygon * convert pointcloud to obstacle by clustering * add parameters for clustering * add max_num_points parameter to dummy object * downsample pointcloud when the number of points is larger than max_num_points * add max_num_points property to dummy bus * add parameters for pointcloud based obstacles * store pointcloud in obstacle struct * change obstacle conversion method * migrate previous changes to new package * store necessary points only * move use_pointcloud to common parameter * extract necessary points from pointcloud * add use_pointcloud parameter to planner interface * fix obstacle conversion * fix collision point determination * simplify pointcloud transformation * style(pre-commit): autofix * fix collision point determination * pick nearest stop collision point * check collision for every point in cluster * migrate previous changes to new files * reduce diff * remove use_pointcloud parameter * add parameters for pointcloud filtering * add autoware namespace * Revert "add max_num_points parameter to dummy object" This reverts commit 98bcd08. * Revert "downsample pointcloud when the number of points is larger than max_num_points" This reverts commit fb00b59. * Revert "add max_num_points property to dummy bus" This reverts commit 5f9e4ab. * feat(diagnostic_graph_utils): add logging tool Signed-off-by: Takagi, Isamu <[email protected]> * fix all OK Signed-off-by: Takagi, Isamu <[email protected]> * feat(default_ad_api): add log when operation mode change fails Signed-off-by: Takagi, Isamu <[email protected]> * get only the necessary one of object or pointcloud data * addfield for obstacle source type * enable simultaneous use of PredictedObjects and PointCloud * separate convertToObstacles() by source type * avoid using pointer * reduce diff * make nest shallower * define vector concatenate function * shorten variable names * fix redundant condition --------- Signed-off-by: Takagi, Isamu <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Takagi, Isamu <[email protected]> Co-authored-by: Satoshi OTA <[email protected]>
) * add pointcloud to obstacle properties * add tf listener & pointcloud subscriber * add parameters for pointcloud obstacle * add type aliases * convert pointcloud to obstacle * add type alias * add polygon conversion for pointcloud obstacle * initialize twist & pose of pointcloud obstacle * overload to handle both obstacle & predicted path * implement ego behavior determination against pointcloud obstacles * generate obstacle from point * revert getCollisionIndex() * generate obstacle from each point in cloud * set pointcloud obstacle velocity to 0 * use tf buffer & listener with pointers * update latest pointcloud data * add topic remap * remove unnecessary includes * set slow down obstacle velocity to 0 * add flag to consider pointcloud obstacle for stopping & slowing down * style(pre-commit): autofix * downsample pointcloud using voxel grid * change shape type of pointcloud obstacle to polygon * convert pointcloud to obstacle by clustering * add parameters for clustering * add max_num_points parameter to dummy object * downsample pointcloud when the number of points is larger than max_num_points * add max_num_points property to dummy bus * add parameters for pointcloud based obstacles * store pointcloud in obstacle struct * change obstacle conversion method * migrate previous changes to new package * store necessary points only * move use_pointcloud to common parameter * extract necessary points from pointcloud * add use_pointcloud parameter to planner interface * fix obstacle conversion * fix collision point determination * simplify pointcloud transformation * style(pre-commit): autofix * fix collision point determination * pick nearest stop collision point * check collision for every point in cluster * migrate previous changes to new files * reduce diff * remove use_pointcloud parameter * add parameters for pointcloud filtering * add autoware namespace * Revert "add max_num_points parameter to dummy object" This reverts commit 98bcd08. * Revert "downsample pointcloud when the number of points is larger than max_num_points" This reverts commit fb00b59. * Revert "add max_num_points property to dummy bus" This reverts commit 5f9e4ab. * feat(diagnostic_graph_utils): add logging tool Signed-off-by: Takagi, Isamu <[email protected]> * fix all OK Signed-off-by: Takagi, Isamu <[email protected]> * feat(default_ad_api): add log when operation mode change fails Signed-off-by: Takagi, Isamu <[email protected]> * get only the necessary one of object or pointcloud data * addfield for obstacle source type * enable simultaneous use of PredictedObjects and PointCloud * separate convertToObstacles() by source type * avoid using pointer * reduce diff * make nest shallower * define vector concatenate function * shorten variable names * fix redundant condition --------- Signed-off-by: Takagi, Isamu <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Takagi, Isamu <[email protected]> Co-authored-by: Satoshi OTA <[email protected]>
…towarefoundation#6907) * add pointcloud to obstacle properties * add tf listener & pointcloud subscriber * add parameters for pointcloud obstacle * add type aliases * convert pointcloud to obstacle * add type alias * add polygon conversion for pointcloud obstacle * initialize twist & pose of pointcloud obstacle * overload to handle both obstacle & predicted path * implement ego behavior determination against pointcloud obstacles * generate obstacle from point * revert getCollisionIndex() * generate obstacle from each point in cloud * set pointcloud obstacle velocity to 0 * use tf buffer & listener with pointers * update latest pointcloud data * add topic remap * remove unnecessary includes * set slow down obstacle velocity to 0 * add flag to consider pointcloud obstacle for stopping & slowing down * style(pre-commit): autofix * downsample pointcloud using voxel grid * change shape type of pointcloud obstacle to polygon * convert pointcloud to obstacle by clustering * add parameters for clustering * add max_num_points parameter to dummy object * downsample pointcloud when the number of points is larger than max_num_points * add max_num_points property to dummy bus * add parameters for pointcloud based obstacles * store pointcloud in obstacle struct * change obstacle conversion method * migrate previous changes to new package * store necessary points only * move use_pointcloud to common parameter * extract necessary points from pointcloud * add use_pointcloud parameter to planner interface * fix obstacle conversion * fix collision point determination * simplify pointcloud transformation * style(pre-commit): autofix * fix collision point determination * pick nearest stop collision point * check collision for every point in cluster * migrate previous changes to new files * reduce diff * remove use_pointcloud parameter * add parameters for pointcloud filtering * add autoware namespace * Revert "add max_num_points parameter to dummy object" This reverts commit 98bcd08. * Revert "downsample pointcloud when the number of points is larger than max_num_points" This reverts commit fb00b59. * Revert "add max_num_points property to dummy bus" This reverts commit 5f9e4ab. * feat(diagnostic_graph_utils): add logging tool Signed-off-by: Takagi, Isamu <[email protected]> * fix all OK Signed-off-by: Takagi, Isamu <[email protected]> * feat(default_ad_api): add log when operation mode change fails Signed-off-by: Takagi, Isamu <[email protected]> * get only the necessary one of object or pointcloud data * addfield for obstacle source type * enable simultaneous use of PredictedObjects and PointCloud * separate convertToObstacles() by source type * avoid using pointer * reduce diff * make nest shallower * define vector concatenate function * shorten variable names * fix redundant condition --------- Signed-off-by: Takagi, Isamu <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Takagi, Isamu <[email protected]> Co-authored-by: Satoshi OTA <[email protected]>
Description
Make
obstacle_cruise_planner
compatible withsensor_msgs::msg::PointCloud2
-based obstacles.The node subscribes to a
sensor_msgs::msg::PointCloud2
topic and converts the point cloud into obstacles by the following steps:Stop and slow down planning are performed with the same trajectory generation algorithm as for ML-based (
autoware_perception_msgs::msg::PredictedObject
) obstacles.Cruising and yielding are not supported since point cloud-based obstacles have no velocity information.
Margin adjustment on curves (#4952) is also unsupported due to the following reason:
launch PR: autowarefoundation/autoware_launch#980
Tests performed
Psim
with the following changes to obstacle_cruise_planner.param.yaml:
Screencast.from.2024.06.27.16.40.32.webm
Evaluator:
Effects on system behavior
It is confirmed that the changes do not affect the behavior when the point cloud handling is disabled.
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.
After all checkboxes are checked, anyone who has write access can merge the PR.