54 void pushLazyUpdate(octomap::KeySet* occupied_cells, octomap::KeySet* model_cells,
55 const octomap::point3d& sensor_origin);
59 typedef std::unordered_map<octomap::OcTreeKey, unsigned int, octomap::OcTreeKey::KeyHash> OcTreeKeyCountMap;
60#elif __cplusplus >= 201103L
61 typedef std::unordered_map<octomap::OcTreeKey, unsigned int, octomap::OcTreeKey::KeyHash> OcTreeKeyCountMap;
63 typedef std::tr1::unordered_map<octomap::OcTreeKey, unsigned int, octomap::OcTreeKey::KeyHash> OcTreeKeyCountMap;
66 void pushBatchToProcess(OcTreeKeyCountMap* occupied_cells, octomap::KeySet* model_cells,
67 const octomap::point3d& sensor_origin);
69 void lazyUpdateThread();
74 std::size_t max_batch_size_;
75 double max_sensor_delta_;
77 std::deque<octomap::KeySet*> occupied_cells_sets_;
78 std::deque<octomap::KeySet*> model_cells_sets_;
79 std::deque<octomap::point3d> sensor_origins_;
80 std::condition_variable update_condition_;
81 std::mutex update_cell_sets_lock_;
83 OcTreeKeyCountMap* process_occupied_cells_set_;
84 octomap::KeySet* process_model_cells_set_;
85 octomap::point3d process_sensor_origin_;
86 std::condition_variable process_condition_;
87 std::mutex cell_process_lock_;
89 std::thread update_thread_;
90 std::thread process_thread_;
92 rclcpp::Logger logger_;