Commit c252fdf7 authored by oscar's avatar oscar

提交测试

parent 8944a2ed
......@@ -43,7 +43,7 @@ double correct_angle(std::vector<point2d>& points)
double alpha = dX.transpose() * orientation;
if (alpha < 0)
orientation = -orientation;
SDK_LOG(SDK_INFO, "correct_angle orientation[0] = %f, orientation[1] = %f", orientation[0], orientation[1]);
SDK_LOG(SDK_INFO, "correct_angle alpha = %f, orientation[0] = %f, orientation[1] = %f", alpha, orientation[0], orientation[1]);
double center_rot_y = atan2(orientation[1], orientation[0]);
return center_rot_y;
}
......
......@@ -241,11 +241,11 @@ void TrackingRos::Init(ros::NodeHandle& nh)
double angle = correct_angle(tests);
SDK_LOG(SDK_INFO, "test correct_angle = %f", angle);
tests.clear();
tests.push_back(point2d(1, -1));
tests.push_back(point2d(2, -2));
tests.push_back(point2d(3, -3));
tests.push_back(point2d(4, -4));
tests.push_back(point2d(5, -5));
tests.push_back(point2d(5, 5));
tests.push_back(point2d(4, 4));
tests.push_back(point2d(3, 3));
tests.push_back(point2d(2, 2));
tests.push_back(point2d(1, 1));
angle = correct_angle(tests);
SDK_LOG(SDK_INFO, "test2 correct_angle = %f", angle);
tests.clear();
......@@ -257,11 +257,11 @@ void TrackingRos::Init(ros::NodeHandle& nh)
angle = correct_angle(tests);
SDK_LOG(SDK_INFO, "test3 correct_angle = %f", angle);
tests.clear();
tests.push_back(point2d(-1, -1));
tests.push_back(point2d(-2, -2));
tests.push_back(point2d(-3, -3));
tests.push_back(point2d(-4, -4));
tests.push_back(point2d(-5, -5));
tests.push_back(point2d(-5, 5));
tests.push_back(point2d(-4, 4));
tests.push_back(point2d(-3, 3));
tests.push_back(point2d(-2, 2));
tests.push_back(point2d(-1, 1));
angle = correct_angle(tests);
SDK_LOG(SDK_INFO, "test4 correct_angle = %f", angle);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment