USB-Connection from Pixhawk to Companion Computer (solved)

#1

Hello everybody,

yesterday I ran into some problems connecting my pixhawk cube with an Intel NUC as companion computer. (For reference about the looks of a NUC here is a German vendor site )
The main problem I think is about the USB-connection with the flight-controller. I’m using a USB-TTL adapter and I can establish a connection (in my case I use a ROS-System with Ubuntu). Below is a picture of my problem - the connection is lost and regained multiple times while doing nothing. Sometimes for more the 10 seconds , sometimes the connection was not able to reconnect on its own. If cancel my current mavros-connection task on the companion computer and restart it everything works fine again … at least for a while - there seems to be no pattern when the connection is lost.

So I would like to know about your experience with companion computers and how to connect them with your drones. Anyone who got a stable connection via USB-TTL running? Maybe our adapter is broken or the USB-connector is not tight fitting enough… OR are USB-TTL connection usually not a great idea?

Before I used a Rasberry PI as companion computer on another frame and that worked fine (connection via GPIO pins) but I would like to use the NUC in terms of more computational power (to handle complex sensor data, which will be added in the future).

Kind regards!

#2

What baudrate are you using? And what data at what rate are you sending to the Pixhawk?

#3

@hsu-ret Are you sending CompanionProcessStatus messages to the flight controller? This is a heartbeat message which enables the flight controller to monitor the status of the companion computer

#4

Hi Julian

I’m using a baudrate of 921600 and sending a ros-pose-msg (x,y,z and quaternion with timestamps) currently at 200 Hz.

The same config worked for our pi fine just checked the params.

#5

Hi Jaeyoung

I guess I do so… The connection is established via a mavros.launch script.
Upon executing the script I can track the console output which states:
CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot

But when I loose connection I guess the heartbeat messages stops too. At least the drone outputs it received a new heartbeat , which it normally should not do.

#6

@hsu-ret mavros does not send the heartbeat for you. You need to send it from your node.

#7

Ok I have now connected the NUC with the other Pixhawk-Raspberry-Frame. There it seems to be a stable connection… so maybe I have a problem with my USB-connector on my pixhawk or I failed some parameter settings (which I had double checked before).

I will start some kind of endurance test and let the connection run for about an hour and will give an update whether it worked or still lost connection.

#8

@Jaeyoung-Lim Ah ok so then I will have a look into it - I guess I missed it in the documentation.
Can you give me some links for it ? With the other drone everything worked fine and I did the whole position estimation with just a mavros connection which worked - I mean I even flew around and thought yeah thats fine. But now I wonder if it was just luck ?!?

#9

@hsu-ret Does the two drones have the same px4 version?

#10

Ok problem solved I guess.

The case were different firmware versions and/or different parameters.
The combination of NUC and the old pixhawk (which before was connected to the pi) ran for 2 hours straight with nor errors. I saved the parameter to a file and flashed the same firmware to the newer pixhawk with the problems (main difference was stable/master) then I loaded the other param-file to have now two similar configured pixhawks. Up to now the connection there is running fine no problems for more than the last 30 mins.

I just feared my Telem2 port might be broken but right now it seems it was just some parameter nonsense. Also I realized our ‘newer pixhawk’ might be quite old because it is affected by the silicon errata. But its running PX4_FMU_V3 so I guess its fine.

Thanks for your concern and your help @Jaeyoung-Lim and @JulianOes

1 Like
#11

Cool, thanks for the feedback.