38 if (pitch_angle ==
nullptr) {
39 AERROR <<
"pitch_angle is not available";
43 if (!LoadEgoLaneline(*options.
lane_objects, &ego_lane)) {
44 AINFO <<
"Failed to get the ego lane.";
48 double cam_ori[4] = {0};
55 c2w(0, 0), c2w(0, 1), c2w(0, 2), c2w(0, 3), c2w(1, 0), c2w(1, 1),
56 c2w(1, 2), c2w(1, 3), c2w(2, 0), c2w(2, 1), c2w(2, 2), c2w(2, 3),
59 ADEBUG <<
"c2w transform this frame:\n"
60 << p2w[0] <<
", " << p2w[1] <<
", " << p2w[2] <<
", " << p2w[3] <<
"\n"
61 << p2w[4] <<
", " << p2w[5] <<
", " << p2w[6] <<
", " << p2w[7] <<
"\n"
62 << p2w[8] <<
", " << p2w[9] <<
", " << p2w[10] <<
", " << p2w[11];
70 if (!is_first_frame_) {
71 time_diff_ = fabsf(
static_cast<float>(timestamp_cur_ - timestamp_pre_));
72 ADEBUG << timestamp_cur_ <<
" " << timestamp_pre_ << std::endl;
74 cam_coord_pre_pre_, &yaw_rate_, &velocity_);
75 std::string timediff_yawrate_velocity_text =
76 absl::StrCat(
"time_diff_: ", std::to_string(time_diff_).substr(0, 4),
77 " | yaw_rate_: ", std::to_string(yaw_rate_).substr(0, 4),
78 " | velocity_: ", std::to_string(velocity_).substr(0, 4));
79 ADEBUG << timediff_yawrate_velocity_text << std::endl;
83 calibrator_.
Process(ego_lane, velocity_, yaw_rate_, time_diff_);
87 AINFO <<
"#updated pitch angle: " << *pitch_angle;
88 AINFO <<
"#vanishing row: " << vanishing_row;
91 if (!is_first_frame_) {
92 memcpy(cam_coord_pre_pre_, cam_coord_pre_,
sizeof(
double) * 3);
94 is_first_frame_ =
false;
95 memcpy(cam_coord_pre_, cam_coord_cur_,
sizeof(
double) * 3);
96 timestamp_pre_ = timestamp_cur_;