Skip to content

Commit

Permalink
fix: fit WorldPosition to lanelet in spawn function
Browse files Browse the repository at this point in the history
Signed-off-by: Kotaro Yoshimoto <[email protected]>
  • Loading branch information
HansRobo committed Feb 27, 2024
1 parent d49c88c commit 6631065
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,6 @@ class EntityManager
entity_status.lanelet_pose = static_cast<LaneletPose>(pose);
entity_status.lanelet_pose_valid = true;
} else {
entity_status.pose = pose;

/// @note If the entity is pedestrian or misc object, we have to consider matching to crosswalk lanelet.
if (const auto lanelet_pose = toLaneletPose(
pose, parameters.bounding_box,
Expand All @@ -541,8 +539,11 @@ class EntityManager
lanelet_pose) {
entity_status.lanelet_pose = *lanelet_pose;
entity_status.lanelet_pose_valid = true;
// @note fix z, roll and pitch to fitting to the lanelet
entity_status.pose = toMapPose(*lanelet_pose);
} else {
entity_status.lanelet_pose_valid = false;
entity_status.pose = pose;
}
}

Expand Down

0 comments on commit 6631065

Please sign in to comment.