Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pit crew missing models and authorship logic #522

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

luca-della-vedova
Copy link
Member

@luca-della-vedova luca-della-vedova commented Jan 2, 2025

Bug fix

Fixed bug

Ref open-rmf/rmf#578 (comment), fuel pipeline wasn't used for some time, but while fixing it I bumped into several other issues that I bundled in this PR.

Fix applied

A series of issues in pit_crew:

  • The root cause of the issue, if a model with a different organization name is uploaded pit_crew will report it as downloadable, the pipeline will later try to download it but fail. Fixed the downloadable generation logic d392b76.
  • The above didn't quite bubble up because in the bare http pipeline (which is what we use) we check a tuple for true / false, so returning (False, None) actually evaluates to True, fixed in 8c3f40c.
  • Now of course the fuel pipeline uses ign instead of gz which doesn't exist anymore, 1e6c04e for the command and 14ee953 to fix the cache folder.
  • The rest are minor fixes:
    • f4d35f9 the printing was not substituting the variable so would always print "%d".
    • 0c74e73 We were enumerating but not using the index, remove the enumerate.
    • aaa7a83 the pipeline was throwing an exception when using max() on an empty list, change it to a more informative exception.

All off this surfaced because of the following sequence of events:

  • Uploading the TeleportIngestor and TelepotDispenser to the Open-RMF organization.
  • Fuel now has an Open-RMF/TeleportIngestor plugin, maps still require OpenRobotics/TeleportIngestor.
  • The faulty logic makes OpenRobotics/TeleportIngestor map to Open-RMF/TeleportIngestor.
  • Model download with the http pipeline fails, but the faulty boolean condition check makes the pipeline progress as usual
  • The fuel pipeline has the correct check and aborts early.

All of these will be fixed by the above.
Note however, that TeleportIngestor and TeleportDispenser might be downloaded by fuel in the future, but I'll leave a detailed comment for this in the rmf_demos PR that introduces this risk open-rmf/rmf_demos#272

Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
@luca-della-vedova luca-della-vedova changed the title Luca/pit crew missing models Fix pit crew missing models and authorship logic Jan 2, 2025
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
mxgrey
mxgrey previously approved these changes Jan 2, 2025
Copy link
Collaborator

@mxgrey mxgrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the detailed explanation of all the problems and their fixes, that really helped give context for all the surrounding Python code.

Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Copy link
Collaborator

@mxgrey mxgrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a way to test the changes without a risk of breaking something for users out there.

What if we upload some empty model to both the openrobotics fuel org and the open-rmf fuel org with the same name and build a test map that contains the model?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants