Skip to content

Commit

Permalink
fix: ignore roll and pitch for creating drivable_area (tier4#205)
Browse files Browse the repository at this point in the history
* ignore current roll/pitch

* Update planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner/src/utilities.cpp

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>

* apply pre-commit

* autoware_utils -> tier4_autoware_utils

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>
  • Loading branch information
tkimura4 and yukkysaito authored Dec 22, 2021
1 parent 21f197a commit f520933
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion planning/behavior_path_planner/src/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,8 @@ OccupancyGrid generateDrivableArea(
const double yaw = tf2::getYaw(current_pose.pose.orientation);
const double origin_offset_x_m = (-width / 4) * cos(yaw) - (-height / 2) * sin(yaw);
const double origin_offset_y_m = (-width / 4) * sin(yaw) + (-height / 2) * cos(yaw);
grid_origin.pose.orientation = current_pose.pose.orientation;
// Only current yaw should be considered as the orientation of grid_origin.
grid_origin.pose.orientation = tier4_autoware_utils::createQuaternionFromYaw(yaw);
grid_origin.pose.position.x = current_pose.pose.position.x + origin_offset_x_m;
grid_origin.pose.position.y = current_pose.pose.position.y + origin_offset_y_m;
grid_origin.pose.position.z = current_pose.pose.position.z;
Expand Down

0 comments on commit f520933

Please sign in to comment.