@Yuri_Rage thank you for reply!
I accidentally typed it wrong in this post. And it has been corrected now.
The parameters are based on the AP_DDS document
After confirmation, these parameters have been set correctly.
@rhys thank you for reply!
I am still trying DDS over UART.
I attempted to add an RTS/CTS connection between the PI5 and CubeOrange, and it seems to have some effect, but I am still encountering some issues:
When using baudrate=115200, while simultaneously monitoring /ap/clock, it seems to freeze after about 10 seconds.
With baudrates of 57600 or 38400, the same issue occurs, but it lasts for a longer time.
When I call the service, there is still no response.
Wired
Currently, my wiring setup is as follows:
OrangeCube <—> PI5:
RX <—> GPIO14(TXD0)
TX <—> GPIO15(RXD0)
RTS <—> GPIO16(CTS0)
CTS <—> GPIO17(RTS0)
The actual wiring method is as follows:
Will the transmission speed of DDS over PPP be better than DDS over UART?
It seems that the wiring for DDS over PPP and DDS over UART is the same (TX, RX, GROUND, RTS, CTS)?
This is my first time trying to use DDS communication, and I have many questions. I would greatly appreciate it if you could kindly provide your guidance.
In both approaches the DDS link uses a UART, but the protocol is different.
It’s possible to set up a 12.5 Mbps PPP link with flow control.
It is also worth checking that the serial link works well for another protocol such as MAVLink 2. The guides linked above have more details.
It seems that using DDS via UDP is more reliable than DDS via Serial (the terminology is a little confusing, as in both cases we are using a serial port (UART) to provide the hard link, but DDS may use different protocols, and they have different backends in the XRCE DDS agent).
@rhys Thank you! I think I succeeded!
Due to the delay and disconnection issues with DDS over UART(Serial), which I could not resolve, I switched to using DDS over Ethernet. The results were satisfying, and I’m sharing the successful method!
You need to set up the MicroROS execution environment on the computer.
The Ardupilot firmware with DDS must be compiled (./waf configure --board xxx --enable-dds)
During compilation, errors may occur, likely due to exceeding the flight controller’s RAM settings. In this case, I disabled some modules (added --disable-RANGEFINDER).
DDS_UDP_PORT=2019: The port through which DDS publishes over UDP on the network.
This needs to match the command for starting the micro_ros_agent on the computer, for example: ros2 run micro_ros_agent micro_ros_agent udp4 --port 2019.
NET_DHCP=0: Disable DHCP
NET_ENABLE=1: Enable network functionality
NET_IPADDRx: This is the flight controller’s own IP. It doesn’t need to be set specifically (just ensure it doesn’t conflict). Here is my current setting:
NET_IPADDR0=192
NET_IPADDR1=168
NET_IPADDR2=1
NET_IPADDR3=6
Operation Process
Flash the DDS-enabled Ardupilot firmware onto the flight controller.
Write the Ardupilot DDS (ROS2) parameters into the flight controller. You can first write the xxx_ENABLE parameters and then write other related parameters later.
Set the computer’s IP to DDS_IPx <<< Very Important!
Connect the flight controller’s Ethernet port to the computer’s Ethernet port (or use an Ethernet-enabled Telemetry Module).
On the computer, run ros2 run micro_ros_agent micro_ros_agent udp4 --port 2019.