MicroXRCE Connection Problem

I am trying to bridge PX4 to ROS2 with MicroXRCE but it just refuses to work, I have set the following:

  • Parameters on QGC UXRCE_DDS_CFG set to Telem 2 and Mavlink disabled for Telem 2 with baud rate set to 926100
  • using PX4 v1.14 on Pixhawk Cube Black and Jetson Nano with ROS 2 Foxy
  • Have setup MicroXRCE on Jetson and when I run “MicroXRCEAgent serial --dev /dev/ttyTHS1 -b 926100” in one window and “cat /dev/ttyTHS1” in another window I get these random squares with a question mark in them printing. However in the first window, I just get 4 lines of data and that’s it, while others I have seen get more lines of data.

I have tried multiple things and read multiple threads on the forums here and to no prevail, does anyone have any experience with this and encountered any similar issues?


Did you check the baud rate set on the Jetson side port ?

Hi, when I call the command “MicroXRCEAgent” I’m setting the baud rate at the end to 926100, matching the one I set in QGC for Telem 2. Is this what you mean or have I missed some other setting specifically for the Jetson?

So here the microXRCE agent is the Jetson. So that may be correct. But I know for Raspi , you need to put the baud rate explicitly each time you boot .

That didn’t work, same result as before. Also, when calling the MicroXRCEAgent, I noticed it was setting the baud rate for me when calling it anyway

This is always related to setting baud rate errors. Also it can be that your serial wiring has been swapped between Tx and Rx !

Well I have the baud set to 926100 on the jetson side and 926100 on QGC for the Pixhawk side and no luck. I double checked the serial wiring and when I swapped them around I don’t get the random squares anymore so I have the serial wiring done correctly. I know what else would need to be done with the baud rate as I have set it so many times, to different bauds, matching them up, to just get the same result. Restarting both devices to ensure the parameter changes, no luck.

Great !! So now we know that your serial wires were swapped…Slowly do the other procedure again and check… :grinning:

They were not swapped, they were right the first time. I’ve done the procedure so many times that I think I’m just going to give up on it now. So many docs provided on PX4 that are genuinely just useless, I don’t have the time to be spending 100+ hours on something that is laid out as if can simply get it working in a matter of minutes, and then I don’t even get it working. Very unprofessional in my opinion.

Kindly share the code for the UXRCE agent on your Jetson so that i can take a look at it to see if there any errors that i can spot now. Did you do this in python or C++

  1. First thing is first, have you checked the serial connection to work with either a loop back on the Jetson itself or another serial device (FTDI)?

If not, stop what you are doing with the pixhawk and prove the Jetson serial port works first. Jetson high speed serial ports are known to be problematic. Confirm the high speed serial port you are running the microdds agent on maps directly to the gpio of the Jetson uart

  1. serial RX on the Jetson maps to serial tx on the pixhawk. Serial tx on the Jetson goes to serial RX in the pixhawk.

  2. try reducing baud rate to 115200

  3. at the end of the day it’s all just bits and silicon. Ones and zeroes. Don’t attach emotions to anything here, it will only serve to frustrate you

It’s not code I’m using, its the command “MicroXRCEAgent serial --dev /dev/ttyTHS1 -b 926100”

I haven’t tried an FTDI as I don’t have the connector but I know the link works as I previously used it for MAVLink, which is still works for now. Yes I did fully disable MAVLink in QGC and set UXRCE parameter accordingly.

I have tried a baud rate of 115200 before, as well as 500000.

I understand that, but also why are these things posted online as guides for setting up such things when they have so many issues. I’ve been trying to setup VIO for PX4 with a ZED 2i stereo-vision camera for over a year now and I still do not have it holding position in POSITION flight mode. I have tried what seems like everything and now I am running out of time to finish this.