We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96cf4de commit 17da0ceCopy full SHA for 17da0ce
1 file changed
rviz_mesh_tools_plugins/src/MapDisplay.cpp
@@ -448,8 +448,18 @@ bool MapDisplay::loadData()
448
const std::string mesh_part = "mesh";
449
450
hdf5_mesh_io->open(mapFile);
451
+ hdf5_mesh_io->setMeshName(mesh_part);
452
auto mesh_buffer = hdf5_mesh_io->MeshIO::load(mesh_part);
453
454
+ // MeshIO Loads colors as bool channel so we need to load it again.
455
+ // This is because HDF5 stores bools and uchars as the same data type and
456
+ // bool loading is tried before uchar
457
+ auto color_opt = hdf5_mesh_io->loadChannel<unsigned char>(mesh_part + "/vertex_attributes", "vertex_colors");
458
+ if (color_opt)
459
+ {
460
+ mesh_buffer->insert_or_assign("vertex_colors", color_opt.value());
461
+ }
462
+
463
if (nullptr == mesh_buffer)
464
{
465
RCLCPP_ERROR(
0 commit comments