Hi, I am new to Docker. I am trying to connect to Velodyne lidar connected to my host computer with sensor IP, 192.168.1.201. I have tried “docker run -it --network host” to run docker which enables me to ping 192.168.1.201 from docker but does not let ros2 launch find it. I might be missing out a lot as I have not setup network or port in docker or launched it with settings.
Looking for advice which would be great help.
Is the lidar a network device connected by LAN/WiFi? It has a different IP than your host?
It is over lan and IP is 192.168.1.201 . Is it because —net host does not work on windows docker? Is there a workaround?
Well, Windows Docker is Docker Desktop which runs everything in a VM.
But you should still be able to connect from the container to the host external IP, as you should be able to connect to any Internet IP.
The only reason I can think of is that you have a proxy configured, so all requests go directly to the Internet, bypassing devices on the local network.
I use a Ethernet to usb adaptor to assign the sensor IP to 192.168.1.77 but that is all. Should this cause issues?
To start docker, I only use - - net host and no port assignment just fyi
If the IP is set up, you should just be able to connect to 192.168.1.77
. If it does not work, then probably you need to enable routing in your network stack.
Thank you, Let me look into that again and get back to make sure what IP the launch is looking at. If I were to enable routing, do you have any instructions for me or any material I can go through?
I’ve run into the same issue!
I can ping 192.168.1.201 in the container but get Velodyne poll() timeout
from “velodyne_driver_node.”
Have you solved the problem yet?
- using Windows docker desktop
- ros2 humble image: osrf/ros:humble-desktop