Commit ee71b2c0 authored by oscar's avatar oscar

提交测试代码

parent 7b839569
......@@ -240,6 +240,30 @@ void TrackingRos::Init(ros::NodeHandle& nh)
tests.push_back(point2d(5, 5));
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));
angle = correct_angle(tests);
SDK_LOG(SDK_INFO, "test2 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));
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));
angle = correct_angle(tests);
SDK_LOG(SDK_INFO, "test4 correct_angle = %f", angle);
}
void TrackingRos::TrackingCallBackFunc(const jfx_common_msgs::det_tracking_arrayConstPtr& msg)//接受ros发过来的消息
......
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