Bladeren bron

解决点云路径保存问题

zx 4 jaren geleden
bovenliggende
commit
43edc44cc8
5 gewijzigde bestanden met toevoegingen van 5 en 27 verwijderingen
  1. 0 2
      laser/Laser.cpp
  2. 2 6
      laser/LivoxLaser.cpp
  3. 1 1
      laser/LivoxMid100Laser.cpp
  4. 2 12
      laser/laser_task_command.cpp
  5. 0 6
      laser/laser_task_command.h

+ 0 - 2
laser/Laser.cpp

@@ -230,8 +230,6 @@ Error_manager Laser_base::end_task()
 //设置保存文件的路径,并打开文件,
 Error_manager Laser_base::set_open_save_path(const std::string& save_path,bool is_save)
 {
-    LOG(ERROR)<<" save :"<<is_save<<"   path"<<save_path;
-
 	m_save_flag = is_save;
 	m_points_log_tool.close();
 	m_binary_log_tool.close();

+ 2 - 6
laser/LivoxLaser.cpp

@@ -69,7 +69,6 @@ Error_manager CLivoxLaser::execute_task(Task_Base* p_laser_task)
 
 	//接受任务,并将任务的状态改为TASK_SIGNED已签收
 	mp_laser_task = (Laser_task *) p_laser_task;
-    LOG(WARNING)<<mp_laser_task->get_save_path();
 	mp_laser_task->set_task_statu(TASK_SIGNED);
 
 	//检查消息内容是否正确,
@@ -90,10 +89,8 @@ Error_manager CLivoxLaser::execute_task(Task_Base* p_laser_task)
 		m_frame_maxnum=mp_laser_task->get_task_frame_maxnum();
 
 		//设置保存文件的路径
-        LOG(WARNING)<<mp_laser_task->get_save_path();
-		std::string save_points_path(mp_laser_task->get_task_save_path());
-        LOG(WARNING)<<mp_laser_task->get_save_path();
-		t_error = set_open_save_path(mp_laser_task->get_task_save_path());
+		std::string save_points_path=mp_laser_task->get_save_path();
+		t_error = set_open_save_path(save_points_path);
 
 		if ( t_error != Error_code::SUCCESS )
 		{
@@ -117,7 +114,6 @@ Error_manager CLivoxLaser::execute_task(Task_Base* p_laser_task)
 			//将任务的状态改为 TASK_WORKING 处理中
 			mp_laser_task->set_task_statu(TASK_WORKING);
 		}
-        std::cout<<"11111"<<std::endl;
 	}
 	//返回错误码
 	if (t_result != Error_code::SUCCESS)

+ 1 - 1
laser/LivoxMid100Laser.cpp

@@ -113,7 +113,7 @@ Error_manager CLivoxMid100Laser::execute_task(Task_Base* p_laser_task)
 
 
 		//设置保存文件的路径
-		std::string save_path = mp_laser_task->get_task_save_path();
+		std::string save_path = mp_laser_task->get_save_path();
 		t_error = set_open_save_path(save_path);
 		if ( t_error != Error_code::SUCCESS )
 		{

+ 2 - 12
laser/laser_task_command.cpp

@@ -125,11 +125,7 @@ unsigned int Laser_task::get_task_frame_maxnum()
 {
     return m_task_frame_maxnum;
 }
-//获取采集的点云保存路径
-std::string Laser_task::get_task_save_path()
-{
-    return m_task_save_path;
-}
+
 //获取 三维点云容器的智能指针
 pcl::PointCloud<pcl::PointXYZ>* Laser_task::get_task_point_cloud()
 {
@@ -137,8 +133,6 @@ pcl::PointCloud<pcl::PointXYZ>* Laser_task::get_task_point_cloud()
 }
 
 
-
-
 //设置 任务状态
 void Laser_task::set_task_statu(Task_statu task_statu)
 {
@@ -155,11 +149,7 @@ void Laser_task::set_task_frame_maxnum(unsigned int task_frame_maxnum)
     m_task_frame_maxnum = task_frame_maxnum;
 
 }
-//设置采集的点云保存路径
-void Laser_task::set_task_save_path(std::string task_save_path)
-{
-    m_task_save_path=task_save_path;
-}
+
 //设置 三维点云容器的智能指针
 void Laser_task::set_task_point_cloud(pcl::PointCloud<pcl::PointXYZ>* p_task_point_cloud)
 {

+ 0 - 6
laser/laser_task_command.h

@@ -62,8 +62,6 @@ public:
 public:
     //获取 点云的采集帧数最大值
     unsigned int get_task_frame_maxnum();
-    //获取采集的点云保存路径
-    std::string get_task_save_path();
     //获取 三维点云容器的智能指针
     pcl::PointCloud<pcl::PointXYZ>* get_task_point_cloud();
 
@@ -76,8 +74,6 @@ public:
     void set_task_statu_information(std::string & task_statu_information);
     //设置 点云的采集帧数最大值
     void set_task_frame_maxnum(unsigned int task_frame_maxnum);
-    //设置采集的点云保存路径
-    void set_task_save_path(std::string task_save_path);
     //设置 三维点云容器的智能指针
     void set_task_point_cloud(pcl::PointCloud<pcl::PointXYZ>* p_task_point_cloud);
     //设置 错误码
@@ -94,8 +90,6 @@ protected:
 
     std::string                     m_save_path;
 
-    //点云保存文件的路径,任务输入
-    std::string                     m_task_save_path;
 
     //三维点云的数据保护锁,任务输入
     std::mutex*                     mp_task_cloud_lock;