|
@@ -240,26 +240,33 @@ void FenceController::wheelMsgHandlingThread(FenceController* fc){
|
|
|
fc->m_cloud_mutex.unlock();
|
|
|
// std::cout << "--------callback get cloud, size: "<<total_cloud->size()<<"------" << std::endl;
|
|
|
LOG(INFO)<< "--------callback get cloud, size: "<<total_cloud->size();
|
|
|
+
|
|
|
+ char cloud_txt_filename[255];
|
|
|
+ memset(cloud_txt_filename, 0, 255);
|
|
|
+ char whole_filename[255];
|
|
|
+ memset(whole_filename, 0, 255);
|
|
|
if (total_cloud->size() > 0 &&
|
|
|
fc->p_region_workers[i]->get_wheel_result(total_cloud, x, y, c, wheelbase, width))
|
|
|
{
|
|
|
result.set_correctness(true);
|
|
|
- // save cloud txt
|
|
|
- if (fc->m_global_param.has_data_path()&& fc->m_global_param.data_path() != "")
|
|
|
- {
|
|
|
- PathCreator path_creator;
|
|
|
- path_creator.CreateDatePath(fc->m_global_param.data_path(), false);
|
|
|
- char cloud_txt_filename[255];
|
|
|
- memset(cloud_txt_filename, 0, 255);
|
|
|
- sprintf(cloud_txt_filename, "%s/%s.txt", path_creator.GetCurPath().c_str(), result.time().c_str());
|
|
|
- fc->save_cloud_txt(cloud_txt_filename, total_cloud);
|
|
|
- // std::cout << " save cloud " << cloud_txt_filename << std::endl;
|
|
|
- LOG(INFO)<<" save cloud " << cloud_txt_filename;
|
|
|
- }
|
|
|
+ sprintf(cloud_txt_filename, "/%s.txt", result.time().c_str());
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
result.set_correctness(false);
|
|
|
+ sprintf(cloud_txt_filename, "/%s%s.txt", result.time().c_str(), "_failed");
|
|
|
+ }
|
|
|
+
|
|
|
+ // save cloud txt
|
|
|
+ if (fc->m_global_param.has_data_path() && fc->m_global_param.data_path() != "")
|
|
|
+ {
|
|
|
+ PathCreator path_creator;
|
|
|
+ path_creator.CreateDatePath(fc->m_global_param.data_path(), false);
|
|
|
+ sprintf(whole_filename, "%s%s", path_creator.GetCurPath().c_str(), cloud_txt_filename);
|
|
|
+
|
|
|
+ fc->save_cloud_txt(whole_filename, total_cloud);
|
|
|
+ // std::cout << " save cloud " << whole_filename << std::endl;
|
|
|
+ LOG(INFO) << " save cloud " << whole_filename;
|
|
|
}
|
|
|
// std::cout << "--------callback get result------" << std::endl;
|
|
|
LOG(INFO)<<"--------callback get result------";
|