46 auto& obj = new_object->object_ptr;
47 hull_.GetConvexHull(obj->radar4d_supplement.cloud_world, &obj->polygon);
50 if (track_data->age_ > 0) {
52 if (new_object->direction.dot(latest_object->direction) < 0) {
53 new_object->direction *= -1;
55 static const double kMovingAverage = 0.6;
56 new_object->direction =
57 latest_object->output_direction * (1 - kMovingAverage) +
58 new_object->direction * kMovingAverage;
59 new_object->direction.normalize();
61 Eigen::Vector3f local_direction = obj->direction;
62 Eigen::Vector3d local_center = obj->center;
63 Eigen::Vector3f local_size = obj->size;
64 obj->direction = new_object->direction.cast<
float>();
67 new_object->center = obj->center;
68 new_object->size = obj->size.cast<
double>();
70 obj->center = local_center;
71 obj->size = local_size;
72 obj->direction = local_direction;
73 new_object->output_center = new_object->center;
74 new_object->output_direction = new_object->direction;
75 new_object->output_size = new_object->size;
bool GetProtoFromFile(const std::string &file_name, google::protobuf::Message *message)
Parses the content of the file specified by the file_name as a representation of protobufs,...