MCPcopy Create free account
hub / github.com/Robotics-STAR-Lab/RACER / chunkCallback

Method chunkCallback

swarm_exploration/plan_env/src/multi_map_manager.cpp:296–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296void MultiMapManager::chunkCallback(const plan_env::ChunkDataConstPtr& msg) {
297 // Receive chunks from other drones, store them in chunk buffer
298 if (msg->from_drone_id == drone_id_) return;
299 // if(msg->to_drone_id != drone_id_) return;
300
301 // Ignore chunks that are in the insertion buffer
302 if (buffer_map_[msg->chunk_drone_id - 1].find(msg->idx) !=
303 buffer_map_[msg->chunk_drone_id - 1].end())
304 return;
305
306 // ROS_ERROR("received msg idx: %d, from %d to %d", msg->idx, msg->from_drone_id,
307 // msg->to_drone_id);
308 chunk_buffer_[msg->chunk_drone_id - 1].push_back(*msg);
309 buffer_map_[msg->chunk_drone_id - 1][msg->idx] = 1;
310
311 return;
312}
313
314void MultiMapManager::chunkTimerCallback(const ros::TimerEvent& e) {
315

Callers

nothing calls this directly

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected