Ask Your Question
2

Objects spawning and falling down immediately in Gazebo

asked 2011-08-14 10:27:22 -0500

I am trying to simulate a table with many objects on it. But some of objects get spawned quicker than the table, and they simply fall down on the floor. Each time different ones randomly.

I am looking for way to stop physics simulation, till all the objects are spawned. Is it possible to write it somehow into launch file? "Pause physics" is a service, not a node, so it gets compicated...

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
0

answered 2011-08-14 11:05:10 -0500

Matt Klingensmith gravatar image

Could you call the pause physics service first, and then spawn each of your objects with the SpawnModel service?

edit flag offensive delete link more

Comments

Well, now I do almost like that: in one launch file I spawn only world and table, then I call another launch file which spawns all remaining objects. But it's a kind of workaround. I was looking for a convenient way to do this.
robofreak gravatar image robofreak  ( 2011-08-15 05:01:35 -0500 )edit
2

answered 2015-11-17 07:50:13 -0500

The IMHO cleanest approach for starting up Gazebo in cases like this is starting it in paused mode. You'll need to press the "play" button after things started up, but you'll have a very reproducible setup using only a single launch file. To start Gazebo paused, you have to provide it with the "-u" option. An example is the combination of these two launch files, using arguments: main launch file, common gazebo start launch file.

edit flag offensive delete link more
1

answered 2011-08-14 14:22:59 -0500

hsu gravatar image

updated 2015-11-17 03:50:11 -0500

130s gravatar image

You can implement a 'wait for model' function in your model spawner if you have one, or use the '-wait' option in my spawn_model utility script.

edit flag offensive delete link more
0

answered 2011-08-14 13:54:13 -0500

vincent gravatar image

updated 2011-08-14 13:54:48 -0500

you can turn off the gravity by adding

<turnGravityOff>true</turnGravityOff>

to your object model description file.

edit flag offensive delete link more

Comments

2
That's how it's done in simple gazebo world example - they reduce the gravity and the cup stand still on the table. But I want the objects to fall from the table afterwards, if robot pushes them. So, it's not the solution.
robofreak gravatar image robofreak  ( 2011-08-15 05:03:25 -0500 )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

1 follower

Stats

Asked: 2011-08-14 10:27:22 -0500

Seen: 4,580 times

Last updated: Nov 17 '15