open-rmf / rmf_site

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

[Bug]: User-provided filename is not respected when exporting URDF #198

Open mxgrey opened 7 months ago

mxgrey commented 7 months ago

Description of the bug

When exporting a workcell URDF, there is a file dialogue that lets you fill in a filename. Even if you provide a filename, the site editor will export a directory based on the original name of the workcell.

A better use experience would either:

  1. export using the new user-defined name (maybe the original workcell name can be filled in by default?)
  2. use AsyncFileDialog::new().pick_folder() instead of AsyncFileDialog::new().save_file()

Steps to reproduce the bug

Load a workcell and then export it as URDF

luca-della-vedova commented 7 months ago

This is probably confusing UX but kinda intended. The idea is that the name of the created folder is the name of the workcell, which is also the name of the robot in the exported URDF. The same name can also be used by other libraries that build on RMF site editor to (for example) create ROS 2 services or topics for the specific workcell. Maybe a better solution could be to change the dialog to pick a folder?

mxgrey commented 7 months ago

Maybe a better solution could be to change the dialog to pick a folder?

Yeah that would be fine and would be my recommendation (2).

But if we take that approach then we need to make sure there's a way for users to rename the workcell. I couldn't find a way to do that when I was trying out the workcell editor yesterday.