ros-drivers / ros2_ouster_drivers

ROS2 Drivers for the Ouster OS-0, OS-1, and OS-2 Lidars
https://ouster.com/
Apache License 2.0
134 stars 79 forks source link

Support set_udp_dest_auto #73

Closed RFRIEDM-Trimble closed 3 years ago

RFRIEDM-Trimble commented 3 years ago

Added support for set_udp_dest_auto Added alternative configuration approach with ipv6 link local and automatic address detection.

Note: I would rather show how to use the sensor hostname instead of finding the link local address, but I cannot get hostnames to work with my device with this library.

Implements one of the boxes in #16 as requested by @rotu in #43 .

Before merging, I'd like to get the hostname working and instead show how to use that in the README.

RFRIEDM-Trimble commented 3 years ago

Sounds good. Do you have any solutions on how to get hostname working? I get a failure in get_addr_info. Tried os-### and os-###.local. I can ping os-###.local

SteveMacenski commented 3 years ago

Not sure - I've definitely used os-###.local before without any issues. I prefer the static IP, but I tested just to know way back when. Maybe a v2 issue?

RFRIEDM-Trimble commented 3 years ago

It's an issue with hostname resolution of the ROS2 Foxy docker container.

Back on topic - here's the upstream PR. https://github.com/ouster-lidar/ouster_example/pull/255

RFRIEDM-Trimble commented 3 years ago

That PR is now merged upstream. I assume I copy the client files back over here?

SteveMacenski commented 3 years ago

Yes!

RFRIEDM-Trimble commented 3 years ago

Seems like the indentation is different on the client files, and the includes are also different.

-//#include "ouster/build.h"
-#include "ros2_ouster/client/impl/netcompat.h"
-#include "ros2_ouster/client/types.h"
+#include "ouster/build.h"
+#include "ouster/impl/netcompat.h"
+#include "ouster/types.h"

Do you have a clang format file for this repo I can apply to the commit?

SteveMacenski commented 3 years ago

I haven't tried to format the ouster_example-derived code since it'll be updated every so often and I didn't feel it was a good use of anyone's time since we will always try to keep it in line with what's in the ouster_example client

RFRIEDM-Trimble commented 3 years ago

Ready! Synced with upstream. Had to perform some manual formatting in the header to follow the new doxygen spacing. Tested again, and ready for merge.