Gazebo | Ignition | Community
Ask Your Question

Unable to create DepthCameraSensor when launching in remote computer

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

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

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:


[Msg] Waiting for master.
[Msg] Connected to gazebo master @
[Msg] Publicized address:
[Err] [] Can't open display: 
[Wrn] [] Unable to create X window. Rendering will be disabled 
[Err] [] 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

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

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


Awesome. Thanks for sharing the solution.

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

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

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


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 ( and set the DISPLAY to it.

Ricardo Tellez gravatar imageRicardo Tellez ( 2015-02-25 02:57:30 -0500 )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 -0500 )edit

Question Tools

1 follower


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

Seen: 4,114 times

Last updated: Apr 23 '15