0
$\begingroup$

Gazebo Answers logo

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!)


Originally posted by kakcalu13 on Gazebo Answers with karma: 87 on 2022-01-16

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

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 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)


Originally posted by kakcalu13 with karma: 87 on 2022-01-16

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by kakcalu13 on 2022-01-16:
P.S., this will be on my github.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.