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.
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.
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.
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
@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 (https://jetsonhacks.com/2019/10/10/jetson-nano-uart/)
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!
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.
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?
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
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 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 sensor_combined_listener.launch.py
[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 
[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…