My current focus is on developing a one-window GUI that displays sensor data and allows users to send commands through user input. While I have grasped the basics, I have encountered a roadblock that I am unable to overcome.
Specifically, I am facing an issue with waiting for the heartbeat message in my code. I am using the wait_heartbeat() method, but when I start the Pixhawk 6 and run my code directly, I am unable to receive the first heartbeat message. The code seems to be stuck at this line. I have connected the TELEM1 Port to my PC using a TTL to USB Converter.
Interestingly, when I run QGroundControl (QGCS), it successfully connects, and then, after closing QGCS and running my code again, I start receiving the first heartbeat message followed by the rest of the MAVLink messages. (PYTHON)
My suspicion is that QGCS might be sending MAVLink requests that trigger the heartbeat message. However, I am uncertain how to replicate this behavior in my own code.
I would greatly appreciate it if you could provide some insight or guidance on how to resolve this issue.
So I could see only one change and did it manually ‘CONFIG_DRIVERS_CDCACM_AUTOSTART=y’
But i haven’t done custom build and followed by uploading it.
I think that to build, as given, on the website using: make px4_fmu-v6x_default
After which how do I upload it into the Holybro Pixhawk 6X? Is there any steps missing before or to be followed after building and uploading into pixhawk?
No the issue couldn’t be solved so I had switched to ardupilot for now so that I can do the project and figure this issue at the later/last stage.
I don’t think the px4 firmware was build for this type of connection or maybe you could try this: https://www.ardusub.com/developers/pymavlink.html#run-pymavlink-on-the-companion-computer
but this I think will work with UDP connection only not ttl2usb. Please try and update it here. It would help me also.