Skip to content

Commit

Permalink
prevent crash when viewing heightmap collision
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <ichen@openrobotics.org>
  • Loading branch information
iche033 committed Aug 25, 2023
1 parent 6cb6e87 commit da0e835
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,13 @@ rendering::VisualPtr VisualizationCapabilitiesPrivate::CreateCollisionVisual(
if (!_visual.Geom())
return rendering::VisualPtr();

if (_visual.Geom()->Type() == sdf::GeometryType::HEIGHTMAP)
{
gzwarn << "Collision visualization for heightmaps are not supported yet."
<< std::endl;
return rendering::VisualPtr();
}

std::string name = _visual.Name().empty() ? std::to_string(_id) :
_visual.Name();
if (_parent)
Expand Down

0 comments on commit da0e835

Please sign in to comment.