From: Brian G. <ge...@ai...> - 2004-06-27 16:22:20
|
On Thu, 24 Jun 2004, Douglas S. Blank wrote: > ahoward wrote: > > [snip] > > > Seriously, though: it would make sense to include a bunch of "utility" > > scripts in the Gazebo and/or Player distro that do the required process > > and config/world file management. That would keep the two packages > > "clean" while still providing the functionality that you (and others) are > > looking for. Let us know if you develop something you like. > > > > A. > > Here is a "gazeboplayer" script that takes a configuration filename and > a world filename, starts both up, waits for gazebo to finish, then kills > player. I'm not a shell programmer, so if there are better ways, please > let me know. That looks pretty reasonable, although if possible I'd like to avoid the nearly-arbitrary sleep time, because it'll certainly fail for some people. Is there some way that Gazebo can advertise that it's up and ready? In my mind, tools like this should go in the Gazebo distro. brian. > ---------------------------------------------- > > #!/bin/sh > > # A shell script to get gazebo and player running together > > config=$1 > world=$2 > > # Start gazebo > gazebo $world & > gpid=$! > # Wait a sec for it to get started > sleep 1 > # Now, start the player layer > player -g default $config & > ppid=$! > # Wait for gazebo to finish > wait $gpid > # Kill player > kill $ppid > > > > > Andrew Howard email: ah...@po... > > Department of Computer Science http: www-robotics.usc.edu/~ahoward > > University of Southern California phone: 1 (213) 740 6416 > > Los Angeles, CA, U.S.A. 90089-0781 fax: 1 (213) 821 5696 > > << Insert pithy saying here >>> > > -- Brian P. Gerkey ge...@ai... Stanford AI Lab http://ai.stanford.edu/~gerkey |