rviz: Pixmap error

I am getting a could not load pixmap error on launching rviz from command line. Edit:

env | grep ROS output:

 ROS_ROOT=/opt/ros/kinetic/share/ros
 ROS_PACKAGE_PATH=/home/bruno/rodain/src:/opt/ros/kinetic/share
 ROS_MASTER_URI=http://localhost:11311
 ROSLISP_PACKAGE_DIRECTORIES=/home/bruno/rodain/devel/share/common-lisp
 ROS_DISTRO=kinetic
 ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
[ERROR] [1506641021.377086471]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/rotate.svg'
[ERROR] [1506641021.377135684]: Could not load pixmap 'package://rviz/icons/rotate.svg' -- using default cursor instead.
[ERROR] [1506641021.377253031]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/rotate_cam.svg'
[ERROR] [1506641021.377287850]: Could not load pixmap 'package://rviz/icons/rotate_cam.svg' -- using default cursor instead.
[ERROR] [1506641021.377410667]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/move2d.svg'
[ERROR] [1506641021.377431056]: Could not load pixmap 'package://rviz/icons/move2d.svg' -- using default cursor instead.
[ERROR] [1506641021.377542997]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/move_z.svg'
[ERROR] [1506641021.377562364]: Could not load pixmap 'package://rviz/icons/move_z.svg' -- using default cursor instead.
[ERROR] [1506641021.377665627]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/zoom.svg'
[ERROR] [1506641021.377683917]: Could not load pixmap 'package://rviz/icons/zoom.svg' -- using default cursor instead.
[ERROR] [1506641021.377811890]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/crosshair.svg'
[ERROR] [1506641021.377880949]: Could not load pixmap 'package://rviz/icons/crosshair.svg' -- using default cursor instead.
[ERROR] [1506641021.416289617]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/cursor.svg'
[ERROR] [1506641021.463267288]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/classes/FocusCamera.svg'
[ERROR] [1506641021.463561290]: Could not load pixmap 'package://rviz/icons/crosshair.svg' -- using default cursor instead.
[ERROR] [1506641021.463812126]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/classes/Measure.svg'
[ERROR] [1506641021.463971367]: Could not load pixmap 'package://rviz/icons/crosshair.svg' -- using default cursor instead.
[ERROR] [1506641021.468855407]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/classes/PublishPoint.svg'
[ERROR] [1506641021.469326412]: Could not load pixmap 'package://rviz/icons/rotate.svg' -- using default cursor instead.
[ERROR] [1506641021.469346630]: Could not load pixmap 'package://rviz/icons/rotate_cam.svg' -- using default cursor instead.
[ERROR] [1506641021.469356549]: Could not load pixmap 'package://rviz/icons/move2d.svg' -- using default cursor instead.
[ERROR] [1506641021.469365634]: Could not load pixmap 'package://rviz/icons/move_z.svg' -- using default cursor instead.
[ERROR] [1506641021.469374719]: Could not load pixmap 'package://rviz/icons/zoom.svg' -- using default cursor instead.
[ERROR] [1506641021.469386709]: Could not load pixmap 'package://rviz/icons/crosshair.svg' -- using default cursor instead.
[ERROR] [1506641021.473885044]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/classes/Displays.svg'
[ERROR] [1506641021.477150495]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/classes/Views.svg'
[ERROR] [1506641021.478738232]: Could not load pixmap '/opt/ros/kinetic/share/rviz/icons/classes/Time.svg'

OBS: ogre.log file is not being generated

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (12 by maintainers)

Most upvoted comments

I had the same problem, due to a corrupted Qt5 installation. You could try setting the following environmental variable: export QT_DEBUG_PLUGINS=1 and then running rviz in the same terminal. In my case the debug prints said: Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqsvg.so: (libQt5Svg.so.5: cannot open shared object file: No such file or directory). So I solved the issue by reinstalling the related Qt plugin (sudo apt-get --reinstall install libqt5svg5).

Make sure you don’t have another Qt library in your LD_LIBRARY_PATH ahead of what ROS needs. I had the same problem because I was also trying VREP and had the following lines in my ~/.bashrc file:

export VREP_ROOT=$HOME/bin/V-REP_PRO_EDU_V3_6_2_Ubuntu16_04/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$VREP_ROOT
export QT_QPA_PLATFORM_PLUGIN_PATH=$VREP_ROOT

Once I commented these out and sourced my ~/.bashrc file the problem went away.

Noticed this bug while running rviz2 from a docker container. It looks like the debian package for rviz2 doesn’t include libqt5svg5 as a dependency. Installing the package manually fixed the issue for me.