Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Accept relative paths in SDF files #2765

Merged
merged 6 commits into from
Sep 2, 2020
Merged

Conversation

chapulina
Copy link
Contributor

@chapulina chapulina commented Jun 26, 2020

Closes #2718 .

The main motivation for this is to allow more models to be reused between Gazebo-classic and Ignition to ease migration. Comments on this issue are relevant: gazebosim/gz-fuel-tools#77 (comment). I'm planning to document all this on a proper tutorial once the implementation is in.

This is a port of this ign-gazebo PR.


What's working

I locally modified the Dumpster model to use relative URIs for visual and collision geometries, as well as materials. Then I verified that it's possible to insert it from the left menu and both client and server load all assets correctly.


TODO

  • Add tests
  • Check that directly calling ~/factory with sdf_filename works
  • Check that actor skins and animations work

Signed-off-by: Louise Poubel <louise@openrobotics.org>
@azeey
Copy link
Collaborator

azeey commented Jun 26, 2020

Just FYI, #2734 changes how models are spawned from ModelMaker.

Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina chapulina added 11 Gazebo 11 migration Helps with migration from Gazebo classic to Ignition labels Jul 23, 2020
@chapulina chapulina self-assigned this Aug 3, 2020
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina chapulina marked this pull request as ready for review August 14, 2020 22:50
@chapulina chapulina requested a review from ahcorde August 14, 2020 22:50
@ahcorde
Copy link
Contributor

ahcorde commented Aug 17, 2020

I added the testdb directory to my GAZEBO_MODEL_PATH and I'm not able to include the model with the interface. I'm getting a segfault

[Wrn] [SystemPaths.cc:464] File or path does not exist [""] [meshes/test.dae]
[Err] [Visual.cc:3043] No mesh specified

@ahcorde
Copy link
Contributor

ahcorde commented Aug 18, 2020

@chapulina, I added these lines and there is no segfault:

  if (_elem->GetParent() == nullptr){
    return;
  }

here https://github.com/osrf/gazebo/blob/737037fb3b302a20b64d596f120b350aed84e0c6/gazebo/common/CommonIface.cc#L513

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

I made some comments

Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina
Copy link
Contributor Author

@ahcorde , all your comments have been addressed on e041cca

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

LGTM. Tested locally too

@chapulina
Copy link
Contributor Author

There are way too many failing tests, I'll take a look at them next week.

@chapulina
Copy link
Contributor Author

Ok, so from the 24 test failures on Ubuntu, 17 claim to be the 1st failure, but they're almost all flaky:

This is the only one which seems to be new, but it passes for me locally and I can't think of how it's related:

@chapulina chapulina merged commit 2193012 into gazebo11 Sep 2, 2020
@chapulina chapulina deleted the chapulina/relative_paths branch September 2, 2020 23:08
@scpeters
Copy link
Member

scpeters commented Sep 3, 2020

I think the windows build is failing since this was merged:

LINK : fatal error LNK1181: cannot open input file 'stdc++fs.lib'

Build Status https://build.osrfoundation.org/job/gazebo-ci-gazebo11-windows7-amd64/29/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
11 Gazebo 11 migration Helps with migration from Gazebo classic to Ignition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accept relative paths in URIs
4 participants