spent a full day trying to setup virtual machines and almost installing ubuntu on my windows machine and then attempting to follow poor notation about how to setup ros and I finally stumbled across this guys video, you are a godsend
Best ROS and Docker combined tutorial I have seen! I was having a lot of trouble figuring out docker as I am new to it, and needed it urgently and this was the perfect tutorial!
Hi, I very very rarely comment on youtube but your content deserves more attention. Thank you for providing thorough instructions for people who cannot use Linux 😀
- I haven't expected to do an application with Docker. I am really grateful for that ☺ - To be honest, when I first saw the thumbnail of the video, I thought it is an old recorded video and lecture content won't be supported via images/animations. Maybe it happened only to me but I wanted to give you this feedback. My friendly suggestion would be to put newer image on thumbnail to get more views 😎 - Thank you for your effort. I appreciate your work and finished one of your Udemy course already 😃
This is really awesome and exactly what I was looking for (and much more). Thank you for saving me plenty of time, I can not imagine how I would find all these information!
I have been trying to run ROS in both my Mac and Windows for weeks, but I have been stumbling across several dependencies and hardware-specific problems. I had this idea yesterday, that maybe Docker would come in handy to solve the dependency-wise issues. I am so happy I found this video, because even though I just initialized turtlesim at 19:25, this is by far the most successful attempt in weeks. @Muhammad, thank you so much for sharing this!
@@robotisim Its been 4 months since i found your channel and these detailed tutorials helped me a LOT!!, I want to express gratitude for giving us these beneficial tutorials.🙂
Another quesetion: In windows use wsl2 & docker install ros2, how to set up the env to let the ros2 use gpu? Do I still need to Nvidia Container Toolkit? Or just set env --gpus=all? I think it's an important issue to talk.
I can use nvidia-smi in wsl Ubuntu or in container, and gazeob can load the world. but it seems that gazebo use cpu not gpu to acclearate. I'm confused. I searched a lot and restarted container a lot , but all failed
@@robotisim I’m a college student trying to learn more about ros2 and docker. I’m trying to build a signal processing project that analyzes signals with machine learning. I was curious if you were going to cover projects like this from end to end in the future or can point me in the right direction?! Thank you so much!!
Blown away by the simplicity after having to do all this in Virtual-box, I just have some questions, can docker be used along with raspberry pi ? because in real world application, i'm gonna be deploying the programs in a raspberry pi in a robot. I also want to ask you how versatile is this ? I am so excited and curious at the same time a bit hesitant about it's scalability. Please enlighten me !!
Simply putting DOCKER > Virtual BOX You can provide access to your network and ping RPI , with same domain Name Scalability depends on your understanding of containers and architecture.
Docker compose helps alot in practicle applications - OS setup in docker_1 - Package and GUI in docker_2 - Only binaries in docker_3 Compose all there is a video about it on my channel as well
Well Done Muhammad. Great Video. Will try docker for my projects. I have a question; I am using ZED2 camera in my projects, therefore I use cuda and the gpu all the time, Is docker compatible with cuda libraries? IF YES; is it the same for windows and linux? How about Nvidia jetson kits?
Anyone try docker on windows with ros2 and ros2 on another machine ( i.e Pi ) with communication working on both ? for some reason the topic on the pi is not visible in my docker container.
Hello, I'm facing an issue where I have two Windows host machines (Hosts A and B), both with Docker installed and connected via the same LAN. On Machine A, I have the publisher container, and on Machine B, I have the subscriber container. I've attempted various networking workarounds to establish communication between them, but none have been successful. Could you please assist me in resolving this? Thank you in advance.
hello sir.' i have a problem. in my pc i can run your image and container which available to use rviz2 and gazebo. but whenever i close the pc and try to run the docker container again it can not display the rviz and gazebo. how to solve this point?
Hi, I find this video very helpful. Still I run into a problem while running the bash file in 35:40 . what is the $DISPLAY should be in that bash file?
Hi, thanks for the explanation, as I saw the part about the GPU utilization, could you please guide me on how to visualize the Gazebo or Rviz from a docker container using GPU but not CPU?
Please check the command "watch nvidia-smi", because when I run GPU container there will not be any usage of GPU regarding the visualization of Gazebo!
Hello, I have coded some packages in ros into a Virtual machine (cause in my device i run windows), and now I am trying to run the packages with docker. However, I see the error message "package not found". I have mounted the catkin workspace file into the container, I have sourced ros and the catkin workspace, but i see that error. Do I have to change anything in the build/devel files to run smoothly in the container?
Hi! I'm using fedora, docker engine version 20, and the same image as you (osrf/ros:noetic-desktop). When I start the rospy_tutorial listener, the container stops. Does anyone have the same problem?
Hi, I have an issue that the volume $XAUTH is giving me an error: docker: Error response from daemon: error while creating mount source path '/host_mnt/tmp/.docker.xauth': mkdir /host_mnt/tmp/.docker.xauth: file exists. ERRO[0001] error waiting for container:
is this the same method used for deplyment of ROS codes globally (in another machines using cloud), and do we need not to build our workspace before launching?
Hi, i am trying to install ROS on my macOS. However, I can't seem to run rospy tutorials. Even though i have followed all steps that you mentioned in your video. It shows the following message: Usage: rosrun [--prefix cmd] [--debug] PACKAGE EXECUTABLE [ARGS] rosrun will locate PACKAGE and try to find an executable named EXECUTABLE in the PACKAGE tree. If it finds it, it will run it with ARGS. What needs to be done? Please help. A beginner this side.
provide details of your error on ros wiki and link it here . because screenshot can make it possible to understand you problem. - What i think the error is -> your workspace is not sourced to the ros system . -> Source your workspace
hi, amazing tutorial! I have a problem. When I try do build the dockerfile it gives me an Error on the 3 command: errno 13 Permission denied. How can I solve it? Thanks!!
I have used ROS in a Docker container, and it works, for the most part. I can run things, and display them via the XQuartz X11 server for Mac. However, rviz refuses to run. It will core dump every single time. I have tried using --env=" LIBGL_ALWAYS_INDIRECT=1", but that simply does nothing. Other GL Apps work fine in the indirect mode, including glxgears, which gets between 1900-2500 FPS. Do you have any suggestions? Running Ubuntu in a VM works fine, of course, but that doesn't seem as elegant.
Hi, A Great tutorial on ROS docker. I am using linux machine and want to run GUI. When I run turtlesim_node command, I am getting the following error. I have checked it in other sources but couldn't solve it. Error: 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. Could you please help me out? TIA
Hi, First of all thank you for the video. I am trying to install ros through docker on windows. Turtlesim node is working perfectly for me. But gazebo and rviz are having some issue open up. Some libGL error is coming up. Did you face the same issue?
I figured out the issue... the Native opengl was checked by default in the xlaunch. Gazebo and rviz worked fine when I unchecked that option. Thank you for helping..
I just have a doubt regarding the nvidia graphics card. When I tried to run the docker image by setting --runtime=nvidia, I am getting error: Error Response from daemon: Unknown runtime specified nvidia. Right now the GUI application is running on my Intel grpahics card and it is very slow. I got an Nvidia RTX 3070Ti card on my lap. Could you help me on this? Thanks in advance
Great tutorial, ran into an issue though when docker pulling ros foxy. It says authenthication required, even though I ran cmd as adminstrator. Any fixes?
@@robotisim Got the issue resolved, my isp for some reason didn't allow for the file transfer here in india (through JIO sim), used a vpn and it worked
Hi! I am doing fine until " rosrun rospy", the error of "Usage: rosrun [--prefix cmd] [--debug] PACKAGE EXECUTABLE [ARGS] rosrun will locate PACKAGE and try to find an executable named EXECUTABLE in the PACKAGE tree. If it finds it, it will run it with ARGS." came out. I am a beginner of ROS, How to fix this problem?
Hello Sir, Thank you for a wonderful video. I was able to launch Rviz following your tutorial. But the Rviz window is blank. FYI I am using Ubuntu 20.04 and docker ROS foxy and noetic using rosbridge. I want to run the bag file, the bag file is running and the Rviz is launching too but unable to see anything. Do I need GPU for visualization. Please Kindly suggest.
Thank you, Muhammad. I want to ask have you tried to run ros from docker to a remote master, how would you config docker network and ROS_IP, ROS_HOSTNAME.
I am here again. I am trying to connect raspberry pi 4 and my computer with ros. I was using virtualbox and they cannot comunicate. Now I am trying with docker and I am not able to connect. I tested with two raspberries and they can comunicate with ros2. The problem I think is the network. with the command HOSTNAME -I I can see the ip which my router give the devices. why in docker or virtual machines you have like this 172.17.0. ... instead of 192.168.1. ... ? Maybe if in the docker or virtual machine have their own ip like raspberries I can solve my problem. Any advise, how do they connect in our network? thanks in advance
im getting this error : non-network local connections being added to access control list root@docker-desktop:/# source /opt/ros/foxy/setup.bash root@docker-desktop:/# ros2 run turtlesim turtlesim_node 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.
spent a full day trying to setup virtual machines and almost installing ubuntu on my windows machine and then attempting to follow poor notation about how to setup ros and I finally stumbled across this guys video, you are a godsend
i can feel that
been there -> wasted time -> created a video to save other's time :)
Aewsome tutorial! you are a Master in this field. I hope you can upload more videos like this.
Thanks Man . Yes all in for robotics :)
Best ROS and Docker combined tutorial I have seen! I was having a lot of trouble figuring out docker as I am new to it, and needed it urgently and this was the perfect tutorial!
A video that I needed when i started workign with ROS2 and docker :)
Hi,
I very very rarely comment on youtube but your content deserves more attention. Thank you for providing thorough instructions for people who cannot use Linux
😀
You're very welcome!
- I haven't expected to do an application with Docker. I am really grateful for that ☺
- To be honest, when I first saw the thumbnail of the video, I thought it is an old recorded video and lecture content won't be supported via images/animations. Maybe it happened only to me but I wanted to give you this feedback. My friendly suggestion would be to put newer image on thumbnail to get more views 😎
- Thank you for your effort. I appreciate your work and finished one of your Udemy course already 😃
Thank you for the suggestion
This is really awesome and exactly what I was looking for (and much more). Thank you for saving me plenty of time, I can not imagine how I would find all these information!
nopes :D
I have been trying to run ROS in both my Mac and Windows for weeks, but I have been stumbling across several dependencies and hardware-specific problems. I had this idea yesterday, that maybe Docker would come in handy to solve the dependency-wise issues.
I am so happy I found this video, because even though I just initialized turtlesim at 19:25, this is by far the most successful attempt in weeks. @Muhammad, thank you so much for sharing this!
Thanks :)
Thank you very much by that, there are a bunch of valuable information and they are shown in a detailed way!
Glad it was helpful!
Thsi is very boss level video,
Alhamdulillah........
very easy steps,
Special Thanks
20:15
Welcome :)
Thank you so much for making this video ❤❤. Exactly what I was looking for
You're so welcome!
Thanks for making a wholesome video about docker and ros. Really helpful
Our pleasure!
This video is really a masterpiece.
Thanks :)
Thank you so much for this tutorial. Great content
You're very welcome!
I really liked it. I would love to have more videos like this.
for ros-docker ?
this video was to just show how to run docker-ROS things
@@robotisim I meant helpful ros related videos like this🙂, I have a request, please can you make some videos on behavior trees in ros
@@robotisim Its been 4 months since i found your channel and these detailed tutorials helped me a LOT!!, I want to express gratitude for giving us these beneficial tutorials.🙂
Sure thanks @@syedjameelahmed19
Awesome tutorial! I am going to move everything to Docker now!
:)
Thanks a lot!!!
Great presentation.
Another quesetion:
In windows use wsl2 & docker install ros2, how to set up the env to let the ros2 use gpu?
Do I still need to Nvidia Container Toolkit? Or just set env --gpus=all?
I think it's an important issue to talk.
I can use nvidia-smi in wsl Ubuntu or in container, and gazeob can load the world.
but it seems that gazebo use cpu not gpu to acclearate.
I'm confused. I searched a lot and restarted container a lot , but all failed
You are welcome!
i do not known about wsl and how does it access gpu
but in docker for nvidia gpu you need to install nvidia docker
Awesome tutorial and awesome explanation!
Glad you liked it!
Amazing Video! Thank you very much!
your welcome
This tutorial was amazing.
Yup :)
@@robotisim I’m a college student trying to learn more about ros2 and docker. I’m trying to build a signal processing project that analyzes signals with machine learning. I was curious if you were going to cover projects like this from end to end in the future or can point me in the right direction?! Thank you so much!!
@@colesmith2136 whats with signal processing and ros2
Blown away by the simplicity after having to do all this in Virtual-box, I just have some questions, can docker be used along with raspberry pi ? because in real world application, i'm gonna be deploying the programs in a raspberry pi in a robot. I also want to ask you how versatile is this ? I am so excited and curious at the same time a bit hesitant about it's scalability. Please enlighten me !!
Simply putting
DOCKER > Virtual BOX
You can provide access to your network and ping RPI , with same domain Name
Scalability depends on your understanding of containers and architecture.
Docker compose helps alot in practicle applications
- OS setup in docker_1
- Package and GUI in docker_2
- Only binaries in docker_3
Compose all
there is a video about it on my channel as well
Well Done Muhammad. Great Video. Will try docker for my projects. I have a question; I am using ZED2 camera in my projects, therefore I use cuda and the gpu all the time, Is docker compatible with cuda libraries? IF YES; is it the same for windows and linux? How about Nvidia jetson kits?
Yes , the linux version is running using Cuda on my system .
and jetson nano ( the lowest one ) also have the cuda docker enabled .
That's really helpful❤
I'm so glad!
Habibi!!!! Thank you so much. God bless you.
Habibi thanks :)
Estoy impresionado por tu trabajo, muchas gracias por compartir tu conocimiento
Mi placer
amazing! Thank you!
Thank you too!
Magnífico!!.
:)
Anyone try docker on windows with ros2 and ros2 on another machine ( i.e Pi ) with communication working on both ? for some reason the topic on the pi is not visible in my docker container.
Hi! I just started to learn Docker.
I was wondering, is it possible to exchange ROS messages between a container and the host machine?
I think we can, but never tried it.
There is some port configuration which enables network communications.
thank you so much!!!!
You're welcome!
Hello, I'm facing an issue where I have two Windows host machines (Hosts A and B), both with Docker installed and connected via the same LAN. On Machine A, I have the publisher container, and on Machine B, I have the subscriber container. I've attempted various networking workarounds to establish communication between them, but none have been successful. Could you please assist me in resolving this? Thank you in advance.
I understand the frustration of dealing with networking issues.
But i do not have experience in that.
hello sir.'
i have a problem. in my pc i can run your image and container which available to use rviz2 and gazebo. but whenever i close the pc and try to run the docker container again it can not display the rviz and gazebo. how to solve this point?
how do you connect the container 2nd time ?
Hi, I find this video very helpful. Still I run into a problem while running the bash file in 35:40 . what is the $DISPLAY should be in that bash file?
our display id
commonly 0
Hi, thanks for the explanation, as I saw the part about the GPU utilization, could you please guide me on how to visualize the Gazebo or Rviz from a docker container using GPU but not CPU?
in this video - where i am using linux , i am using GPU , that requires nvidia docker as well
Please check the command "watch nvidia-smi", because when I run GPU container there will not be any usage of GPU regarding the visualization of Gazebo!
Hello, I have coded some packages in ros into a Virtual machine (cause in my device i run windows), and now I am trying to run the packages with docker. However, I see the error message "package not found". I have mounted the catkin workspace file into the container, I have sourced ros and the catkin workspace, but i see that error. Do I have to change anything in the build/devel files to run smoothly in the container?
Verify the paths used in the docker run command for mounting.
Great job. how do you use your local ROS installation a the base image. I used the osrf image and it didn't work on my raspberry pi.
Will produce a video around that as well soon
Hi!
I'm using fedora, docker engine version 20, and the same image as you (osrf/ros:noetic-desktop). When I start the rospy_tutorial listener, the container stops. Does anyone have the same problem?
Not here .
Hi, I have an issue that the volume $XAUTH is giving me an error: docker: Error response from daemon: error while creating mount source path '/host_mnt/tmp/.docker.xauth': mkdir /host_mnt/tmp/.docker.xauth: file exists.
ERRO[0001] error waiting for container:
Windows ?
Exactly what I needed 🤌🤌
Great to hear that
is this the same method used for deplyment of ROS codes globally (in another machines using cloud), and do we need not to build our workspace before launching?
no need if all source code is already built in docker . Yes on cloud that is how it is deployed
Hi, i am trying to install ROS on my macOS. However, I can't seem to run rospy tutorials. Even though i have followed all steps that you mentioned in your video.
It shows the following message:
Usage: rosrun [--prefix cmd] [--debug] PACKAGE EXECUTABLE [ARGS]
rosrun will locate PACKAGE and try to find
an executable named EXECUTABLE in the PACKAGE tree.
If it finds it, it will run it with ARGS.
What needs to be done? Please help. A beginner this side.
provide details of your error on ros wiki and link it here . because screenshot can make it possible to understand you problem.
- What i think the error is -> your workspace is not sourced to the ros system . -> Source your workspace
Thank you very much.
BTW,
can ROS be able to use GPU in WSL/Docker??
Yes , Here in Linux Example it is Utilizing GPU
For that you need to install nvidia-docker as wel .
What are the system requirements to have all this stuff working smoothly, I have a jetson nano but looks I’ll get short
I have seen jetson with 4gb ram working good with docker
Can I install Ron with docker on macOS too? I got a M1 MacBook and was wondering how to install ROS2 Galactic
Yes you. Can
There are some video i cam across
Docker is a good solution if you no proper compiled solution
@@robotisim do you have any recommendations on which videos/tutorials are best?
hi, amazing tutorial! I have a problem. When I try do build the dockerfile it gives me an Error on the 3 command: errno 13 Permission denied. How can I solve it? Thanks!!
add sudo before command
I have used ROS in a Docker container, and it works, for the most part. I can run things, and display them via the XQuartz X11 server for Mac. However, rviz refuses to run. It will core dump every single time. I have tried using --env=" LIBGL_ALWAYS_INDIRECT=1", but that simply does nothing. Other GL Apps work fine in the indirect mode, including glxgears, which gets between 1900-2500 FPS. Do you have any suggestions? Running Ubuntu in a VM works fine, of course, but that doesn't seem as elegant.
For mac i have no suggestions . As we only work with linux and windows :/
Hi, did you find any solution ?
Hi, A Great tutorial on ROS docker. I am using linux machine and want to run GUI. When I run turtlesim_node command, I am getting the following error. I have checked it in other sources but couldn't solve it. Error:
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.
Could you please help me out? TIA
It is mentioned in video how to connect to display
Hi, First of all thank you for the video. I am trying to install ros through docker on windows. Turtlesim node is working perfectly for me. But gazebo and rviz are having some issue open up. Some libGL error is coming up. Did you face the same issue?
Gui access is required to docker
use the software i showed in the video
I figured out the issue... the Native opengl was checked by default in the xlaunch. Gazebo and rviz worked fine when I unchecked that option. Thank you for helping..
I just have a doubt regarding the nvidia graphics card. When I tried to run the docker image by setting --runtime=nvidia, I am getting error: Error Response from daemon: Unknown runtime specified nvidia. Right now the GUI application is running on my Intel grpahics card and it is very slow. I got an Nvidia RTX 3070Ti card on my lap. Could you help me on this? Thanks in advance
@@iamnamniar install nvidia docker package and restart docker demon
Great tutorial, ran into an issue though when docker pulling ros foxy.
It says authenthication required, even though I ran cmd as adminstrator. Any fixes?
strange , post error some where so i can see
@@robotisim Got the issue resolved, my isp for some reason didn't allow for the file transfer here in india (through JIO sim), used a vpn and it worked
@@kevindarren756 I also got the same error, had to use docker login and then provide dockerhub username and password, worked fine for me
Hi! I am doing fine until " rosrun rospy",
the error of
"Usage: rosrun [--prefix cmd] [--debug] PACKAGE EXECUTABLE [ARGS]
rosrun will locate PACKAGE and try to find
an executable named EXECUTABLE in the PACKAGE tree.
If it finds it, it will run it with ARGS." came out.
I am a beginner of ROS, How to fix this problem?
Is the name of package rospy?
@@robotisim Hi! Thanks for your reply!~I fixed the problem. Instead click Enter I should click Tab, then everything works fine.
Hello Sir,
Thank you for a wonderful video. I was able to launch Rviz following your tutorial. But the Rviz window is blank.
FYI I am using Ubuntu 20.04 and docker ROS foxy and noetic using rosbridge. I want to run the bag file, the bag file is running and the Rviz is launching too but unable to see anything. Do I need GPU for visualization. Please
Kindly suggest.
No gpu is not a requirement, check yur drivers and update
@@robotisim Thank you sir. You are right, it worked on the same day when i Questioned you.
Thank you, Muhammad. I want to ask have you tried to run ros from docker to a remote master, how would you config docker network and ROS_IP, ROS_HOSTNAME.
Did not tried it !
I am here again. I am trying to connect raspberry pi 4 and my computer with ros. I was using virtualbox and they cannot comunicate. Now I am trying with docker and I am not able to connect. I tested with two raspberries and they can comunicate with ros2. The problem I think is the network. with the command HOSTNAME -I I can see the ip which my router give the devices.
why in docker or virtual machines you have like this 172.17.0. ... instead of 192.168.1. ... ? Maybe if in the docker or virtual machine have their own ip like raspberries I can solve my problem.
Any advise, how do they connect in our network?
thanks in advance
ROS1 or 2 ?
The IP 172.17.0 something is because i am not connecting with internet , it is connected to a HOTSPOT without internet access
will docker be using my GPU?
yes as in the last part of linux , i am running on my gpu
Sir the video quality is very poor unable to read anything in video
RUclips is currently processing HD version , Will take 30 mins
@@robotisim thanks for the response, yes now it's available in HD
im getting this error :
non-network local connections being added to access control list
root@docker-desktop:/# source /opt/ros/foxy/setup.bash
root@docker-desktop:/# ros2 run turtlesim turtlesim_node
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.
connect the display , when you run docker allow display connection