Ask Your Question
2

Spawn an .obj or .stl file in Gazebo

asked 2012-04-17 06:41:28 -0600

jker gravatar image

updated 2012-04-18 09:37:37 -0600

I recently got a couple models that I would like to import into gazebo. However they are of .obj and .stl file types (I have each model in both formats). Is there a direct way to import these models into Gazebo? Do I need to convert them to something else first?

I've made simple models out of boxes for Gazebo by writing raw xml files using commands like

rosrun gazebo spawn_model -file my_path/fridge.xml -gazebo -model Fridge -x 0 -y 1 -z .4 -Y 3.14159

However using this command and replacing -gazebo with -urdf just throws errors like

SpawnModel: Failure - model format is

or

GazeboROSNode SpawnModel Failure: input model_xml not Gazebo XML, or cannot be converted to Gazebo XML not URDF (nor COLLADA).

Clearly obj and stl are not the correct formats for these commands, so how is it done?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-04-17 08:08:45 -0600

hsu gravatar image

updated 2012-04-17 08:11:57 -0600

fridge.xml needs to be in either urdf, gazebo sdf in Fuerte or gazebo model format in Electric.

edit flag offensive delete link more

Comments

I've made models in those formats before, but I was hoping I could use regular models, like .obj or .stl. However form what you've said it sounds like that's not possible, which sucks :(

jker gravatar image jker  ( 2012-04-18 09:22:42 -0600 )edit

for static models where dynamics/collision is not important, this might be a feature request on the gazebo side, can you open a feature request ticket with details of behavior you'd like to see on https://kforge.ros.org/gazebo/trac/newticket? thanks!

hsu gravatar image hsu  ( 2012-04-18 10:12:00 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-04-17 06:41:28 -0600

Seen: 2,680 times

Last updated: Apr 18 '12