[Ros2] Creating a UDP socket in a node
Hi! I am converting my package from ROS1 melodic to ROS2 Dashing and we have a node that functions essentially as a UDP socket to send and receive messages to an external device using boost::asio.
To my understanding, ROS 2 no longer has boost as a dependency and recommends using the std library in C++ to replace most of the boost classes and functions, however C++ std library does not have asio, or socket creation tools for the matter.
So my question is, how can I make nodes send and receive data in ROS 2 without boost? I noticed on Windows 10, asio was a dependency and I was wondering if I can just use asio, and if so, how do I include it and declare it as a dependency in my node?
Or is there another ROS 2 dependency/method that is capable and the standard "ros 2 way" of accomplishing this?
Thanks!
Not exactly an answer, but ROS2 has
asio
as dependency, since its built together with Fast-RTPS.I can't seem to find it in the lib folder. That is what I am looking for but when I try to use find_package(asio REQUIRED) Cmake can't find it. Do you know how I can properly link asio to use asio.hpp as an include?