Running ros2 and rviz2

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu 22.04 desktop

Which version of system do you use? Khadas official images, self built images, or others?

Official from OOWOW

Please describe your issue below:

I am getting an error trying to run rviz2 after installing ros2-humble in the normal way. Resolved previous error with qt using the solution here:

Has anyone successfully installed ros2 and rviz2?

Post a console log of your issue below:

khadas@Khadas:~$ rviz2

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
rviz2: symbol lookup error: /usr/lib/aarch64-linux-gnu/qt5/plugins/wayland-graphics-integration-client/ undefined symbol: eglGetPlatformDisplay

Never used this software. Did look into it and found that per their website it will only run on 20.04.

Thank you for checking! Lots of people use ros for robotics and collecting sensor data. Iā€™m excited to get it running on VIM4!

The version I installed, ros2 (humble hawksbill), is the correct version for Ubuntu 22.04 (jammy). I tried on a fresh install using the fenix build on ooowow. Install directions are here:

It looks like I may have to try installing ros from sources to get it sorted.

If anyone has had better luck please let me know.

OK, found a solution that works. It seems like there is some issue with how wayland and qt are packaged. You can set the platform to use x11 instead by setting the QT_QPA_PLATFORM environmental variable to xcb before you call rviz2.

I got rviz2 running like this:

QT_QPA_PLATFORM=xcb /opt/ros/humble/bin/rviz2

Thanks for the fix! This works on Edge 2 also :+1: