ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rviz does not start, no error messages

asked 2018-07-03 14:18:17 -0500

kpashov gravatar image

updated 2018-07-05 07:18:16 -0500

Hello, I have been trying to run rviz (ros kinetic) on an Ubutnu 16.04 machine, but I am not having any luck. The messages look right and stop at OpenGL version: 3 (GLSL 1.3). I have checked everything I could find online (obviously to no avail):

Edit: I'm running it with rosrun rviz rviz

  • Running with --debug does not produce anything useful rosrun --debug rviz rviz
  • Running something like image_view works - so some of the underlying libraries are still working rosrun image_view image_view image:=/camera/rgb/image_color
  • Trying to start with export LIBGL_ALWAYS_SOFTWARE=1 does not resolve the problem. Also, OpenGL still stays at 3 LIBGL_ALWAYS_SOFTWARE=1 rosrun rviz rviz
  • Running under gdb only tells me that two threads exit shortly after rviz is started. Does not tell me what they are doing or even if they are the problem. For all I know, this could be rviz loading config. This was run using gdb -ex run /opt/ros/kinetic/lib/rviz/rviz.

An additional clue is that the ubuntu launcher icon for Rviz does not have a filled triangle on the left - this implies that the application does not have a window.

Edit:

The machine I am running it on is:

  • Bare metal
  • Ubuntu 16.04, kernel 4.15
  • i7 3770

The graphics driver info is:

*-display description: VGA compatible controller product: Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 09 width: 64 bits clock: 33MHz capabilities: msi pm vga_controller bus_master cap_list rom configuration: driver=i915 latency=0 resources: irq:29 memory:f7800000-f7bfffff memory:e0000000-efffffff ioport:f000(size=64) memory:c0000-dffff

Also, the following command as per this response:

user@computer-2:~$ modinfo i915 | grep filename produces filename: /lib/modules/4.15.0-24-generic/kernel/drivers/gpu/drm/i915/i915.ko

I tested OpenGL using glmark2, as suggested below, and it worked. However, the version of OpenGL is 3, not 4.6. It is using the mesa 17.* drivers, if that matters.

edit retag flag offensive close merge delete

Comments

What command are you using to run it?

adamconkey gravatar image adamconkey  ( 2018-07-03 14:49:39 -0500 )edit

'rosrun rviz rviz'

kpashov gravatar image kpashov  ( 2018-07-03 14:52:05 -0500 )edit

Do you have the proper drivers installed? If you have an Nvidia card, install the nvidia binary drivers. If this is a Virtual Machine, it's going to be difficult.

gvdhoorn gravatar image gvdhoorn  ( 2018-07-03 15:56:42 -0500 )edit

I have updated the original question. I have an onboard GPU in the processor that I am using. It was already using the i915 driver, I have just updated it to the latest one as well. However, this has not resolved the issue :/.

kpashov gravatar image kpashov  ( 2018-07-04 11:07:40 -0500 )edit

RViz uses OpenGL extensively. Without that working, it won't start, or it'll be very slow.

Can you run other OpenGL applications?

gvdhoorn gravatar image gvdhoorn  ( 2018-07-05 02:28:07 -0500 )edit

Hi, thank you for your response. I tested OpenGL with glmark2 and it worked - the horse pops up and spins around. glmark reports OpenGL version 3, using the mesa 17.* drivers (so quite recent).

kpashov gravatar image kpashov  ( 2018-07-05 07:20:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-07-05 12:59:10 -0500

kpashov gravatar image

updated 2018-07-06 03:18:13 -0500

I finally found what was causing the issue. Thank you all for the help!

@gvdhoom was on the right track, this was an OpenGL issue. Not just any OpenGL issue, a particularly annoying one because a lot of articles online don't tell you how to check for it.

To check if you have the same problem, try runninng glxgears. This should run without error. However, it won't be displaying a window - same problem as rviz. It will just display an icon telling you its running without the gears coming up. Other applications, such as glmark2 will run just fine. If you can't run either or both of these programs, then you need to install the proper drivers first and then try again.

The solution was to add the XOrg config file that everyone says "you should not need anymore". This Arch wiki entry about Intel HD graphics drivesr talks about "special features" that you can enable by enabling some magic.

On Arch every file is in a weird place. On Ubuntu, the xorg config files are in a different place.

TLDR;

Create a file with the following contents in the location below:

Section "Device"
  Identifier  "Intel Graphics"
  Driver      "intel"
EndSection

/usr/share/X11/xorg.conf.d/20-intel.conf

If the computer goes to sleep, you resume and can't go back into your previous session, then glxgears won't work. Restarting and going back seems to fix it.

(how does one do code blocks in this version of *.md?):

edit flag offensive delete link more

Comments

(how does one do code blocks in this version of *.md?):

it's not actually markdown, but askbot markup.

Code blocks (or really: verbatim text) are created by selecting the text and pressing the Preformatted Text button (the one with 101010 on it).

gvdhoorn gravatar image gvdhoorn  ( 2018-07-05 14:55:03 -0500 )edit

it works, thx

howind gravatar image howind  ( 2019-01-07 03:57:41 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-07-03 14:18:17 -0500

Seen: 3,645 times

Last updated: Jul 06 '18