Integration rmf_site and rmf_core (#408)

Posted by @EmimaJiva:

Our project requires a fleet manager for large and outdoor spaces, such as
streets. I have seen the rmf_site option, which you have worked on. How
would the rmf_site be integrated with rmf_core and fleet_adapter? How is
the rmf_site information used in the rmf-core?
I have seen that with the rmf_site you can get a .site.ron file. How to use that file in rmf_core?
I would appreciate it if someone could help me

Posted by @mxgrey:

The site editor was originally created to be part of a “next generation” RMF that would deliver many new capabilities that aren’t feasible to implement in today’s RMF “core”. When we originally created it, there wasn’t a strong intention of making it compatible with the current generation, because we don’t want the site editor to be limited by the current generation’s capabilities.

However, there is already a significant user base for the current generation of RMF, and there is a strong demand for a better map editing experience than what’s currently possible with the traffic editor. With that in mind, we’ve started working backwards on the site editor to make it something that current generation users can still benefit from. The missing pieces are:

  1. Exporting the world as an SDF that can be simulated
  2. Exporting the navigation graphs in the current generation yaml format
  3. Providing these abilities through a command line tool to match the workflow of traffic editor’s building map tools

(1) is being actively worked on right now, and I believe it’s close to being finished. (2) has already been implemented but just isn’t exposed to users yet. (3) is very easy to do once (1) and (2) are finished.

One challenging decision with this plan is whether the site editor should have a special “backwards compatibility” mode that only gives access to capabilities that are compatible with the current generation of RMF. I think that would help reduce user frustration so that they don’t spend time putting in elements that won’t ultimately get exported or used by RMF when they’re exporting for the current generation core.

I have seen that with the rmf_site you can get a .site.ron file. How to use that file in rmf_core?

To be very concrete about this question, the .site.ron file is the site editor’s equivalent of the .building.yaml file that traffic editor produced. Just like the .building.yaml file, there will need to be an export step to produce the navigation graph .yaml files that are loaded into the fleet adapter or the SDF .world files that are loaded into Gazebo for simulation. That’s what I’m referring to in (1), (2), and (3) above.

Posted by @EmimaJiva:

Thank you for your response. And can we currently use rmf_core and fleet adapter for robots working with GPS coordinates? I have tried the traffic-editor by selecting the geographic references option but it doesn’t work. Is there any way to use the rmf_core and fleet adapter for large spaces, like streets…?

Posted by @mxgrey:

The fleet adapters and traffic system aren’t very sensitive to large distances, so there shouldn’t be an issue with those.

The editors are where large scale worlds can get tricky. For traffic-editor we have done a pilot demo that involved the streets of a small college campus. However the GPS map display feature in traffic-editor depended on a custom map tile server that is no longer running, so you can use GPS coordinates with the traffic-editor, but it won’t visualize the GPS map anymore.

In the site editor you can view a GPS map using Tool (in the top toolbar) -> Geographic Offset -> Set Reference. It uses the free API at https://tile.openstreetmap.org/ so it can continue to run as long as that API remains free and running.

The one remaining issue for editing large worlds in the site editor is that the lanes and vertices become too small to see if you’re too zoomed out. There’s a working attempt to fix this in Add polylines and spheres for handling large worlds by arjo129 · Pull Request #152 · open-rmf/rmf_site · GitHub which has been used to draw shipping lanes for boats, but there’s some less than ideal UI behavior in that prototype at the moment.

Posted by @EmimaJiva:

Thank you for your response. So is there any way to use the RMF with robots outdoors?