ROS2 Docker GUI for Windows and Linux

Поділитися
Вставка
  • Опубліковано 1 сер 2024
  • Windows 10 and Ubuntu 20.04
    ROS1 and ROS2
    This Video makes you understand how Docker can be utilized for different ROS versions on different operating systems.
    📝 Online School : www.robotisim.com/
    🛠️ Share your Problems at Discord :
    - / discord
    00:00 - Introduction
    01:48 - WIN : Docker and Xlaunch server Installation
    03:55 - WIN : Get ROS image and Docker commands.
    06:10 - WIN : Running ROS docker image
    08:22 - WIN : Multiple ROS image running
    11:46 - WIN : Launch ROS1 and ROS2 in docker simultaneously
    13:27 - WIN : How to use GUI tools in Docker
    19:54 - WIN : Docker file
    21:10 - WIN : Docker file
    23:11 - WIN : Tips for RUN apt-get command
    24:44 - WIN : Creating image from docker file
    26:00 - WIN : Concepts Wrapup
    27:56 - WIN : Running from Repo
    33:00 - LINUX : Bridging the gap
    35:00 - LINUX : Docker without GUI
    36:00 - LINUX : Important advice
    37:25 - LINUX : Running Docker on GPU
    📚 ROS WIki Tutorial Link :
    - wiki.ros.org/docker/Tutorials/...
    🎥 UA-cam Playlist :
    - • ROS Wiki Demonstrations
    👨‍💻 Github Repository Link :
    - github.com/noshluk2/ros1_wiki
    Github repository mentioned for Maze Solving Docker Image :
    github.com/HaiderAbasi/ROS2-P...
    🤓 Lets join on Discord :
    - / discord
    🖐My Social Profiles :
    - Linkedin: / muhammad-luqman-9b227a11b
    - Twitter: / noshluk2
    - Facebook Group : / roboticswithluqman

КОМЕНТАРІ • 132

  • @aaronmurphy9271
    @aaronmurphy9271 9 місяців тому +6

    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

    • @robotisim
      @robotisim  9 місяців тому +1

      i can feel that
      been there -> wasted time -> created a video to save other's time :)

  • @Invictusrudra
    @Invictusrudra 2 місяці тому

    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!

    • @robotisim
      @robotisim  2 місяці тому

      A video that I needed when i started workign with ROS2 and docker :)

  • @jirivchi
    @jirivchi Рік тому +7

    Aewsome tutorial! you are a Master in this field. I hope you can upload more videos like this.

    • @robotisim
      @robotisim  Рік тому +1

      Thanks Man . Yes all in for robotics :)

  • @jachymzaba
    @jachymzaba Місяць тому

    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!

  • @Adks007
    @Adks007 11 місяців тому +1

    Thank you so much for making this video ❤❤. Exactly what I was looking for

    • @robotisim
      @robotisim  11 місяців тому

      You're so welcome!

  • @Himans4
    @Himans4 10 місяців тому

    Thanks for making a wholesome video about docker and ros. Really helpful

  • @gabrielpb876
    @gabrielpb876 23 дні тому

    Thank you very much by that, there are a bunch of valuable information and they are shown in a detailed way!

  • @guillaumetreheux7455
    @guillaumetreheux7455 8 місяців тому +1

    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
    😀

    • @robotisim
      @robotisim  8 місяців тому

      You're very welcome!

  • @lucasmartim
    @lucasmartim Рік тому

    Awesome tutorial! I am going to move everything to Docker now!

  • @adeolajoseph7276
    @adeolajoseph7276 11 місяців тому +1

    Thank you so much for this tutorial. Great content

    • @robotisim
      @robotisim  11 місяців тому

      You're very welcome!

  • @giovanniromio2767
    @giovanniromio2767 11 місяців тому

    Awesome tutorial and awesome explanation!

    • @robotisim
      @robotisim  10 місяців тому

      Glad you liked it!

  • @muhammadowais2992
    @muhammadowais2992 11 місяців тому +1

    This video is really a masterpiece.

  • @jingchengzhao392
    @jingchengzhao392 Рік тому

    Amazing Video! Thank you very much!

  • @obensustam3574
    @obensustam3574 11 місяців тому +2

    - 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 😃

    • @robotisim
      @robotisim  11 місяців тому

      Thank you for the suggestion

  • @whispering_shadows57
    @whispering_shadows57 8 місяців тому

    That's really helpful❤

  • @carlosnarvaez1151
    @carlosnarvaez1151 Рік тому

    Estoy impresionado por tu trabajo, muchas gracias por compartir tu conocimiento

  • @sandro5437
    @sandro5437 7 місяців тому

    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!

  • @syedjameelahmed19
    @syedjameelahmed19 11 місяців тому

    I really liked it. I would love to have more videos like this.

    • @robotisim
      @robotisim  10 місяців тому +1

      for ros-docker ?
      this video was to just show how to run docker-ROS things

    • @syedjameelahmed19
      @syedjameelahmed19 10 місяців тому

      @@robotisim I meant helpful ros related videos like this🙂, I have a request, please can you make some videos on behavior trees in ros

    • @syedjameelahmed19
      @syedjameelahmed19 6 місяців тому

      @@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.🙂

    • @robotisim
      @robotisim  6 місяців тому +1

      Sure thanks @@syedjameelahmed19

  • @123twini123
    @123twini123 11 місяців тому

    amazing! Thank you!

  • @mdmahedihassan2444
    @mdmahedihassan2444 Рік тому +1

    Thsi is very boss level video,
    Alhamdulillah........
    very easy steps,
    Special Thanks
    20:15

  • @colesmith2136
    @colesmith2136 Рік тому

    This tutorial was amazing.

    • @robotisim
      @robotisim  Рік тому

      Yup :)

    • @colesmith2136
      @colesmith2136 Рік тому +1

      @@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!!

    • @robotisim
      @robotisim  Рік тому

      @@colesmith2136 whats with signal processing and ros2

  • @jiajun6810
    @jiajun6810 Місяць тому

    Thanks a lot!!!
    Great presentation.

    • @jiajun6810
      @jiajun6810 Місяць тому

      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.

    • @jiajun6810
      @jiajun6810 Місяць тому

      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
      @robotisim  Місяць тому

      You are welcome!

    • @robotisim
      @robotisim  Місяць тому

      i do not known about wsl and how does it access gpu
      but in docker for nvidia gpu you need to install nvidia docker

  • @SPeeDKiLL45
    @SPeeDKiLL45 9 місяців тому

    Habibi!!!! Thank you so much. God bless you.

    • @robotisim
      @robotisim  9 місяців тому

      Habibi thanks :)

  • @arina6094
    @arina6094 7 місяців тому

    thank you so much!!!!

  • @franciscoolleropacheco8460
    @franciscoolleropacheco8460 9 місяців тому +1

    Magnífico!!.

  • @kimanton
    @kimanton Рік тому +1

    Hi! I just started to learn Docker.
    I was wondering, is it possible to exchange ROS messages between a container and the host machine?

    • @robotisim
      @robotisim  Рік тому

      I think we can, but never tried it.
      There is some port configuration which enables network communications.

  • @nasosgerontopoulos5267
    @nasosgerontopoulos5267 7 місяців тому

    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?

    • @robotisim
      @robotisim  7 місяців тому

      Verify the paths used in the docker run command for mounting.

  • @masues
    @masues Рік тому +1

    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?

  • @MasoomaMaryum
    @MasoomaMaryum Рік тому

    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.

    • @robotisim
      @robotisim  Рік тому

      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

  • @BarkatullaShaik
    @BarkatullaShaik 4 місяці тому

    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.

    • @robotisim
      @robotisim  3 місяці тому

      I understand the frustration of dealing with networking issues.
      But i do not have experience in that.

  • @olubukolaogunsola5864
    @olubukolaogunsola5864 10 місяців тому

    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.

    • @robotisim
      @robotisim  10 місяців тому +1

      Will produce a video around that as well soon

  • @manigoyal4872
    @manigoyal4872 Рік тому

    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?

    • @robotisim
      @robotisim  Рік тому +1

      no need if all source code is already built in docker . Yes on cloud that is how it is deployed

  • @triquiop3257
    @triquiop3257 Рік тому

    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:

  • @user-no8zu1qw2h
    @user-no8zu1qw2h 7 місяців тому

    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?

    • @robotisim
      @robotisim  7 місяців тому

      how do you connect the container 2nd time ?

  • @hellyesOo
    @hellyesOo Рік тому

    What are the system requirements to have all this stuff working smoothly, I have a jetson nano but looks I’ll get short

    • @robotisim
      @robotisim  Рік тому

      I have seen jetson with 4gb ram working good with docker

  • @VinayakPattanashetti
    @VinayakPattanashetti 8 місяців тому

    Thank you very much.
    BTW,
    can ROS be able to use GPU in WSL/Docker??

    • @robotisim
      @robotisim  8 місяців тому

      Yes , Here in Linux Example it is Utilizing GPU
      For that you need to install nvidia-docker as wel .

  • @XanderSoldaat1
    @XanderSoldaat1 Рік тому

    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.

    • @robotisim
      @robotisim  Рік тому

      For mac i have no suggestions . As we only work with linux and windows :/

    • @raphaelkoskas7069
      @raphaelkoskas7069 Рік тому

      Hi, did you find any solution ?

  • @pooryakhanali6921
    @pooryakhanali6921 3 місяці тому

    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?

    • @robotisim
      @robotisim  3 місяці тому

      in this video - where i am using linux , i am using GPU , that requires nvidia docker as well

    • @pooryakhanali6921
      @pooryakhanali6921 2 місяці тому

      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!

  • @woddenhorse
    @woddenhorse 9 місяців тому

    Exactly what I needed 🤌🤌

    • @robotisim
      @robotisim  9 місяців тому

      Great to hear that

  • @faustoallegrini2641
    @faustoallegrini2641 Рік тому

    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!!

  • @krisshcool6381
    @krisshcool6381 Рік тому

    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

    • @robotisim
      @robotisim  Рік тому

      It is mentioned in video how to connect to display

  • @ccyokubenimaru1988
    @ccyokubenimaru1988 Рік тому

    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?

    • @robotisim
      @robotisim  Рік тому

      Is the name of package rospy?

    • @ccyokubenimaru1988
      @ccyokubenimaru1988 Рік тому +1

      @@robotisim Hi! Thanks for your reply!~I fixed the problem. Instead click Enter I should click Tab, then everything works fine.

  • @DavldLangner
    @DavldLangner Рік тому

    Can I install Ron with docker on macOS too? I got a M1 MacBook and was wondering how to install ROS2 Galactic

    • @robotisim
      @robotisim  Рік тому

      Yes you. Can
      There are some video i cam across
      Docker is a good solution if you no proper compiled solution

    • @DavldLangner
      @DavldLangner Рік тому

      @@robotisim do you have any recommendations on which videos/tutorials are best?

  • @kevindarren756
    @kevindarren756 Рік тому

    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
      @robotisim  Рік тому

      strange , post error some where so i can see

    • @kevindarren756
      @kevindarren756 Рік тому +1

      @@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

    • @muhammadowais2992
      @muhammadowais2992 11 місяців тому

      @@kevindarren756 I also got the same error, had to use docker login and then provide dockerhub username and password, worked fine for me

  • @DeeshaRajput-sx1gj
    @DeeshaRajput-sx1gj Рік тому

    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.

    • @robotisim
      @robotisim  Рік тому

      No gpu is not a requirement, check yur drivers and update

    • @DeeshaRajput-sx1gj
      @DeeshaRajput-sx1gj Рік тому +1

      @@robotisim Thank you sir. You are right, it worked on the same day when i Questioned you.

  • @MrEngineer_
    @MrEngineer_ 5 місяців тому

    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 !!

    • @robotisim
      @robotisim  5 місяців тому

      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.

    • @robotisim
      @robotisim  5 місяців тому

      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

  • @kavehsedigh4268
    @kavehsedigh4268 Рік тому +2

    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?

    • @robotisim
      @robotisim  Рік тому +1

      Yes , the linux version is running using Cuda on my system .
      and jetson nano ( the lowest one ) also have the cuda docker enabled .

  • @iamnamniar
    @iamnamniar Рік тому

    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?

    • @robotisim
      @robotisim  Рік тому +1

      Gui access is required to docker

    • @robotisim
      @robotisim  Рік тому +1

      use the software i showed in the video

    • @iamnamniar
      @iamnamniar Рік тому +1

      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..

    • @iamnamniar
      @iamnamniar Рік тому

      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

    • @robotisim
      @robotisim  Рік тому

      @@iamnamniar install nvidia docker package and restart docker demon

  • @hongkyang7107
    @hongkyang7107 Рік тому

    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.

  • @jirivchi
    @jirivchi Рік тому

    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

    • @robotisim
      @robotisim  Рік тому

      ROS1 or 2 ?

    • @robotisim
      @robotisim  Рік тому

      The IP 172.17.0 something is because i am not connecting with internet , it is connected to a HOTSPOT without internet access

  • @manigoyal4872
    @manigoyal4872 Рік тому

    will docker be using my GPU?

    • @robotisim
      @robotisim  Рік тому

      yes as in the last part of linux , i am running on my gpu

  • @shyamkganatra
    @shyamkganatra Рік тому

    Sir the video quality is very poor unable to read anything in video

    • @robotisim
      @robotisim  Рік тому

      UA-cam is currently processing HD version , Will take 30 mins

    • @shyamkganatra
      @shyamkganatra Рік тому

      @@robotisim thanks for the response, yes now it's available in HD

  • @kumarj744
    @kumarj744 16 днів тому

    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.

    • @robotisim
      @robotisim  8 днів тому

      connect the display , when you run docker allow display connection