Skip to content

Commit

Permalink
fix(compare_map_segmentation): missing mutux
Browse files Browse the repository at this point in the history
Signed-off-by: badai-nguyen <[email protected]>
  • Loading branch information
badai-nguyen committed Oct 17, 2024
1 parent 37808bf commit 0d6d565
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,21 @@ class VoxelGridDynamicMapLoader : public VoxelGridMapLoader
inline pcl::PointCloud<pcl::PointXYZ> getCurrentDownsampledMapPc() const
{
pcl::PointCloud<pcl::PointXYZ> output;
(*mutex_ptr_).lock();
for (const auto & kv : current_voxel_grid_dict_) {
output = output + *(kv.second.map_cell_pc_ptr);
}
(*mutex_ptr_).unlock();

Check warning on line 204 in perception/autoware_compare_map_segmentation/src/voxel_grid_map_loader/voxel_grid_map_loader.hpp

View check run for this annotation

Codecov / codecov/patch

perception/autoware_compare_map_segmentation/src/voxel_grid_map_loader/voxel_grid_map_loader.hpp#L204

Added line #L204 was not covered by tests
return output;
}
inline std::vector<std::string> getCurrentMapIDs() const
{
std::vector<std::string> current_map_ids{};
(*mutex_ptr_).lock();
for (auto & kv : current_voxel_grid_dict_) {
current_map_ids.push_back(kv.first);
}
(*mutex_ptr_).unlock();

Check warning on line 214 in perception/autoware_compare_map_segmentation/src/voxel_grid_map_loader/voxel_grid_map_loader.hpp

View check run for this annotation

Codecov / codecov/patch

perception/autoware_compare_map_segmentation/src/voxel_grid_map_loader/voxel_grid_map_loader.hpp#L214

Added line #L214 was not covered by tests
return current_map_ids;
}
inline void updateDifferentialMapCells(
Expand Down

0 comments on commit 0d6d565

Please sign in to comment.