Main Page | Recent changes | Edit this page | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

Gazebo User Notes

From DGC Wiki

Planning_Simulation

Contents

Gazebo Notes

This page contains various information that will be very valuable to every Gazebo developer. I suggest everyone puts their notes about anything they experience they spent time on figuring out!

Network issues

Running remotely through X

It is not recommended to run Player+Gazebo remotely on another computer, forwarding X-packets over the network. This is because the X windows system is rendering images remotely and then sends them over the socket to display on your computer. That is very slow and takes alot of CPU, so simulation is impossible to do like that. Example: a PlayerClient.Read() call took 3.5 seconds on grandchallenge compared with <0.1 sec locally. There is a workaround though, that is to start gazebo with the -g0 switch. That turns off the GUI and you will get a Gazebo engine running without showing any camera windows. Not so fun but it is working just as fast as it would if you were running locally.

Running MTA modules locally

With a recent version of MTA it is now possible to run it on a local machine Here's instructions on how to do: Running MTA on a local machine

Reading from devices (using PlayerClient)

You have to be aware of that Gazebo's default feeding of data is 10Hz, so if you have a PlayerClient object that is connected to Player, you better be sure to catch up with that pace, or you will end up flooding the buffers and always reading very old data. A way to get away from this is to look at the int SetDataMode(unsigned char mode) or int SetFrequency(unsigned short freq) methods in playerclient.h (see the manual).
Important to know is that if you use PULL mode, you must call RequestData() before you do Read() or the program will stop at the Read() forever. Be aware that this slows down the getting of the data a LOT! Example estimated timing:

Mode                        Function                             Time
====                        ========                             =========
PLAYER_DATAMODE_PULL_NEW    PlayerClient.RequestData() + Read()    80000 us
PLAYER_DATAMODE_PUSH_NEW    PlayerClient.Read()                       20 us

Running Gazebo+Player on your local machine

You might want to run as many as possible of your MTA modules on remote computers (probably race computers). I noticed that MTA SendQuery() function call took 900ms when I was running Gazebo+Player+PlayerInterface+GlobalPlanner compared to 2ms when PlayerInterface+GlobalPlanner was running on a race computer instead. This difference also relates to the previous note, about filling up the buffers since Gazebo will post data to Player faster than your program is fetching it!


Documentation sources

Retrieved from "http://kincora.cds.caltech.edu../../../g/a/z/Gazebo_User_Notes_7d4a.html"

This page has been accessed 173 times. This page was last modified 00:51, 16 October 2004 by DGC Wiki user Henrik. Based on work by DGC Wiki user(s) Lars.


[Main Page]
Main Page
Alice Docs
DGC07
DGC05
Categories
Recent changes
Help

Edit this page
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports