0
$\begingroup$

Rosanswers logo

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?


Originally posted by jker on ROS Answers with karma: 115 on 2012-04-17

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by hsu with karma: 5780 on 2012-04-17

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by jker on 2012-04-18:
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 :(

Comment by hsu on 2012-04-18:
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!

$\endgroup$

Your Answer

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