open-rmf / rmf_site

Experimental visualizer for dense buildings in RMF
32 stars 13 forks source link

Add collision parsing to SDF models #169

Closed luca-della-vedova closed 1 year ago

luca-della-vedova commented 1 year ago

New feature implementation

Implemented feature

This PR adds support for collision meshes in sdf parsing and unifies the concept of site / workcell visual and collision to offer the same UX.

Implementation description

Collisions were previously ignored when parsing SDF files. Now they will be parsed and spawned, although they will not be visualized by default. Visualization can be toggled via the "View" menu on the top bar. I had to do a minor refactor of the CategoryVisibility plugin to allow disabled visualization on app initialization. To simplify the UX and remove duplicated components I removed the WorkcellVisualMarker and WorkcellCollisionMarker to use a single marker component for both site and workcell projects.

Test it!

Loading the demo world should look and feel the same. By clicking on the View menu you should be able to enable visualization of collision meshes (they usually look like greatly simplified version of the same mesh). All the rest of the features, at least for the site editor mode, should be unchanged.

Screencast from 2023-08-22 16-40-52.webm