ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
10.91k stars 17.4k forks source link

AP_DDS: Add UDP support for ChibiOS using the LWIP stack #24884

Closed Ryanf55 closed 6 months ago

Ryanf55 commented 1 year ago

Feature request

Is your feature request related to a problem? Please describe.

You can only connect real hardware to a companion computer over serial, which is slow.

Describe the solution you'd like

Allow using the new network stack to connect to the companion computer over network, which is much faster

Platform [ x] All

More info

Here's the interface that we already met for the UDP in AP_DDS: https://github.com/eProsima/Micro-XRCE-DDS-Client/blob/master/include/uxr/client/profile/transport/custom/custom_transport.h

It was implemented here: https://github.com/ArduPilot/ardupilot/blob/5bd5aa87a728ebae468e3c3247467d8971a5d6fa/libraries/AP_DDS/AP_DDS_UDP.cpp#L12

As far as I can tell, the ArduPilot DDS over UDP is implemented as a UDP Client on Port 2019. No multicast is used right now. We currently hard code the address to 127.0.0.1 , so it only works in SITL. This is the address for the server address for the DDS agent on the companion computer. It needs to be exposed through a parameter. https://github.com/ArduPilot/ardupilot/blob/5bd5aa87a728ebae468e3c3247467d8971a5d6fa/libraries/AP_DDS/AP_DDS_Client.h#L140

The port is already has a parameter: https://github.com/ArduPilot/ardupilot/blob/5bd5aa87a728ebae468e3c3247467d8971a5d6fa/libraries/AP_DDS/AP_DDS_Client.cpp#L63

Ryanf55 commented 10 months ago

This should work. Ready to validate on hardware now.

Ryanf55 commented 6 months ago

It's part of 4.5 now.