Тёмный
No video :(

How to run Gazebo + RVIZ on Windows 10 using WSL2 

Emil Vidmark
Подписаться 2,9 тыс.
Просмотров 59 тыс.
50% 1

In this video I will show you how to run Gazebo and RVIZ in Windows using WSL2. This is really helpful as it makes it opens up the posibility for ROS1 development on Windows 10.
Installation Instructions WSL2:
docs.microsoft...
Installation of ROS, RVIZ and Gazebo:
wiki.ros.org/RO...
Commands to run in WSL2:
export GAZEBO_IP=127.0.0.1
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
export LIBGL_ALWAYS_INDIRECT=0

Опубликовано:

 

20 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 133   
@CaseyGregoire
@CaseyGregoire 2 года назад
Running 20.04, and ROS foxy, had to include both of these to see the robot mesh during the moveit tutorial. export LIBGL_ALWAYS_SOFTWARE=1 export LIBGL_ALWAYS_INDIRECT=0
@alexouwu
@alexouwu Год назад
I couldn´t get gazebo to run but this solved my problem. Thank you!!!!
@aVTuser
@aVTuser 11 месяцев назад
OMG THANK YOU!!!
@mohammadafifkasno9756
@mohammadafifkasno9756 10 месяцев назад
I tried using Ubuntu 20.04 and ROS Foxy, there is no errors in the coding however the GUI still not appeared. How to fix this?
@yiyunkim6062
@yiyunkim6062 3 года назад
I got gzclient: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory error while I was running gazebo to the terminal. Can you help me?
@gem-services4893
@gem-services4893 2 года назад
This is exactly what I got as errors Please how did you go about it
@isuriarachchige5659
@isuriarachchige5659 2 года назад
Hi. For this you need to type the command: sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/ This arises because of different directory locations.
@alexandrelarribau5624
@alexandrelarribau5624 Год назад
@@isuriarachchige5659 I've got the same problem and when i try this i get :"strip: Warning: '/usr/lib/x86_64-linux-gnu/' is a directory" and nothing changes. any idea ?
@alexandrelarribau5624
@alexandrelarribau5624 Год назад
well i asked my best friend chat gpt and turned out this worked :" sudo find /usr/lib/x86_64-linux-gnu/ -type f -exec sh -c 'file {} | grep ELF && strip --remove-section=.note.ABI-tag {}' \; "
@Stigmaru
@Stigmaru Год назад
This totally helped after everything else i found online didn't work
@3d_printall
@3d_printall 3 года назад
OMG I love you, I had been trying for 2 days
@emilvidmark
@emilvidmark 3 года назад
Glad to hear! Have a nice day and weekend :) Best regards, Emil
@lablonsk
@lablonsk 3 года назад
after 48h finally run. Thanks.
@isuriarachchige5659
@isuriarachchige5659 2 года назад
Does it always take this long?
@wh6910
@wh6910 2 года назад
Thanks sir . gazebo is ok but rviz no This message appeared qt.qpa.xcb: could not connect to display :0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. Aborted
@chiamakambanefo6645
@chiamakambanefo6645 11 месяцев назад
if gazebo works and rviz keeps giving an error, try running a wsl --update in the windows terminal and try again. this worked for me. took hours to figure out
@berktepe
@berktepe 2 года назад
Thanks, it is working. Strange thing is that Gazebo was starting and I could even subscribe to camera topic of the Turtlebot3 from Rviz but Gazebo GUI was not starting. Now everything works.
@alimaiee1647
@alimaiee1647 6 месяцев назад
how did you manage to do that?
@berktepe
@berktepe 6 месяцев назад
@@alimaiee1647 sadly I don't remember.
@zhihuauk5796
@zhihuauk5796 2 года назад
Thanks you so much Emil! You help me a lot!
@emilvidmark
@emilvidmark 2 года назад
Thank you for this nice comment!
@namanjaohari5189
@namanjaohari5189 10 месяцев назад
hey can you please me out with this error..... qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
@deadyanothaikiropool1chait713
@deadyanothaikiropool1chait713 2 года назад
Right now we can connect WSL to Arduino. Let's goooooooo
@aufarik
@aufarik 3 года назад
Emil, thank you for the tutorial! Could you please specify which version of Ubuntu in WSL and, respectively, ROS/Gazebo version are you using?
@emilvidmark
@emilvidmark 3 года назад
Hello Aufar and sorry for my late answer. I'm using Ubuntu 20.04 and the version of ROS is Noetic Ninjemys and for Gazebo i use version 11.1.0, I hope that helped you, have a nice day and please tell me if you have any wishes of content or something else. Best regards Emil Vidmark
@tomsai9748
@tomsai9748 Год назад
Thank you for this useful tutorial! By this method, can ros use gpu support instead of only cpu?
@saurabhmishra4467
@saurabhmishra4467 3 года назад
I am not able to run both rviz and gazebo. In case of gazebo nothing (not even an error) is showing up while in case of rviz, it is showing this error - "This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem." Btw thanks for the tutorial.
@TheMomentumhd
@TheMomentumhd 3 года назад
I have the same error
@TheMomentumhd
@TheMomentumhd 3 года назад
Edit. Aparently my .bashrc file was missing this "source /opt/ros/noetic/setup.bash" export GAZEBO_IP=127.0.0.1 export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0 export LIBGL_ALWAYS_INDIRECT=0 once I added all those I could run both rviz and gazebo. To edit. bashrc sudo nano ~/.bashrc scroll down to the bottom, then past the code to save press cntrl+o - Enter then cntrl+x
@MrSpeidey
@MrSpeidey 2 года назад
@@TheMomentumhd Hi I added the lines to the bashcr file but nothing changed :(
@thalakantikushala2140
@thalakantikushala2140 10 месяцев назад
Although I installed wsl and used ur commands but gazebo software is not opening
@eldnay5885
@eldnay5885 7 месяцев назад
I have same issue.
@ettorelandini5130
@ettorelandini5130 3 года назад
Thank you! You saved my day!
@emilvidmark
@emilvidmark 3 года назад
Glad I could help :-)
@emrekuyumcu108
@emrekuyumcu108 3 года назад
the gazebo simulation windows doesnt still show up, i have Ubuntu 18.04 LTS (Bionic Beaver) mit ROS Melodic, i really need help thats my 3. day trying to get this done :(
@paulina5247
@paulina5247 2 года назад
Have you came up with any solution? I have the same problem :c
@raihanyusuf1430
@raihanyusuf1430 2 года назад
same problem here
@semihgulum9438
@semihgulum9438 2 года назад
Hi, I was also having the same problem. I couldnt open rviz and gazebo. First of all I re-install VcXsrv and configure again regarding the tutorial. After that i followed the tutorial and finally i can open rviz. For gazebo, i restart my computer and re-open VcXsrv and wsl. After copy and paste the commands which already written on the video's description, i can also open gazebo!
@MrMANOJVELMURUGAN
@MrMANOJVELMURUGAN 3 года назад
Awesome. Thanks for sharing
@behradx
@behradx Год назад
Dude, you are a godsent!
@user-nz8iy6bw7y
@user-nz8iy6bw7y 11 месяцев назад
Thank you so much bro. It worked.
@alexouwu
@alexouwu Год назад
Excelent video, thanks!
@robinthomas6630
@robinthomas6630 3 года назад
you are awesome. Thank you:)
@emilvidmark
@emilvidmark 3 года назад
Thank you very much
@phdean3708
@phdean3708 3 года назад
worked ! thank you XD
@emilvidmark
@emilvidmark 3 года назад
Nice! I'm glad it helped you. Hope you are having a good day :)
@matheusbernat4875
@matheusbernat4875 3 года назад
Huge thanks!
@gaoge3891
@gaoge3891 2 года назад
life saver!
@bayrakmusti1
@bayrakmusti1 3 года назад
Great tutorial. I will try that but I am not such familiar with WSL2. So I have 2 questions; 1) Does the ROS and Gazebo versions matter? 2) Does that solution needs a graphics card driver for ubuntu subsystem? My problem is that I need to run a specific simulation which uses ROS kinetic-gazebo. I installed ubuntu 16.04 dual boot but I couldn't find almost any drivers for my laptop and since I failed to find graphics card driver, a total empty gazebo runs at 15 fps and runs my CPU fan as hard as I have never ever seen. Ubuntu 18.04 boot works perfectly fine. I will try this and comment the results I got. Thanks for the tutorial.
@emilvidmark
@emilvidmark 3 года назад
Thank you! 1) I'm not sure how specific the Gazebo version and ROS version has to be to work, what I do know though is that if you do the full desktop install of ROS you will get the right Gazebo Version as it is included in the Full install. 2) No the solution does not need a graphic card driver. WSL2 is not currently working with external GPU:s at the moment, but from what I've found it seems like it is in development at the moment, so for now your internal graphics has to be used sadly... Please keep me updated on how it is going and I will try to help you as much as I can :-) Thank you for your nice words, I appreciate it
@bayrakmusti1
@bayrakmusti1 3 года назад
@@emilvidmark I tried it today. The simulation I'm talking about: github.com/disaster-robotics-proalertas/usv_sim_lsa * Gazebo program worked and i got 1.0 sim time/real time ratio, 10-15 fps at a blank project (these numbers prove WSL2 can't use external GPU) but the simulation I wanted to run didn't worked. I don't know what was the problem but I remember that I faced something like that on ubuntu 16.04 native. * RViz didn't opened and I forgot to write down the error message I got specifically. Error was about screen monitoring I guess. It wasn't the one in the video at 3:25 . I don't know if I will get back into solving that. * WSL is such an alternative to virtual machine and definitely easier to understand than Docker. I'm glad I learned it. It can come in handy. The most important update is; I realized that the github repository also had a master-melodic branch. I will check that out on ubuntu 18.04 native setup tomorrow. So, lessons I learned today; * Check issues tab of a repository FIRST if you face with a problem trying to get that project running. Don't google some error messages first and check the issues tab last like I did. * Solutions like Docker are the way of future. At the marine simulations, VRX simulation environment is also used commonly. They have implemented their simulation to Docker for running it (which is ROS melodic based) on different OS'. Thanks for your interest on my progress and thanks for your willing to help. Since robotics is a trending branch, so many undergraduate students (like me) study it. It is quite a holy work you do in my perspective.
@josephmaged5470
@josephmaged5470 Год назад
It works, thank you
@cetacylanol
@cetacylanol 2 года назад
it works thank you so much!!!
@saeednami8227
@saeednami8227 2 года назад
Tanks you a lot this video is so helpful thanks
@user-el6bu2dm2g
@user-el6bu2dm2g 2 года назад
thank u for this video, can you please explain how to install gazebo and rviz before implementing this video?
@aVTuser
@aVTuser 11 месяцев назад
Hi I'm getting this error libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 143 (GLX) Minor opcode of failed request: 5 (X_GLXMakeCurrent) Serial number of failed request: 26 Current serial number in output stream: 26 can you please help
@draggador
@draggador 2 месяца назад
Would the steps be mostly the same for ros 2, rviz 2 & ignition gazebo with wsl 2 & ubuntu 22 on windows 10?
@aliumman5875
@aliumman5875 Год назад
ı take this error: Command 'gazebo' not found, but can be installed with: sudo apt install gazebo
@banfigore2820
@banfigore2820 2 года назад
Hi! qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Any idea how to fix this? It does this when i try to start rviz
@hilbel2656
@hilbel2656 2 года назад
have you solved it i have the same now and i need solution plllz
@banfigore2820
@banfigore2820 2 года назад
@@hilbel2656 No, i'm still in the dark with this one
@hilbel2656
@hilbel2656 2 года назад
@@banfigore2820 thank you if i found one i will tell you
@banfigore2820
@banfigore2820 2 года назад
In consequence, i tried webots, but i will do a separate partition of my hard on which i'll install ubuntu, and try again
@hilbel2656
@hilbel2656 2 года назад
Are working with robotics ?
@rushikeshdeotale281
@rushikeshdeotale281 3 года назад
rviz is not opening but gazebo is opening
@simonengler4743
@simonengler4743 2 года назад
How is the stability of Gazebo in this setup? I was running Ubuntu over Windows 10 in VMWare and it constantly crash. I suspect this is because it does not work well with a virtual GPU.
@emilvidmark
@emilvidmark 2 года назад
Yes I think the problem with most VMs, and also the setup I use is as you say with the GPU performance, I have a strong CPU which seems to handle the load well, but the absolute best for performance would be to run Ubuntu.
@infotech2859
@infotech2859 6 месяцев назад
thenk you so much
@ptiwaridotin
@ptiwaridotin 2 года назад
Thanks Emil
@rudranpillay7745
@rudranpillay7745 2 года назад
Thanks a lot for the info! I just wanted to ask, how can I open the WSL terminal instead of the normal windows command prompt?
@isuriarachchige5659
@isuriarachchige5659 2 года назад
Hi. Yeah you can. It is the WSL terminal
@rudranpillay7745
@rudranpillay7745 2 года назад
@@isuriarachchige5659 Thanks for the reply. I completed the mentioned steps, but after typing gazebo, its not opening GazeboSim. Any ideas on that?
@ihsan8794
@ihsan8794 3 года назад
Thanks
@jumperjack2838
@jumperjack2838 3 года назад
When i type gazebo it says: Command 'gazebo' not found, but can be installed with: sudo apt install gazebo9 Please tell me a solution.
@emilvidmark
@emilvidmark 3 года назад
When you install ROS make sure you run the full install: sudo apt install ros-noetic-desktop-full Gazebo will then be installed, if you have run that command and it still do not work, close the terminal and reopen it. Do not run "apt install gazebo" because you might install the wrong version which can cause troubles later
@oussamax_1976
@oussamax_1976 2 года назад
not working for me , followed all the steps and when i type gazebo nothing happens
@jaeyounglee574
@jaeyounglee574 3 года назад
Before this you have to install 1.ros 2.rviz 3.gazebo am I right?
@basithAA
@basithAA Год назад
xcb connection still error and alsa lib still no such file directory hmm
@vit_linda
@vit_linda 3 года назад
It works ! :) on my pc fps are very very low though... any advice? (MSI Prestige 15)
@emilvidmark
@emilvidmark 3 года назад
Nice Linda! :-) That's strange, from what I can see your computer seems to have an external graphics card (Nvidia Geforce GTX 1650?) so it should have power to run it properly I think. Does both Rviz and Gazebo run on low fps or just one of them? Also, have you checked that your power plan settings is set to "Performance" in Windows 10?
@vit_linda
@vit_linda 3 года назад
@@emilvidmark thanks for answering :) they are both on low fps... sadly wsl2 seems to have no access to external graphics cards, yet! but the fps rate shouldn't be so low anyway (around 2) :( I've tried enabling the Performace mode as you suggested but nothing changed
@emilvidmark
@emilvidmark 3 года назад
@@vit_linda No problem, I will continue to look into this problem and return to you if I find a solution. Please recall if you find a solution before I do, I'm really interested in finding a solution for this :-)
@emilvidmark
@emilvidmark 3 года назад
@@vit_linda I've been searching for a solution to the problem, but without success sadly... But as you mention, "not yet", it seems like it is a very requested feature and something the development team of wsl is working on. Hopefully they have a solution soon! Have a nice day, and sorry that I couldn't help you out with this... :-/
@vit_linda
@vit_linda 3 года назад
@@emilvidmark absolutely no problem, thank you so much for trying, I really appreciate! :) Have a nice day too
@jssilva7012
@jssilva7012 3 года назад
Thanks for the tutorial! I can open rviz but not gazebo :( I have this error: [Err] [ClientConfig.cc:222] Error copying default configuration file from [/usr/share/ignition/fuel_tools//config.yaml] to [/home/jotache/.ignition/fuel/config.yaml]
@emilvidmark
@emilvidmark 3 года назад
Thank you very much! My first tip is to check the first path you pasted, it seems to have a double slash between "fuel_tools" and "config.yaml" so the path might not exists. Try see if you can find and fix that path. Best regards Emil
@isntthisrandom-jg6wg
@isntthisrandom-jg6wg 3 месяца назад
My gazebo window opens and suddenly collapse in just seconds could someone please help me out
@Swifter_Developer
@Swifter_Developer Год назад
Amazing, Can I Connect SITL Ardupilot to Gazebo in windows?
@user-fy8kg9ct4h
@user-fy8kg9ct4h 6 месяцев назад
E: Unable to locate package gazebo
@gloryaderinola8669
@gloryaderinola8669 4 месяца назад
Please how can install Gazebo for windows?
@futuresciences5566
@futuresciences5566 Год назад
is this how i install gazebo or i need something else to install it p;ease answer me?
@adithyabaskaran8130
@adithyabaskaran8130 3 года назад
rviz is opening but gazebo not opening
@emilvidmark
@emilvidmark 3 года назад
Hello, for some support: 1. Make sure that GAZEBO_IP is set to 127.0.0.1 2. When you start Xlaunch, make sure you uncheck OpenGL 3. Try running this again: export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0 4. And also make sure you run this command if you open up a new terminal: export LIBGL_ALWAYS_INDIRECT=0 Please contact me again if it doesn't work. Have a nice day :)
@simoneandolfo3901
@simoneandolfo3901 3 года назад
You have to go to the Windows Defender System control panel and enable the "VcXsrv windows xserver" app by putting a tick on both public and private boxes. Then, by following the instructions of the video step-by-step, Gazebo should work fine.
@ricardobernalc6170
@ricardobernalc6170 3 года назад
@@emilvidmark Hello Emil, I have followed all the steps, but when I enter de gazebo command it just jumps to a new line. Other programs such has the ROS consoles work perfectly with XLaunch.
@labibsharrar9673
@labibsharrar9673 3 года назад
I have the exact same issue, did you manage to solve it?
@labibsharrar9673
@labibsharrar9673 3 года назад
@@emilvidmark I tried this but the gui still does not seem to appear
@AnxulJyoti
@AnxulJyoti 3 года назад
so if I want to import turtlebot then it would run as well?
@emilvidmark
@emilvidmark 3 года назад
Yes sir that is possible :-)
@chethaniwijesekara3352
@chethaniwijesekara3352 3 года назад
Can I please know how to install gazebo in ubuntu 20.4 using WSL ?
@emilvidmark
@emilvidmark 3 года назад
Hello, jus install the full desktop version of ROS and gazebo will be included :-)
@chethaniwijesekara3352
@chethaniwijesekara3352 3 года назад
@@emilvidmark Thank you!
@fratubesoares
@fratubesoares 3 года назад
Eu instalei no Windows hoje estou usando no Ubuntu 20.04
@josiahcastaneda1861
@josiahcastaneda1861 3 года назад
Is XLaunch another application that we need installed?
@emilvidmark
@emilvidmark 3 года назад
Yes that is correct
@josiahcastaneda1861
@josiahcastaneda1861 3 года назад
@@emilvidmark Thank you, when you say we need to install ROS, RVIZ and Gazebo, do we install for Ubuntu or Windows?
@emilvidmark
@emilvidmark 3 года назад
@@josiahcastaneda1861 so what we do is that we install the Ubuntu version of ROS, Gazebo and RVIZ on our Ubuntu Linux subsystem on Windows. So technically it is the Ubuntu versions we install. I hope that bring you some clarity :)
@hedii77
@hedii77 3 года назад
does this work with WSL1?
@emilvidmark
@emilvidmark 3 года назад
Most probably not as WSL 1 is quite limited in comparisson to WSL 2.
@hedii77
@hedii77 3 года назад
@@emilvidmark Hi i installed WSL2 now and get this error after i followed your Tutorial: qt.qpa.xcb: could not connect to display :0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. Aborted At this point i only installed rviz not gazebo
@jaeyounglee574
@jaeyounglee574 3 года назад
Ctrl key "C" and "V" not operating to terminal window
@jaeyounglee574
@jaeyounglee574 3 года назад
i found this the top of window edge and move to mouse cursor and right button!
@infotech2859
@infotech2859 6 месяцев назад
thenk you so much
Далее
ROS2 Docker GUI  for Windows and Linux
39:48
Просмотров 29 тыс.
ROS Tutorial 1: What is ROS and How to Install
8:16
Просмотров 61 тыс.
Why Are Open Source Alternatives So Bad?
13:06
Просмотров 615 тыс.
WSL2 Ubuntu GUI
13:51
Просмотров 588 тыс.
PX4 Development Environment Setup using WSL-2
43:36
Просмотров 7 тыс.
Install Desktop GUI for WSL | WSL Enable Desktop Guide
7:21
You Should Stop Using Windows On Your Computer...
31:09
Thousands of Windows Users Will Lose Their Data
12:09
Просмотров 514 тыс.
The Windows Tier List
16:27
Просмотров 149 тыс.