dockerdocker-desktopvncros2

Can't connect to UrSim docker with anything besides localhost


I am trying to run the ursim_e-series docker container and connect to it using the ur_robot_driver. I've set it up as per the descriptions so that it launches with the command docker run --rm -it -p 5900:5900 -p 6080:6080 -v ${HOME}/.ursim/urcaps:/urcaps -v ${HOME}/.ursim/programs:/ursim/programs --name ursim --net ursim_net --ip 192.168.56.101 universalrobots/ursim_e-series and should be accessable via the browser by http://192.168.56.101:6080/vnc.html.

It launches successfully, but I am only able to access the VNC in brovser using http://localhost:6080/vnc.html, which also doesn't allow for me to see the robot simulator, when trying to connect to it with ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=192.168.56.101 as it can't find the robot on the ip address.

I have Linux Ubuntu 22.04 and Docker Desktop 4.21.1 (114176). Let me know if other info is required!

Related question

When running ifconfig i get the output

enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.13.136.72  netmask 255.255.254.0  broadcast 10.13.137.255
        inet6 fe80::7943:8ae8:4740:e969  prefixlen 64  scopeid 0x20<link>
        ether 98:fa:9b:bb:d4:af  txqueuelen 1000  (Ethernet)
        RX packets 2896104  bytes 772999648 (772.9 MB)
        RX errors 0  dropped 222  overruns 0  frame 0
        TX packets 2516553  bytes 170849174 (170.8 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 251007  bytes 56927434 (56.9 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 251007  bytes 56927434 (56.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker network inspect -v ursim_net returns

[
    {
        "Name": "ursim_net",
        "Id": "249333ce0b18910f29a69f69d5e9ff6229a14faaf4ff14f8d3c9cb51062d7c80",
        "Created": "2023-07-26T12:59:11.831234829Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "192.168.56.0/24",
                    "Gateway": "192.168.56.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "42219db95f6fd3be6fac11943664582a99e34276239e47844fe74f0c6d5e1b1b": {
                "Name": "ursim",
                "EndpointID": "2485afa6b5ed449706dca7164dc736325e5a2dab2724666204e43d71f431df14",
                "MacAddress": "02:42:c0:a8:38:65",
                "IPv4Address": "192.168.56.101/24",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]


Solution

  • Using docker.io instead of docker-desktop fixes the issue. Sadly, I don't know what differs between them to make this happen.