Disabled IPv6 - Failed to send lidar UDP data to destination host
Sollimann opened this issue · 1 comments
Sollimann commented
In case you're getting this kind of error from the Lidar (OS0-128 in my case), I thought I should share a fix:
It could be that you're computer has IPv6 disabled by default. In my case the Intel NuC on the Clearpath Jackal has disabled IPv6 in the GRUB bootloaderen: /etc/default/grub
. To fix the issue you can either enable IPv6 or your can make changes to the drivers client.cpp
file. I did the latter:
- change
hints.ai_family
toAF_INET
(line 77 ish)
client.cpp
memset(&hints, 0, sizeof hints);
// hints.ai_family = AF_INET6;
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_flags = AI_PASSIVE;
- comment out the following (ish line 103 - 112)
client.cpp
// int off = 0;
// if (setsockopt(
// sock_fd, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&off,
// sizeof(off)))
// {
// std::cerr << "udp setsockopt(): " << impl::socket_get_error() <<
// std::endl;
// impl::socket_close(sock_fd);
// return SOCKET_ERROR;
// }
related issue: ouster-lidar/ouster_example#185
zehranrgi commented
hi,
where is cpp files? I couldnt find it in drivers folder? @Sollimann