Help with uXRCE-DDS to serial connection - Pixhawk 6c

My hardware/software

My goal:
I am trying to connect the telem2 port of the pixhawk 6c to the uart2 of the jetson nano (pins 6, 8, 10) and I am attempting to do so through the uXRCE-DDS middleware between ROS2 and the controller. This is to enable using the jetson nano as an offboard autonomous computer. I am using ROS2 Foxy to enable aruco marker detection with an onboard camera.

What steps have I taken so far:

  1. ROS 2 User Guide | PX4 User Guide
  2. Install ROS2 Foxy
  3. Install uXRCE client
  4. Build ros workspace with com and msg
  5. uXRCE-DDS (PX4-ROS 2/DDS Bridge) | PX4 User Guide - followed setting for disabling mavlink on telem2 enabling the uxrce_dds_client on telem2, and setting the baud rate of 921600 on telem2
  6. I then turn everything on and launch the agent on the nano with: sudo MicroXRCEAgent serial --dev /dev/ttyTHS1 -b 921600

There is no connection happening between the two. I have also stopped the client on qgroundcontrol and restarted it within the qgroundcontrol console. I can post screenshots shortly if it would be helpful.

More details:
I have followed these guides step by step, multiple times, reflashed the os and restarted 3 times to ensure the install was done correctly. I sanity checked the steps on my laptop and tested with gazebo and all worked. I can not however check with gazebo on the nano as afaik, I’ve tried and can get gazebo running but there is a parameters file error which after researching online I found a github repo where one of the devs stated SITL is not designed to run on ARM architecture so I moved on.

Here is the state I’m at in screenshots

I can’t tell how PX4 is starting the uxrce_dds_client from your screenshots, can you please share the values of all of the UXRCE-DDS params? additionally any info on what you have tried with screenshots or copy/paste log output would be helpful

these are the parameters I have set for the uxrce_dds_client according to the guide.

Hi @Mitch ,

  • Can you try with a USBtoTTL adapter?

  • Did you compile the agent from source?

  • Can you also check the serial link, running for example a mavlink console on it? (disable uxrce_dds_client, re-enable MAVLINK on telem2)

As suggested on Discord, it could be that the serial port on the jetson is not “free”. If so, then with the USBtoTTL adapter it should work, while MAVLINK on the serial port should not.

I will try all of those and let you know! The suggestions are much appreciated.

@Benja I have tried a few more things to debug, and from what I can tell the issue is with comunication between the nano and the 6c controller. The agent has been compiled from source.

  • I am able to use the USBtoTTL adapter to successfully run the uXRCE agent on my computer and have plug and play functionality with the 6c controller

  • Also able to connect from the computer to the nano on the J40 header pins 6,8,10 using USBtoTTL (serial on the nano side) and connect through the terminal and have messages displayed using this guide as a reference (

  • I then disable nvgetty or the serial monitor on the jetson nano and when I try and run the agent I have the same issue as the screenshot above where the uXRCE agent is stuck on running… and logger setup.

Since the 6c can communicate with my computer and the nano can communicate with my computer, both of which were over USBtoTTL, I tried to connect the 6c to the nano using the same cable (USB side on the nano). Unfortunately due to the custom kernel I’m using the driver for the USBtoTTL cable was not enabled and I need to go into the kernel to change that, which I have as a potential solution but I’d like to avoid that if possible. SO I am not able to sanity check the comms between the 6c and the nano using the USBtoTTL as of right now.

I guess my next question would be, is there anything in the firmware of the 6c that would prevent it from talking to the nano? Otherwise is must be something either with the custom kernel (which is needed to run ubuntu 20 because I’m using ROS2 Foxy) or the pins not being available.

Again any suggestions of things to try would be much appreciated, there is slight progress which is great though!

But what about mavlink?

I want to understand if it is a communication issue (scenario where mavlink does not work) or a XRCE-DDS issue (Mavlink works).



I checked with mavlink on 1.14.0 using mavproxy and communication was able to be established between the two. Unfortunately I have found out that the flow sensor I want to use is not stable enough for my application on 1.14.0 so I need to drop back down to the stable release of 1.13

I appreciate all your help troubleshooting, it did end up working with mavlink and not with XRCE-DDS, I do not know why but at this point I need to move on.

Thanks again.

1 Like

Oh really?!
Did Mavlink communication work?

Ping me again if you will want to try XRCE-DDS again please!

Now I fear that there is something wrong with the agent

Yes Mavlink worked. Will do. Thanks again.

I am facing the same issues here with Foxy, Jetson Nano & Cube Orange flashed with V1.14 main branch on the PX4. The documents on starting the uXRCE-DDS agent are very vague. Would love to hear if you manged to solve it and provide a fix?

I wasn’t able to solve the problem with 1.14,

I downgraded to 1.13 and posted a guide here: Serial Comms - Jetson Nano & PX4-6C/ Hardware Configuration Instructions - Serial Communication between Jetson Nano and PX4-6C flight controller

which is working for me well now.

Hope it helps.

1 Like

hi @Winton_Long , can you provide more details about your issue?

Hi Benja. My Issues are exactly the same as Mitch had in the first post. Furthermore, the documentation is very hard to follow it jumps around a lot and the information for starting the Client doesn’t seem complete or clear. uXRCE-DDS (PX4-ROS 2/DDS Bridge) | PX4 User Guide if someone could provide an end to end solution with instructions that would be great, Its hard to follow. Thanks,

I see, regarding starting the client, you just have to set UXRCE_DDS_CFG,

and you are good to go for most of the cases.
What is most unclear about that?

Regarding the connection with the Jetson, are you too able to have a mavlink instance running on the same serial link?
Did you go through all checks I suggested above and all of then ended with the same result?
I’m talking about checking PX4 - PC uxrce link, PX4 - Jetson with TTL2USB adapter, etc
I don’t have a Jetson for debugging, you have to help me here

I have tested a Mavlink instance works fine.
I have tried a TTL2USB

You welcome to remote into my Setup with Nano and PX4 if you’d like to try have a look, I see several other users on youtube also struggling and looking for guidance.

Hi Benja, I wondered if you maybe you could give some guidance on starting the client in more details based on our setups. I have the Agent running it seems. My setup is as follows. Jetson Nano +Cube Orange connected to network (wifi). Serial connection Telem 2 all parameters setup between PX4 Cube orange. Host computer connected over the network running Ubuntu 20.04 with the PX4-Autopilot built there. Once i build with the release/1.14 the connection started to work on the nano an PX4. QGC daily build. Also maybe help with QGC settings based on your advise. Thanks in advance.

Hi @Winton_Long , could you confirm me the following?

  • Jetson Nano and Cube Orange are connected using serial, TELEM 2 on the Cube side, hardware serial on the Jetson (no USB adapter)
  • Jetson is connected to wifi, on the same network you have and ubuntu 20.04 machine
  • the ubuntu 20.04 machine builds the PX4 firmware
  • if you flash main in PX4, the the XRCE-DDS bridge works over the serial between PX4 and Jetson

HI Benja, Yes this is correct setup, I did not flash main but release/1.14 branch. When I open the workspace on the nano and source install and run, i get this jetson@localhost:~/linorobot2_ws$ sudo /home/jetson/linorobot2_ws/build/microxrcedds_agent/MicroXRCEAgent serial --dev /dev/ttyTHS1 -b 921600
[1686861942.967314] info | TermiosAgentLinux.cpp | init | running… | fd: 3
[1686861942.968051] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 4
[1686861956.396799] info | TermiosAgentLinux.cpp | fini | server stopped | fd: 3
[1686861956.397329] info | TermiosAgentLinux.cpp | init | running… | fd: 3
[1686861957.080854] info | Root.cpp | create_client | create | client_key: 0x00000001, session_id: 0x81
[1686861957.081827] info | SessionManager.hpp | establish_session | session established | client_key: 0x00000001, address: 1

when i run the sensor i get this (No data shown though, but the topic is there when i run ros2 topic list. jetson@localhost:~/linorobot2_ws$ ros2 launch px4_ros_com

[INFO] [launch]: All log files can be found below /home/jetson/.ros/log/2023-06-15-20-48-25-045362-localhost-5156
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [sensor_combined_listener-1]: process started with pid [5160]
[sensor_combined_listener-1] Starting sensor_combined listener node…

What do I need to do to start the client on the Ubuntu machine with QGC and PX4-autopilot?

Do i need to start another agent with UDP, I am a but stuck here…