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

Unable to find URI (Fuel models) #280

Closed
mcres opened this issue Aug 10, 2020 · 5 comments
Closed

Unable to find URI (Fuel models) #280

mcres opened this issue Aug 10, 2020 · 5 comments
Assignees
Labels
🔮 dome Ignition Dome

Comments

@mcres
Copy link
Contributor

mcres commented Aug 10, 2020

When I try to include a model from Fuel, for instance this one:

<include>
  <pose>0 0 0.7 0 0 0</pose>
  <uri>
    https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke
  </uri>
</include>

I get the following error when I ign gazebo -v 4 myWorld.sdf, after which the application ends:

[Err] [Server.cc:146] Error Code 12 Msg: Unable to find uri[
        https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke
      ]
[Err] [Server.cc:146] Error Code 11 Msg: Invalid uri[
        https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke
      ]. Should be model://
        https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke

It's the same error with most of the Fuel models.
However, if I specify the model with meshes, it will load with no problems:

<model name="coke_can">
  <pose>0 0 0.7 0 0 0</pose>
  <static>true</static>
  <link name="link">
    <collision name="collision">
      <geometry>
        <mesh>
          <uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke/2/files/meshes/coke.obj</uri>
        </mesh>
      </geometry>
    </collision>
    <visual name="visual">
      <geometry>
        <mesh>
          <uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke/2/files/meshes/coke.obj</uri>
        </mesh>
      </geometry>
    </visual>
  </link>
</model>

I didn't have that problem before updating Dome #262


For a more detailed information, this is the sdf file I'm trying to load:

<?xml version="1.0" ?>
<!--
  Demo of models being downloaded from http://app.ignitionrobotics.org/
-->
<sdf version="1.6">
  <world name="shapes">
    <plugin
      filename="libignition-gazebo-physics-system.so"
      name="ignition::gazebo::systems::Physics">
    </plugin>
    <plugin
      filename="libignition-gazebo-scene-broadcaster-system.so"
      name="ignition::gazebo::systems::SceneBroadcaster">
    </plugin>
    <gui fullscreen="0">
      <!-- 3D scene -->
      <plugin filename="GzScene3D" name="3D View">
        <ignition-gui>
          <title>3D View</title>
          <property type="bool" key="showTitleBar">false</property>
          <property type="string" key="state">docked</property>
        </ignition-gui>

        <engine>ogre</engine>
        <scene>scene</scene>
        <ambient_light>0.4 0.4 0.4</ambient_light>
        <background_color>0.8 0.8 0.8</background_color>
        <camera_pose>-6 0 6 0 0.5 0</camera_pose>
      </plugin>

      <!-- World control -->
      <plugin filename="WorldControl" name="World control">
        <ignition-gui>
          <title>World control</title>
          <property type="bool" key="showTitleBar">false</property>
          <property type="bool" key="resizable">false</property>
          <property type="double" key="height">72</property>
          <property type="double" key="width">121</property>
          <property type="double" key="z">1</property>

          <property type="string" key="state">floating</property>
          <anchors target="3D View">
            <line own="left" target="left"/>
            <line own="bottom" target="bottom"/>
          </anchors>
        </ignition-gui>

        <play_pause>true</play_pause>
        <step>true</step>
        <start_paused>true</start_paused>
        <service>/world/shapes/control</service>
        <stats_topic>/world/shapes/stats</stats_topic>

      </plugin>

      <!-- World statistics -->
      <plugin filename="WorldStats" name="World stats">
        <ignition-gui>
          <title>World stats</title>
          <property type="bool" key="showTitleBar">false</property>
          <property type="bool" key="resizable">false</property>
          <property type="double" key="height">110</property>
          <property type="double" key="width">290</property>
          <property type="double" key="z">1</property>

          <property type="string" key="state">floating</property>
          <anchors target="3D View">
            <line own="right" target="right"/>
            <line own="bottom" target="bottom"/>
          </anchors>
        </ignition-gui>

        <sim_time>true</sim_time>
        <real_time>true</real_time>
        <real_time_factor>true</real_time_factor>
        <iterations>true</iterations>
        <topic>/world/shapes/stats</topic>

      </plugin>

    </gui>

    <light type="directional" name="sun">
      <cast_shadows>true</cast_shadows>
      <pose>0 0 10 0 0 0</pose>
      <diffuse>0.8 0.8 0.8 1</diffuse>
      <specular>0.2 0.2 0.2 1</specular>
      <attenuation>
        <range>1000</range>
        <constant>0.9</constant>
        <linear>0.01</linear>
        <quadratic>0.001</quadratic>
      </attenuation>
      <direction>-0.5 0.1 -0.9</direction>
    </light>

    <model name="ground_plane">
      <static>true</static>
      <link name="link">
        <collision name="collision">
          <geometry>
            <plane>
              <normal>0 0 1</normal>
            </plane>
          </geometry>
        </collision>
        <visual name="visual">
          <geometry>
            <plane>
              <normal>0 0 1</normal>
              <size>100 100</size>
            </plane>
          </geometry>
          <material>
            <ambient>0.8 0.8 0.8 1</ambient>
            <diffuse>0.8 0.8 0.8 1</diffuse>
            <specular>0.8 0.8 0.8 1</specular>
          </material>
        </visual>
      </link>
    </model>

    <include>
      <pose>0 0 0.7 0 0 0</pose>
      <uri>
        https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke
      </uri>
    </include>

  </world>
</sdf>

And this is the output:

[Msg] Ignition Gazebo Server v4.0.0~pre1
[Msg] Ignition Gazebo GUI    v4.0.0~pre1
[Msg] Loading SDF world file[/home/mcres/ignition-dome/src/ign-gazebo/examples/worlds/fuel.sdf].
[Err] [Server.cc:146] Error Code 12 Msg: Unable to find uri[
        https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke
      ]
[Err] [Server.cc:146] Error Code 11 Msg: Invalid uri[
        https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke
      ]. Should be model://
        https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke
      
[Dbg] [ign.cc:269] Shutting down ign-gazebo-server
[Dbg] [Application.cc:87] Initializing application.
[GUI] [Dbg] [Application.cc:407] Create main window
[GUI] [Dbg] [Gui.cc:129] GUI requesting list of world names. The server may be busy downloading resources. Please be patient.
[GUI] [Dbg] [SignalHandler.cc:141] Received signal[2].
[GUI] [Dbg] [SignalHandler.cc:141] Received signal[2].
[GUI] [Dbg] [Application.cc:130] Terminating application.

Some more specific details about the issue:

  • Ignition Dome installed from source. I've tried a clean build, but the problem keeps coming up.
  • ign-fuel-tools5 and ign-gazebo4
  • Ubuntu 18.04.5 LTS
  • I've also tried to rm -rf ~/.ignition/fuel
@chapulina chapulina added the 🔮 dome Ignition Dome label Aug 10, 2020
@nkoenig
Copy link
Contributor

nkoenig commented Aug 17, 2020

I did a fresh install of Dome on Ubuntu 18.04, and ran the following world file:

<?xml version="1.0" ?>
<sdf version="1.6">
  <world name="shapes">
    <plugin
      filename="libignition-gazebo-physics-system.so"
      name="ignition::gazebo::systems::Physics">
    </plugin>
    <plugin
      filename="libignition-gazebo-user-commands-system.so"
      name="ignition::gazebo::systems::UserCommands">
    </plugin>

    <plugin
      filename="libignition-gazebo-scene-broadcaster-system.so"
      name="ignition::gazebo::systems::SceneBroadcaster">
    </plugin>
    <gui fullscreen="0">
      <!-- 3D scene -->
      <plugin filename="GzScene3D" name="3D View">
        <ignition-gui>
          <title>3D View</title>
          <property type="bool" key="showTitleBar">false</property>
          <property type="string" key="state">docked</property>
        </ignition-gui>

        <engine>ogre2</engine>
        <scene>scene</scene>
        <ambient_light>1.0 1.0 1.0 1.0</ambient_light>
        <background_color>1 1 1 1</background_color>
        <camera_pose>-6 0 6 0 0.5 0</camera_pose>
      </plugin>

      <!-- World control -->
      <plugin filename="WorldControl" name="World control">
        <ignition-gui>
          <title>World control</title>
          <property type="bool" key="showTitleBar">false</property>
          <property type="bool" key="resizable">false</property>
          <property type="double" key="height">72</property>
          <property type="double" key="width">121</property>
          <property type="double" key="z">1</property>

          <property type="string" key="state">floating</property>
          <anchors target="3D View">
            <line own="left" target="left"/>
            <line own="bottom" target="bottom"/>
          </anchors>
        </ignition-gui>

        <play_pause>true</play_pause>
        <step>true</step>
        <start_paused>true</start_paused>
        <service>/world/shapes/control</service>
        <stats_topic>/world/shapes/stats</stats_topic>

      </plugin>

      <!-- World statistics -->
      <plugin filename="WorldStats" name="World stats">
        <ignition-gui>
          <title>World stats</title>
          <property type="bool" key="showTitleBar">false</property>
          <property type="bool" key="resizable">false</property>
          <property type="double" key="height">110</property>
          <property type="double" key="width">290</property>
          <property type="double" key="z">1</property>

          <property type="string" key="state">floating</property>
          <anchors target="3D View">
            <line own="right" target="right"/>
            <line own="bottom" target="bottom"/>
          </anchors>
        </ignition-gui>

        <sim_time>true</sim_time>
        <real_time>true</real_time>
        <real_time_factor>true</real_time_factor>
        <iterations>true</iterations>
        <topic>/world/shapes/stats</topic>
      </plugin>
    </gui>

    <light type="directional" name="sun">
      <cast_shadows>true</cast_shadows>
      <pose>0 0 10 0 0 0</pose>
      <diffuse>1.0 1.0 1.0 1</diffuse>
      <specular>0.2 0.2 0.2 1</specular>
      <attenuation>
        <range>1000</range>
        <constant>0.1</constant>
        <linear>0.001</linear>
        <quadratic>0.0001</quadratic>
      </attenuation>
      <direction>-0.5 0.1 -0.9</direction>
    </light>

    <include>
      <uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke</uri>
    </include>
  </world>
</sdf>

The above downloaded the model and ran successfully. Can you try the above SDF file?

@mcres
Copy link
Contributor Author

mcres commented Aug 17, 2020

I can run your SDF file correctly.
Hmm, could it be the position of the <uri> tags?

@azeey
Copy link
Contributor

azeey commented Aug 18, 2020

@ahcorde pointed out that this is because of the newline in

<uri>
   https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke
</uri>

as opposed to

<uri>https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Coke</uri>

This might be related to gazebosim/sdformat#322

@mcres
Copy link
Contributor Author

mcres commented Aug 19, 2020

This might be related to gazebosim/sdformat#322

I didn't have this problem with sdf9 but I do with sdf10, so it does seems related.

Is there anything else I can do?

@chapulina
Copy link
Contributor

I didn't have this problem with sdf9 but I do with sdf10

Yeah the problem is due to a change in SDF10.

Is there anything else I can do?

To fix your problem locally, use the <uri> format suggested by @azeey above, without newlines. To make sure SDF worlds from Citadel still work with Dome, someone will need to tackle gazebosim/sdformat#322.

I'll close this issue for now, and let's follow up on the SDF issue.

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

No branches or pull requests

4 participants