Gazebo | Ignition | Community
Ask Your Question
0

Unable to create DepthCameraSensor when launching in remote computer

asked 2015-02-24 04:44:00 -0600

updated 2015-04-23 18:58:44 -0600

Jose Luis Rivero gravatar image

Hi, I am launching my simulation on a remote computer and setting my ROS_MASTER_URI to it. To avoid walking to the remote computer (which is at the other side of the room) I connect remotely (ssh) to it an launch the simulation there. Since I do not need the rendering, just the simulation, I use gzserver.

However, when I launch the world with gzserver remotely I get the following error:

gzserver my_world_with_a_kinect.world

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.100.106
[Err] [RenderEngine.cc:680] Can't open display: 
[Wrn] [RenderEngine.cc:92] Unable to create X window. Rendering will be disabled 
[Err] [DepthCameraSensor.cc:78] Unable to create DepthCameraSensor. Rendering is disabled.

Testing with rviz, I see nothing. The depth camera topics are not even created.

However, if I move to the remote computer and execute the same command everything works OK.

I know that been a remote connection, you don't have the Xs unless you connect with ssh -X <ip>. My computer is a Mac and does not have the Xs. Some people suggested me to install Xs but I cannot (for several reasons).

Additionally, I am running other remote simulations and evn if I get the 'Can't open display' error message, everything works fine.

The question is: how can I make the kinect work properly in such a remote environment?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2015-03-23 11:07:04 -0600

I finally found the solution to this problem.

The solution is to use the Xvfb with some specific parameters.

First, install Xvfb

sudo apt-get install xvfb

Then, start xvfb with the following parameters:

Xvfb -shmem -screen 0 1280x1024x24

Finally, launch gzserver exporting the DISPLAY to the one created by xvfb:

DISPLAY=:0 gzserver <your options here>

And that is all! Happy remote simulation!

edit flag offensive delete link more

Comments

Awesome. Thanks for sharing the solution.

Jose Luis Rivero gravatar imageJose Luis Rivero ( 2015-03-23 12:31:54 -0600 )edit
0

answered 2015-02-24 11:54:28 -0600

nkoenig gravatar image

The depth camera sensor uses an offscreen buffer for rendering. The subtlety is that gzserver needs a active X-session to make this work. Is you remote machine running an x-server? If so, you may need to set the display on the remote machine.

edit flag offensive delete link more

Comments

Thanks Nkoenig for your reply. I understand what you mean. That would imply exporting the var DISPLAY to the active x-session of the remote computer (just to use its buffer). Based on your reply, what I am going to try is to enable the Framebuffer (http://hacklab.cz/2012/04/22/usefulness-linux-framebuffer-virtual-console) and set the DISPLAY to it.

Ricardo Tellez gravatar imageRicardo Tellez ( 2015-02-25 02:57:30 -0600 )edit

Tested the Xvfb in order to create a virtual X system. Even if Xvfb works correctly, the depth sensor does not work and complains on not existing X. Any other idea to bypass the X?

Ricardo Tellez gravatar imageRicardo Tellez ( 2015-03-06 11:34:16 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-02-24 04:44:00 -0600

Seen: 4,219 times

Last updated: Apr 23 '15