File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
rviz_mesh_tools_plugins/src Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -448,8 +448,18 @@ bool MapDisplay::loadData()
448
448
const std::string mesh_part = " mesh" ;
449
449
450
450
hdf5_mesh_io->open (mapFile);
451
+ hdf5_mesh_io->setMeshName (mesh_part);
451
452
auto mesh_buffer = hdf5_mesh_io->MeshIO ::load (mesh_part);
452
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
+
453
463
if (nullptr == mesh_buffer)
454
464
{
455
465
RCLCPP_ERROR (
You can’t perform that action at this time.
0 commit comments