Skip to content

Commit

Permalink
refactor(multi_object_tracker): use constexpr properly (#7206)
Browse files Browse the repository at this point in the history
reafctor multi_object_tracker

Signed-off-by: Ryuta Kambe <[email protected]>
  • Loading branch information
veqcc authored Jun 3, 2024
1 parent 1b7c600 commit 9a5e6c6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ BicycleTracker::BicycleTracker(
constexpr double p0_stddev_y = 0.5; // in object coordinate [m]
constexpr double p0_stddev_yaw =
tier4_autoware_utils::deg2rad(25); // in map coordinate [rad]
constexpr double p0_cov_x = std::pow(p0_stddev_x, 2.0);
constexpr double p0_cov_y = std::pow(p0_stddev_y, 2.0);
constexpr double p0_cov_yaw = std::pow(p0_stddev_yaw, 2.0);
constexpr double p0_cov_x = p0_stddev_x * p0_stddev_x;
constexpr double p0_cov_y = p0_stddev_y * p0_stddev_y;
constexpr double p0_cov_yaw = p0_stddev_yaw * p0_stddev_yaw;

const double cos_yaw = std::cos(yaw);
const double sin_yaw = std::sin(yaw);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ BigVehicleTracker::BigVehicleTracker(
constexpr double p0_stddev_y = 0.5; // in object coordinate [m]
constexpr double p0_stddev_yaw =
tier4_autoware_utils::deg2rad(25); // in map coordinate [rad]
constexpr double p0_cov_x = std::pow(p0_stddev_x, 2.0);
constexpr double p0_cov_y = std::pow(p0_stddev_y, 2.0);
constexpr double p0_cov_yaw = std::pow(p0_stddev_yaw, 2.0);
constexpr double p0_cov_x = p0_stddev_x * p0_stddev_x;
constexpr double p0_cov_y = p0_stddev_y * p0_stddev_y;
constexpr double p0_cov_yaw = p0_stddev_yaw * p0_stddev_yaw;

const double cos_yaw = std::cos(yaw);
const double sin_yaw = std::sin(yaw);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ NormalVehicleTracker::NormalVehicleTracker(
constexpr double p0_stddev_y = 0.3; // in object coordinate [m]
constexpr double p0_stddev_yaw =
tier4_autoware_utils::deg2rad(25); // in map coordinate [rad]
constexpr double p0_cov_x = std::pow(p0_stddev_x, 2.0);
constexpr double p0_cov_y = std::pow(p0_stddev_y, 2.0);
constexpr double p0_cov_yaw = std::pow(p0_stddev_yaw, 2.0);
constexpr double p0_cov_x = p0_stddev_x * p0_stddev_x;
constexpr double p0_cov_y = p0_stddev_y * p0_stddev_y;
constexpr double p0_cov_yaw = p0_stddev_yaw * p0_stddev_yaw;

const double cos_yaw = std::cos(yaw);
const double sin_yaw = std::sin(yaw);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ PedestrianTracker::PedestrianTracker(
constexpr double p0_stddev_y = 2.0; // in object coordinate [m]
constexpr double p0_stddev_yaw =
tier4_autoware_utils::deg2rad(1000); // in map coordinate [rad]
constexpr double p0_cov_x = std::pow(p0_stddev_x, 2.0);
constexpr double p0_cov_y = std::pow(p0_stddev_y, 2.0);
constexpr double p0_cov_yaw = std::pow(p0_stddev_yaw, 2.0);
constexpr double p0_cov_x = p0_stddev_x * p0_stddev_x;
constexpr double p0_cov_y = p0_stddev_y * p0_stddev_y;
constexpr double p0_cov_yaw = p0_stddev_yaw * p0_stddev_yaw;

const double cos_yaw = std::cos(yaw);
const double sin_yaw = std::sin(yaw);
Expand Down

0 comments on commit 9a5e6c6

Please sign in to comment.