Skip to content

armando-genis/rviz_dark_custom_theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rviz_dark_custom_theme

rviz2 Screenshot

→ 🔧 Dependencies

Make sure you have the following installed:

sudo apt update
sudo apt install -y ansible        
sudo apt install qt5ct             

→ 📝 Configuration Changes

Before you run, update your Qt5ct and Ansible files:

  1. In main.yml (lines 32–33):

      qt5ct_conf_file: "/workspace/rviz_dark_custom_theme/qt5ct.conf"
      me_qss_file:     "/workspace/rviz_dark_custom_theme/rviz.qss"

💡 Replacing Default RViz Icons

Changing a tool button’s icon for all states purely in QSS can be tricky. A more direct approach is to swap out RViz’s built-in icon files:

sudo find /opt/ros/humble/share/rviz_default_plugins/icons/classes/ -type f

Copy your custom SVG or PNG into place (use the exact same filename). This is an example inside the icons folder:

cp map_point.svg /opt/ros/humble/share/rviz_default_plugins/icons/classes/PublishPoint.svg
cp robot.png /opt/ros/humble/share/rviz_default_plugins/icons/classes/SetInitialPose.png
cp 2dgoal.png /opt/ros/humble/share/rviz_default_plugins/icons/classes/SetGoal.png

→ ⚙️ Compile & Install

Run the Ansible playbook to (re)install and configure the theme:

ansible-playbook -i localhost, main.yml

▶️ Run RViz2 with the Dark Theme

  1. Set the Qt5ct platform theme for your session:

    export QT_QPA_PLATFORMTHEME=qt5ct
  2. Launch RViz2 and enjoy the new look:

    rviz2

→ 🗑️ Remove the Theme

If you want to revert back:

# Remove the QSS file
rm -f ~/.config/qt5ct/qss/me.qss

# Remove or reset the qt5ct config
rm -f ~/.config/qt5ct/qt5ct.conf

# Unset the environment variable
unset QT_QPA_PLATFORMTHEME

→ 🔍 Inspect RViz UI at Runtime

Use GammaRay (or another Qt inspector) to peek under the hood:

gammaray --inprocess rviz2

🔑 Important panels live under Objects → VisualizationFrame.

About

A dark theme configuration for RViz2 using Qt5 and QSS — no pkg required for deployment

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published