Ask Your Question
0

Problem with spawn_model in gazebo

asked 2012-08-07 17:05:49 -0600

Zara gravatar image

Hello,

I am trying to spawn a table and a coffee cup into the empty world of pr2 following this tutorial http://www.ros.org/wiki/pr2_simulator/Tutorials/BasicPR2Controls:

1) I Copied the table.stl to this directory `rospack find   gazebo_worlds`/Media/models/
2) I Copied the table.urdf to this directory `rospack find gazebo_worlds`/objects/
3) roslaunch pr2_gazebo pr2_empty_world.launch----> works fine.
4) rosrun gazebo spawn_model -urdf -file table.urdf -model table -x 1.0 -y 0.5 -z 0.3
5) rosrun gazebo spawn_model -gazebo -file `rospack find gazebo_worlds`/objects/coffee_cup.model -model coffee_cup -x 1.2 -z 1

The result is so weird, the table was spawned with no color(same color as the background) while I have gotten the error message: "filename referred by mesh [table.stl] does not appear to exist."

The coffee cup was shown in the list of models but there is no coffee cup in the world. And there some error messages for this command : "namespace error : Namespace prefix model on physical is not defined"

Why do I get these error messages? And if I delete one object from the world, the entire gazebo window will be closed. Why?

p.s. I am working with Fuerte ROS on Ubuntu 12.0.4

Thanks,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-08-07 22:45:47 -0600

prasanna.kumar gravatar image

The last part of what you are mentioning has happened to many who are using fuerte. The bug has been fixed. Regarding the uncoloured object, the fuerte does not support the all the materials that the electric does and neither the simulator_gazebo tutorial nor the pr2_simulator tutorial is updated. There is no material called LightWood in fuerte. Try basic colours like Blue Red etc. I would also suggest you to switch back to electric (on ubuntu 11.04 if possible). I myself went to fuerte and tried working on gazebo but found too many bugs. So, I came back to electric. Hope this helps!

edit flag offensive delete link more

Comments

Thanks for your answer. How about the coffee cup? Why do I get Namespace error? and there is no coffee cup in the world.

Zara gravatar imageZara ( 2012-08-08 06:50:38 -0600 )edit

I am facing similar problems, Not able to embed .model file in .world file.

I am also planning to switch back (after a little more try), were you able to install rosjava on electric?

aknirala gravatar imageaknirala ( 2012-09-13 08:27:17 -0600 )edit

Any specific reason why 10.04 and not 10.10?

aknirala gravatar imageaknirala ( 2012-09-13 22:41:57 -0600 )edit

I have no idea about rosjava and I worked neither on 10.04 nor 10.10 before with electric.

prasanna.kumar gravatar imageprasanna.kumar ( 2012-09-14 08:49:18 -0600 )edit

Thanks for your reply,

Ooops I mistakingly wrote 10.04 and 10.10. I meant to ask 11.10 and 11.04. Things were fine on 11.10 and electric (for me) except for ROSJAVA, (I was able to run it only once).

So any specific reason to prefer 11.04 over 11.10?

aknirala gravatar imageaknirala ( 2012-09-14 21:48:21 -0600 )edit

Nothing, I have never used 11.04 before (I don't even know how it looks like). Used 11.10 for a long time, upgraded to 12.04 and fuerte, found both crappy and downgraded both. You can work assured with this combination 11.04+electric!

prasanna.kumar gravatar imageprasanna.kumar ( 2012-09-14 23:30:15 -0600 )edit

ok, thanku

aknirala gravatar imageaknirala ( 2012-09-15 01:50:40 -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-08-07 17:05:49 -0600

Seen: 1,391 times

Last updated: Aug 07 '12