ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

[autoware.auto] udp driver bind error

asked 2020-04-06 07:55:24 -0500

Andreas Lebherz gravatar image

Hello everyone,

I'm working with the AutowareAuto percetion stack https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto in ros2-dashing on an Ubunutu 18.04 machine.

I'm currently trying to rewrite the velodyne vlp-16 driver to use with a different lidar sensor. The configuration works similar with a .param.yaml file where i define 'ip' and 'port' of the device which are then used in the udp_driver.hpp

The ip-value for the velodyne driver is set to '127.0.0.1' and when I try to change this to an actual device address, say '192.168.1.61' i receive following error:

bind: Cannot assign requested address

Can anyone explain to me where the ip-address is set in the velodyne driver or what pieces I'm missing to use a custom Ip-address in the .param.yaml file?

Thank you for your help, best regards Andreas

edit retag flag offensive close merge delete

Comments

Are you using master or an older commit? I believe the current version uses ros-dashing-ud-pdriver instead of the previous udp_driverthat was part of the AutowareAuto stack (it got upstreamed to https://github.com/ros-drivers/transp...).

Josh Whitley gravatar image Josh Whitley  ( 2020-04-06 19:28:40 -0500 )edit

Hi Josh, thanks for the fast reply! Currently I'm working on the master branch and the current version uses the driver you mentioned (meaning the /opt/ros/dashing/include/udp_driver/udp_driver_node.hpp) .

So this seems to be not only an Autoware specific problem but rather a ros problem?

BR

Andreas Lebherz gravatar image Andreas Lebherz  ( 2020-04-07 05:21:24 -0500 )edit

To generalize the question:

How to use the Autoware velodyne driver with a real sensor (which default ip=192.168.1.201) or how do you set this ip in the .param.yaml so that no error occurs?

Thank you for your help, BR

Andreas Lebherz gravatar image Andreas Lebherz  ( 2020-04-07 11:54:03 -0500 )edit

One thing to check is whether the driver starts a server or a client. If it's a server, you would configure the IP address on which you want to bind the server port. That would not be the IP of the device, but of a local NIC.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-08 04:17:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-04-08 21:35:01 -0500

Josh Whitley gravatar image

@andreas-lebherz Are you using ADE with the default .aderc file? If so, this is likely a problem in the Docker container. To give the Docker container access to your local network devices, you need to run ade start -- --net=host. Otherwise, the container is essentially network-isolated.

edit flag offensive delete link more

Comments

Thank you very much Josh, this was exaclty what I was missing!

Andreas Lebherz gravatar image Andreas Lebherz  ( 2020-04-09 04:09:01 -0500 )edit

Hello again, today I tried the variant you suggested to connect to a real sensor (ouster os1 in my case) and got following results for the .param files: ip: "127.0.0.1" and ip: "192.168.0.255" don't lead to a bind error - everything but everything else seems to do so.. I have to connect to "192.168.1.61" but I can't get it to work

Can you please tell me how you use a real sensor with the velodyne_driver from the Autoware stack?

Andreas Lebherz gravatar image Andreas Lebherz  ( 2020-04-15 03:33:27 -0500 )edit
  1. The driver only works with a Velodyne VLP-16 for the moment.
  2. You still have to configure your local network to be able to connect to the IP address of the sensor but that's outside the scope of this question.
Josh Whitley gravatar image Josh Whitley  ( 2020-04-20 15:54:34 -0500 )edit

First, thank you for your reply! Is your Sensor configured as 'SingleSensorTransmittingtoaBroadcastAddress'? That would explain to me why you can listen to 127.0.0.1 and still be able to receive messages from the VLP-16.

For me, regarding the Udp functionality, there is not really a difference between those two sensors. Both open a socket and the driver connects to it (the logic later is of couse completely different and is implemented by me for the ouster case). I am able to ping the sensor (ouster) but I can't connect to it via the UdpDriver. I tried to use the Velodyne-Driver outside the Docker container to be sure to exclude the possibility of failure here but using a different IP-Address in the .param.yaml file leads to bind: Cannot assign requested address except using .255 as last digit of the address.

Andreas Lebherz gravatar image Andreas Lebherz  ( 2020-04-21 01:42:51 -0500 )edit

What I did not realize until now is that the provided "ip" field in the .param.yaml file is the local bind address of the udp port. I thought this is the ip-address of the sensor-device... As far as I understood the bind error was caused by this - the thing I still not understand is at which part the connection is established (via connect() ) Does the VLP16 send Broadcast messages?

Thanks for all your help so far!

Andreas Lebherz gravatar image Andreas Lebherz  ( 2020-04-23 08:32:44 -0500 )edit
1

It does, yes. You can restrict the target IP address range for the broadcast through their web UI but they are still broadcast messages.

Josh Whitley gravatar image Josh Whitley  ( 2020-04-23 08:39:12 -0500 )edit

Thank you Josh for all the help regarding this topic!

Andreas Lebherz gravatar image Andreas Lebherz  ( 2020-04-23 09:01:08 -0500 )edit

Hello @andreas-lebherz , did you finally manage to get data from real velodyne ?

Aleksandr Savel'ev gravatar image Aleksandr Savel'ev  ( 2021-04-27 07:52:38 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-04-06 07:55:24 -0500

Seen: 747 times

Last updated: Apr 07 '20