Gazebo | Ignition | Community
Ask Your Question
0

Question about <uri> on Fortress

asked 2022-01-16 02:30:49 -0500

kakcalu13 gravatar image

So I've decided to try and create a blanket for ignition just to practice on my skill. So I came up with an idea by import a piece of blanket over and over.

So, I wanted to try one piece only.

This is a piece of blanket which is ready to be imported by another file.

So, I created a different file just to import a piece of blanket.

This section doesn't allow me to import due to no file found:

    <include>
        <static>false</static>
        <name>piece_00</name>
        <pose>0 0 0 0 0 0</pose>
        <uri>blanket.sdf</uri>
    </include>

But I have the blanket.sdf in the same folder as this file.

So the error output is this:

[Err] [Server.cc:183] Error Code 13: [/sdf/world[@name="testing_physics"]/include[0]/uri:/home/bwuk/Ignition-Gazebo-blanket/model/blanket_in_a_world.sdf:L44]: Msg: Unable to find uri[model://blanket.sdf]
bwuk@robots:~/Ignition-Gazebo-blanket$ ign gazebo -r model/blanket_in_a_world.sdf 
[Err] [Server.cc:183] Error Code 13: [/sdf/world[@name="testing_physics"]/include[0]/uri:/home/bwuk/Ignition-Gazebo-blanket/model/blanket_in_a_world.sdf:L44]: Msg: Unable to find uri[blanket.sdf]
bwuk@robots:~/Ignition-Gazebo-blanket$ ign gazebo -r model/blanket_in_a_world.sdf 
[Err] [Server.cc:183] Error Code 13: [/sdf/world[@name="testing_physics"]/include[0]/uri:/home/bwuk/Ignition-Gazebo-blanket/model/blanket_in_a_world.sdf:L44]: Msg: Unable to find uri[blanket]
bwuk@robots:~/Ignition-Gazebo-blanket$ ign gazebo -r model/blanket_in_a_world.sdf 
[Err] [Server.cc:183] Error Code 13: [/sdf/world[@name="testing_physics"]/include[0]/uri:/home/bwuk/Ignition-Gazebo-blanket/model/blanket_in_a_world.sdf:L44]: Msg: Unable to find uri[model://blanket.sdf]
bwuk@robots:~/Ignition-Gazebo-blanket$ ign gazebo -r model/blanket_in_a_world.sdf 
[Err] [Server.cc:183] Error Code 13: [/sdf/world[@name="testing_physics"]/include[0]/uri:/home/bwuk/Ignition-Gazebo-blanket/model/blanket_in_a_world.sdf:L84]: Msg: Unable to find uri[model://blanket.sdf]
bwuk@robots:~/Ignition-Gazebo-blanket$ ign gazebo -r model/blanket_in_a_world.sdf 
[Err] [Server.cc:183] Error Code 13: [/sdf/world[@name="testing_physics"]/include[0]/uri:/home/bwuk/Ignition-Gazebo-blanket/model/blanket_in_a_world.sdf:L84]: Msg: Unable to find uri[model://blanket]
bwuk@robots:~/Ignition-Gazebo-blanket$ ign gazebo -r model/blanket_in_a_world.sdf 
[Err] [Server.cc:183] Error Code 13: [/sdf/world[@name="testing_physics"]/include[0]/uri:/home/bwuk/Ignition-Gazebo-blanket/model/blanket_in_a_world.sdf:L84]: Msg: Unable to find uri[blanket]
bwuk@robots:~/Ignition-Gazebo-blanket$ ign gazebo -r model/blanket_in_a_world.sdf 
[Err] [Server.cc:183] Error Code 13: [/sdf/world[@name="testing_physics"]/include[0]/uri:/home/bwuk/Ignition-Gazebo-blanket/model/blanket_in_a_world.sdf:L84]: Msg: Unable to find uri[blanket.sdf]

As you can see I tried all different ways.

What is the right way to import a model from other file?

Version: Fortress. (I'm addicted with this one!)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-01-16 18:11:00 -0500

kakcalu13 gravatar image

Found a way to import a model from other model.

There was a lot of errors that prevented it from import other file.

First of all, in blanket.sdf

  1. It had <pose relative_to='world'> in the sdf file when there is no world model in it.
  2. I removed <world> since blanket.sdf is designed to be a model only without anything else.
  3. I learned that you need to set SDF_PATH and IGN_FILE_PATH. It's explained in here

As for the blanket_in_the_world.sdf, you need to give it a right path. So here is what I did:

<include>
  <uri>model://blanket.sdf</uri>
</include>

Just like that. I did this in Fortress only.

Feel free to ask me to clarify. I'm more than happy to clarify for you in future. (even if this is closed or marked as answer)

edit flag offensive delete link more

Comments

P.S., this will be on my github.

kakcalu13 gravatar imagekakcalu13 ( 2022-01-16 18:12:17 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2022-01-16 02:30:49 -0500

Seen: 70 times

Last updated: Jan 16