Skip to content

Commit

Permalink
perception: fix repeat function in hm_matcher.cc (ApolloAuto#11285)
Browse files Browse the repository at this point in the history
  • Loading branch information
daohu527 authored May 18, 2020
1 parent eac672b commit 184c04b
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions modules/perception/radar/lib/tracker/matcher/hm_matcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,9 @@ bool HMMatcher::RefinedTrack(const base::ObjectPtr &track_object,
double track_timestamp,
const base::ObjectPtr &radar_object,
double radar_timestamp) {
auto compute_distance = [](const base::ObjectPtr &object1, double timestamp1,
const base::ObjectPtr &object2,
double timestamp2) -> double {
double time_diff = timestamp2 - timestamp1;
return (object2->center - object1->center -
object1->velocity.cast<double>() * time_diff)
.head(2)
.norm();
};
double dist = 0.5 * compute_distance(track_object, track_timestamp,
double dist = 0.5 * DistanceBetweenObs(track_object, track_timestamp,
radar_object, radar_timestamp) +
0.5 * compute_distance(radar_object, radar_timestamp,
0.5 * DistanceBetweenObs(radar_object, radar_timestamp,
track_object, track_timestamp);

return dist < BaseMatcher::GetMaxMatchDistance();
Expand Down

0 comments on commit 184c04b

Please sign in to comment.