DRCSIM: Can't figure out how to run Gazebo on remote machine and get vision input.
I want to set up Gazebo to run remotely on one machine, and do control from another machine (the DRCSIM setup). This seems to run into a problem which must have been solved in cloudsim: how does the rendering for the simulated cameras get done? Whose GPU is used (the remote gazebo machine or the local ROS machine)? Note I am not trying to run a gzclient at all. I want ROS to work over the network (which it seems to do just fine). I can't get gzserver to simulate cameras when launched remotely.
If I log in on the console of machine 1 and type
source /usr/local/share/drcsim/setup.sh roslaunch atlas_utils qual_task_1.launch
on machine 1 and run something that just displays images from the topic /multisense_sl/camera/left/image_raw on machine 2, everything works fine. I see the robot on machine 1's display and the simulated camera view of gates on machine 2.
If I log in on the console of machine 1 and run a gzserver instead:
source /usr/local/share/drcsim/setup.sh roslaunch atlas_utils qual_task_1.launch gzname:=gzserver
on machine 1 and run something that just displays images from the topic /multisense_sl/camera/left/image_raw on machine 2, everything works fine. I see no client or image on machine 1 and the simulated camera view of gates on machine 2.
If I try to use machine 1 remotely I fail. First without trying to own the display:
ssh machine1 source /usr/local/share/drcsim/setup.sh roslaunch atlas_utils qual_task_1.launch gzname:=gzserver
I get the error message:
Error [RenderEngine.cc:608] Can't open display: Warning [RenderEngine.cc:87] Unable to create X window. Rendering will be disabled Error [MultiCameraSensor.cc:81] Unable to create MultiCameraSensor. Rendering is disabled.
I can rostopic echo /clock on machine 2, but I can't view the images.
Using -X (which should be irrelevant because I want to own machine 1's display. I am not displaying anything from machine 1 directly on machine 2).
ssh machine1 -X source /usr/local/share/drcsim/setup.sh roslaunch atlas_utils qual_task_1.launch gzname:=gzserver
I get the same error message, and I can rostopic echo /clock on machine 2, but I can't view the images.
Okay. Now I leave myself logged on to the console of machine 1, which I don't want to do since I want others to be able to use Gazebo remotely on this machine. Logging in with ssh with and without -X work as long as I say on machine1:
export DISPLAY=machine1:0.0
This does not work if someone else is logged in on the console of machine 1 and owns the display, or if no one is logged in to the console of machine 1 (including me). I get the error message:
Error [RenderEngine.cc:608] Can't open display: machine1:0.0 Warning [RenderEngine.cc:87] Unable to create X window. Rendering will be disabled Error [MultiCameraSensor ...