ros / ros_tutorials

Code used in tutorials found on ROS wiki
http://wiki.ros.org/ros_tutorials
787 stars 537 forks source link

[ROS2 galactic windows] cannot start turtlesim - no Qt platform plugin could be initialized #126

Closed flynneva closed 2 years ago

flynneva commented 3 years ago

ive followed the ros2 galactic installation instructions (installed Qt 6.2.0 instead of 5.15.0) and set the proper env vars as stated in the instructions for windows.

I've confirmed that the qwindows.dll exists in the path below when I copy & paste it into a finder window....just it seems I am missing something else.

Any advice would be extremely helpful!

 ros2 run turtlesim turtlesim_node
qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "C:\Qt\6.2.0\msvc2019_64\plugins\platforms"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
flynneva commented 3 years ago

found this on stack overflow that sounds very similar to my problem: https://stackoverflow.com/questions/20495620/qt-5-1-1-application-failed-to-start-because-platform-plugin-windows-is-missi

flynneva commented 3 years ago

going to install 5.15.0 and see if that fixes the problem

flynneva commented 3 years ago

same problem with Qt 5.15.0 on windows.

 ros2 run turtlesim turtlesim_node
qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "C:\Qt\5.15.0\msvc2019_64\plugins\platforms"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Ehsan8994 commented 3 years ago

I have same problem, this work for me maybe solve your problem. copy "qwindows.dll" from C:\dev\ros2_galactic\bin\platforms and replace it with the same in "C:\Qt\5.15.0\msvc2019_64\plugins\platforms".

icsl-Jeon commented 3 years ago

I have same problem, this work for me maybe solve your problem. copy "qwindows.dll" from C:\dev\ros2_galactic\bin\platforms and replace it with the same in "C:\Qt\5.15.0\msvc2019_64\plugins\platforms".

It works! thank you

vishalchawathe commented 2 years ago

@Ehsan8994 Thanks Your workaround helped.

AniketWagh2001 commented 2 years ago

@Ehsan8994 thanks this savedme

jonathan-sung commented 2 years ago

I have same problem, this work for me maybe solve your problem. copy "qwindows.dll" from C:\dev\ros2_galactic\bin\platforms and replace it with the same in "C:\Qt\5.15.0\msvc2019_64\plugins\platforms".

It worked! Thank you so much!

sloretz commented 2 years ago

I can reproduce on a fresh Windows machine. Maybe it's caused by the Windows packaging job building with 5.12.0, not 5.15.0 https://github.com/ros-infrastructure/ros2-cookbooks/blob/de9d4cc159f2c4402e4636c458ad4bc535d0610d/cookbooks/ros2_windows/recipes/qt5.rb#L74-L75

sloretz commented 2 years ago

Installing Qt 5.12.12 resolves the issue for me. I opened a PR to update the ROS 2 install instructions: https://github.com/ros2/ros2_documentation/pull/2499