Skip to content

rviz Troubleshooting

rethink-cgindel edited this page Nov 13, 2013 · 3 revisions

First Step: Double-Check rviz setup

Setting up rviz:

  1. Make sure rviz is installed (and all dependencies)
    $ rospack find rviz
    /opt/ros/groovy/stacks/visualization/rviz
    If not, install rviz:
    $ sudo apt-get install ros-groovy-visualization
    $ rosdep install rviz
  2. Make sure you are on a system capable of running rviz.
  3. Make sure your RSDK system is setup, initialized and communicating properly.
  4. Make sure you are receiving all necessary ROS topics and parameters.

Second Step: Check known and possible issues

Be sure to checkout the main rviz troubleshooting page: http://www.ros.org/wiki/rviz/Troubleshooting

[Known Issues](#Known Issues)

  1. rviz flickering 3D or image view
  2. [Head Joints](#Head Joints)

[Possible Issues](#Possible Issues)

  1. Network Connectivity
  2. Graphics context not supported (i.e. trying to run rviz in VM)
  3. Global: Fixed Frame is broken on start (set to /map by default)
  4. Global: Fixed Frame is empty, as is drop-down
  5. When you try to Add >> Display Types, the list is empty
  6. RViz in VMWare (Add TROUBLESHOOTING)
  7. Flickering 3D View
  8. 3D Hardware Acceleration

Known Issues

 

  1. Flickering in rviz 3D and camera views can occur with some graphics drivers (depends on computer and monitor).
  • Solution: Unset the LIBGL_ALWAYS_INDIRECT environment variable.
    Right before starting rviz (or any gui program), check if the environment variable LIBGL_ALWAYS_INDIRECT is set.
    bash $ env | grep LIBGL_ALWAYS_INDIRECT LIBGL_ALWAYS_INDIRECT=1 If so, unset the variable, then you can run rviz normally. bash $ unset LIBGL_ALWAYS_INDIRECT

Possible Issues

 

  1. Network Connectivity

  2. Graphics context not supported (i.e. trying to run rviz in VM)

  • (Ogre can’t make GL context)

  3. Global: Fixed Frame is broken on start (set to /map by default)

  4. Global: Fixed Frame is empty, as is drop-down

  • Try putting in an intentionally bad frame for Fixed Frame, then look under .Global Status at the error for it. It will hopefully tell you that Fixed Frame is broken and your frame is bad, and then you will hopefully be able to click on the drop-down and see all the available frames.

  5. When you try to Add >> Display Types, the list is empty

  • seen this multiple times, I think on desktop machine and laptop
  • think I’ve seen this even when the Fixed Frame has worked
  • might be something to do with ROS_IP/HOSTNAME stuff ... doesn’t look like it

NOTE: It is intermittent, restarting rviz made it work (this is after setting a proper frame in a previous rviz run, and then on this time it worked, the frame was blank at first, then appeared).

  6. RViz in VMWare (Add TROUBLESHOOTING)

  • after making sure that my VM was using hardware acceleration, had mesa-utils installed (wasn’t by default, then I could run glxinfo, and glxgears; important information is glxinfo | grep direct --> giving: “direct rendering: Yes”), then I had to change the RTT Preferred Mode from PBuffer to Copy, by instead running rviz like this: $ OGRE_RTT_MODE=”Copy” rosrun rviz rviz &

  • it would work intermittently (maybe not crash 1 out of 6 times)

  • Problem: The problem started with an error (when trying to run rviz) of:

    [ros - http://ptwo1:11311] rsdkuser@ubuntu:~/dev/ros_ws$ [ INFO] [1357935356.117148281]: rviz revision number 1.6.7 [ INFO] [1357935356.117316987]: ogre_tools revision number 1.6.3 [ INFO] [1357935356.117330449]: compiled against OGRE version 1.7.3 (Cthugha) [ INFO] [1357935356.449287289]: Loading general config from [/home/rsdkuser/.rviz/config] [ INFO] [1357935356.449722678]: Loading display config from [/home/rsdkuser/.rviz/display_config] [ INFO] [1357935356.511535673]: RTT Preferred Mode is PBuffer. [ERROR] [1357935356.513657284]: Caught exception while loading: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /tmp/buildd/ros-electric-visualization-common-1.6.3/debian/ros-electric-visualization-common/opt/ros/electric/stacks/visualization_common/ogre/build/ogre_src_v1-7-3/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)

    • Solution: mesa was not installed completely
      • trying to run glxinfo failed, because it wasn’t installed; told me to install mesa-utils
      • ran: $ sudo apt-get install mesa-utils
      • now glxinfo works, can run $ glxinfo | grep version to see version info:
      • can also run glxgears. (not sure if I may have been able to before too)
  • Problem: Still getting same error on rviz start though

    • Solution: Found out people get that error when LIBGL_ALWAYS_INDIRECT=”1” is set.
      • Also found that that is a compviz error! It is set when you open a terminal using Ctrl+Alt+T!!!
      • unset it, and the red exception error went away
  • Problem: rviz still won’t start up but crashes intermittently with either an X Error of ‘BadDrawable (invalid Pixmap or Window parameter)’, or just Seg Faults.

    • Solution: Found out this is a known intermittent problem by looking at the rviz troubleshooting page. By setting the OGRE_RTT_MODE environment variable from “PBuffer” to “Copy” or “FBO”, can get it to work intermittently.

  7. Flickering 3D View

  • make sure you have unset LIBGL_ALWAYS_INDIRECT  
  1. 3D Hardware Acceleration
    1. Installing/uninstalling graphics drivers
    2. VM / capability
    3. glxinfo  
  2. Bypassing Hardware Acceleration
  • In the event you cannot get Hardware Acceleration to work, you can try setting rviz up to only use software rendering: bash $ unset LIBGL_ALWAYS_INDIRECT $ export LIBGL_ALWAYS_SOFTWARE=1 $ rosrun rviz rviz &
  • If this still doesn't work, try additionally running with the alternative values for the OGRE_RTT_MODE variable (see #6), e.g:
    bash $ OGRE_RTT_MODE=Copy rosrun rviz rviz &

Clone this wiki locally