Ask Your Question
5

run gazebo remotely

asked 2011-03-07 05:02:28 -0600

updated 2011-03-08 00:46:46 -0600

Hello, I am experimenting with the pick and place demo: http://www.ros.org/wiki/pr2_simulator... I can run it on two machines : a dual-core and a 16-core machines. However if I try to connect to the 16-core via SSH and run it the Gazebo dies. I can see the gazebo window for a couple of seconds and then it fails.

I am connecting via "ssh -X" and "ssh -Y" neither works. Also, I do not have direct root access to the 16-core but know s.o. who has.

Edit: They told me that I can run gazebo headless, but that is not going to be enough.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2011-03-16 06:20:21 -0600

hsu gravatar image

Hi, to run gazebo on a remote machine, you'll need X running on your remote machine and export DISPLAY variable to point to the local display on the remote machine before launching gazebo. For example, if your local machine (dual-core) is called machine1 and remote machine (16-core) is called machine2. Suppose a ros core has been started on machine2. To start gazebo on machine2, you can:

  1. ssh into the remote machine.

    ssh machine2

  2. set up your ROS_MASTER_URI to point to the ros core

    export ROS_MASTER_URI="http://machine2:11311"

  3. make sure X is up and running on machine2 and xhost allows your user to access the display, then

    export DISPLAY=:0

  4. and start gazebo as usual, e.g.

    roslaunch pr2_gazebo pr2_empty_world.launch

  5. Back on machine1, make sure to point your ROS_MASTER_URI to machine2 and you should be able to see all the simulated PR2 ros topics. .

Note that the gazebo gui, if enabled, will be spawned on the remote machine2. So it is recommended that -g flag is given to turn off the gazebo gui if you're going to be working from the local machine, e.g.

< node name="gazebo" pkg="gazebo" type="gazebo" args="-g -u $(find gazebo_worlds)/worlds/empty.world" respawn="false" output="screen" />

I am looking for ways to make this process more transparent, please let me know if you run into any issues. Thanks.

edit flag offensive delete link more

Comments

that was very helpful but I'd like to be able to see the GUI on machine 1. I see the GUI chrome loading on machine1 but then I get /opt/ros/cturtle/stacks/simulator_gazebo/gazebo/build/gazebo/server/rendering/OgreCreator.cc:441 : Exception: Unable to create the rendering window
Dimitar Simeonov gravatar imageDimitar Simeonov ( 2011-03-18 02:37:56 -0600 )edit

I know this is old, but I'd also really like to do this and it's not quite working! I exported DISPLAY=:0 and added the -g argument to the Gazebo node; still seg faults. Running Gazebo 1.5 (pr2_gazebo on Groovy). Is there a way to verify step 3 (X up and running)? `service lightdm status` says OK.

mbforbes gravatar imagembforbes ( 2014-07-16 22:32:12 -0600 )edit

Can you plz elaborate on the step 3? I have also tried setting up the display and -g, and still get seg faults. I am not sure if I set up X correctly

aditi741997 gravatar imageaditi741997 ( 2019-08-26 12:21:33 -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

2 followers

Stats

Asked: 2011-03-07 05:02:28 -0600

Seen: 4,974 times

Last updated: Mar 16 '11