Skip to content

Commit

Permalink
fix: use consider_pose_by_road_slope flag in EntityManager::spawnEntity
Browse files Browse the repository at this point in the history
Signed-off-by: Kotaro Yoshimoto <[email protected]>
  • Loading branch information
HansRobo committed Mar 1, 2024
1 parent 89dc17f commit 368ac88
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,13 @@ class EntityManager
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 = hdmap_utils_ptr_->toMapPose(*lanelet_pose).pose;
static bool consider_pose_by_road_slope =
getParameter<bool>("consider_pose_by_road_slope", false);
if (consider_pose_by_road_slope) {
entity_status.pose = hdmap_utils_ptr_->toMapPose(*lanelet_pose).pose;
} else {
entity_status.pose = pose;
}
} else {
entity_status.lanelet_pose_valid = false;
entity_status.pose = pose;
Expand Down

0 comments on commit 368ac88

Please sign in to comment.