Skip to content

Commit

Permalink
fix(simple_sensor_simulator): fix after detection_sensor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoszynski committed Dec 10, 2024
1 parent bb0a6bf commit 8cf2c39
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,12 @@ auto DetectionSensorBase::isOnOrAboveEgoPlane(
simulation_interface::toMsg(entity_pose, entity_pose_ros);
simulation_interface::toMsg(ego_pose, ego_pose_ros);

const auto hasEgoOrientationChanged = [this, &entity_pose_ros]() {
const auto hasEgoOrientationChanged = [this, &ego_pose_ros]() {
if (previous_ego_pose_opt_) {
return true;
} else {
return math::geometry::getAngleDifference(
entity_pose_ros.orientation, previous_ego_pose_opt_->orientation) >
rotation_threshold_;
ego_pose_ros.orientation, previous_ego_pose_opt_->orientation) > rotation_threshold_;
}
};

Expand All @@ -103,7 +102,7 @@ auto DetectionSensorBase::isOnOrAboveEgoPlane(
ego_plane_opt_.emplace(
entity_pose_ros.position, math::geometry::getNormalVector(entity_pose_ros.orientation));
}
previous_ego_pose_opt_ = entity_pose_ros;
previous_ego_pose_opt_ = ego_pose_ros;

// if other entity is just above ego return true
if (entity_pose_ros.position.z >= (ego_pose_ros.position.z - max_downward_z_offset_)) {
Expand Down

0 comments on commit 8cf2c39

Please sign in to comment.