locate_task.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // Created by zx on 2019/12/30.
  3. //
  4. #include "locate_task.h"
  5. #include <glog/logging.h>
  6. Locate_task::Locate_task()
  7. {
  8. m_task_type=LOCATE_TASK;
  9. }
  10. Locate_task::~Locate_task()
  11. {
  12. }
  13. Error_manager Locate_task::set_locate_cloud(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud)
  14. {
  15. if(cloud.get()==0)
  16. {
  17. return Error_manager(LOCATER_TASK_INPUT_CLOUD_UNINIT,NORMAL,"locate task set input cloud uninit");
  18. }
  19. if(cloud->size()==0) {
  20. return Error_manager(LOCATER_TASK_INIT_CLOUD_EMPTY,NORMAL,"locate task input cloud is empty");
  21. }
  22. m_locate_cloud_ptr=cloud;
  23. return SUCCESS;
  24. }
  25. pcl::PointCloud<pcl::PointXYZ>::Ptr Locate_task::get_locate_cloud()
  26. {
  27. return m_locate_cloud_ptr;
  28. }
  29. Locate_information Locate_task::get_locate_information()
  30. {
  31. return m_locate_information;
  32. }
  33. Error_manager Locate_task::set_locate_information(Locate_information information)
  34. {
  35. memcpy(&m_locate_information,&information,sizeof(Locate_information));
  36. return SUCCESS;
  37. }
  38. std::string Locate_task::get_save_path()
  39. {
  40. return m_save_path;
  41. }
  42. Error_manager Locate_task::set_save_path(std::string path)
  43. {
  44. m_save_path=path;
  45. return SUCCESS;
  46. }