8. ROS manual

8.1. Install the ROS

Follow the official installation tutorial to install ROS. Official Installation Tutorial

8.2. Install libglx

Rviz and Gazebo are written based on GLX. Our system only supports EGL at present, so they cannot use GPU acceleration, and GLX library needs to be installed to run properly.

apt install -y libgl1-mesa-glx libgl1-mesa-dri libglx-mesa0
reboot

8.3. Update libqt5opengl5-dev

If RVIz does not run, RQT displays errors such as QOpenGLTimeMonitor. You need to update libqt5OpengL5-dev. Do the following to try running programs like RQT, RVIz, and Gazebo.

sed -i 's/.*wiki.t-firefly.com.*/\#&/' /etc/apt/sources.list
apt install libqt5opengl5-dev
sed -i '/.*wiki.t-firefly.com.*/s/^#//' /etc/apt/sources.list

8.4. Run Rviz, RQT and Gazebo under Wayland

XWayland instructions

GLX-based programs run in Wayland and need to use XWayland. Use QT_QPA_PLATFORM=xcb to force Qt applications to use X11.

QT_QPA_PLATFORM=xcb rviz
QT_QPA_PLATFORM=xcb rqt
QT_QPA_PLATFORM=xcb gazebo
# You can also set the environment to bashrc to run programs like RVIz directly.
echo "export QT_QPA_PLATFORM=xcb" >> /~/.bashrc