open-rmf / rmf_site

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

Add a few more properties to legacy navgraphs #201

Closed luca-della-vedova closed 6 months ago

luca-della-vedova commented 7 months ago

New feature implementation

Implemented feature

While working on SDF export, I noticed that several properties are missing, this PR brings us "closer" to all the features adding doors, lifts and orientation constraints. It also updates the TODOs to bring them up to date with what is needed since we will need to revisit this section.

Implementation description

I split this into a standalone PR since the SDF export is already becoming a very large change and this is somewhat orthogonal so it should be easier to review (and probably it would be better to scrutinize this a bit closer, since mistakes in an exported SDF are a lot easier to spot than mistakes in an exported navgraph). I'll only be able to do full end to end testing when this is integrated with the SDF branch and we can export a full demo world, so this is somewhat experimental code (and parts like the lift center calculation might use another pair of eyes)

luca-della-vedova commented 7 months ago

I added two small commits https://github.com/open-rmf/rmf_site/pull/201/commits/d76f218b70ebdf9aa1c9bcf0259a9a1e6ce2652e and https://github.com/open-rmf/rmf_site/pull/201/commits/3e9497484ca3d0ec9d9098800ad7810d0456d753 that fix two minor issues I encountered with the office world that made it not work (multiple locations were created with the same <Unnamed> name, as well as lanes were missing). With these changes and the export_sdf branch the office demo almost works.

luca-della-vedova commented 7 months ago

With https://github.com/open-rmf/rmf_site/pull/201/commits/b4d0644cc2cf52c2e4aa9ab3d2d735c18843d2ac now the navgraph contains lift properties for vertices and lanes that contain lift anchors. On end to end demos robots can now use lifts.

luca-della-vedova commented 7 months ago

All feedback should be addressed here. I admit not really understanding the translation_for_category logic, I tried to export a few legacy buildings (i.e. hotel) to a .site.ron format and noticed that the only categorized anchors I could find where under the General category.

For the site anchors I was mostly thinking of the use case of a lane being between a site and a level anchor, for example if a user uses a fiducial anchor as the endpoint of a lane, and the second endpoint sits on a level anchor. But anyway since we don't want to allow site anchors because of the level ambiguity I just removed the logic.