Spawn urdf in gazebo problem

I am trying to spawn a urdf in my local ubuntu machine and I keep on getting the following error

. Can you please help me fix this issue? I even tried to bring the mira_simple_collision_inertias.urdf and its launch file spawn_mira_simple_collisions_inertias.launch from my construct course to my local ubuntu and still getting exact same error.

Seems like the problem is coming from “from gazebo_ros import gazebo_interface”

Hi @wallee394,
You have to read Errors from the bottom up. The actual error is a failed import. Take a look at this:

The weird thing is, that it says 'no module named msg' instead of
'no module named gazebo_msgs.msg'
Perhaps check that line 9 in your file again

The link you shared says add package dependencies. Where do I add image ?

And before you do that, you have to make sure that in my_pkg/manifest.xml , you have the line:

<depend package="gazebo_msgs"/>

it says right above it :wink:

Seems like you are making fun of it instead of help. I have seen the line above it but it is really not clear (to me at least). I do not have “my_pkg/manifest.xml” or I can not locate that file. Where do I find that?

Does “my_pkg/manifest.xml” mean my_pkg = the name of my package, and manifest.xml = package.xml?

Sorry, didn’t mean to make fun of you. I just realized that it says manifest.xml instead of package.xml. But yes, that should be it. Give it a try, recompile and let me know how it goes.

Here is my package.xml file

. Compiled successfully but getting the same error when I launch it

Did you install all dependencies? Did you use rosdep?

Give this a read and follow it.

There is a typo in line 78. it says “gazibo_ros”. Should be “gazebo_ros”.

1 Like