PX4 Jetson Nano HITL with Pixhawk 6C

Hi there :wave:

I am currently working on a project where I want to perform some offboard control by creating waypoint missions. By now, my SITL setup works just fine and I am now transitioning to move the software stack onto the companion computer of the drone. I am using…

  • a Jetson Nano
  • on a Holybro drone
  • and a Pixhawk 6C as FCU
  • running on Ubuntu 20.04 LTS and ROS Noetic

I followed this HITL tutorial and first tried to make the Python Offboard Example provided by PX4 here work. However, arming the drone in HITL mode is not possible. I attached the logs of:

  • Terminal with instructions to start HITL mode according to the tutorial
  • Log of running roslaunch mavros px4.launch
  • Log of running rosrun offboard_py offb_node.py

I really appreciate the hard work you are doing here. Thanks a lot and looking forward to a interesting dicussion.

PS: The mentioned log files can be found in my personal sharepoint: PX4 LogFiles Sorry for the inconvenience.

Hi! Best to upload a log to logs.px4.io and provide the link here.

Hi @JulianOes

Thank you very much for your response. I tried to upload the logs, however it states, that the File upload failed. Maybe its because I upload basically text files logging the screen and one is a rosout.log.


I uploaded the FCU logs on the website you indicated. The link is this one

For the ros logs, I will share my screenshots, if that is also helpful, since those logs I cannot upload…

And also a screenshot including starting in HITL mode.

I am also running QGC after having started the HITL startup procedure.

So the log shows like 2s of armed, right? Is that what you did? Or did it just auto-disarm?

I’m not very familiar with MAVROS, so I’m not sure what is going on there.

Hi @JulianOes

Yes. The arming was me through my Python script. But after that it auto disarmed. It also showed error messages in QGC that GPS is not working. I mean for HITL the GPS sensor just needs to be connected to the FCU and it does not need to have a valid GPS signal.

Maybe I elaborate a bit more on what works and what I actually want to do.

So far, I was only working in my SITL setup with ROS Noetic and gazebo classic where I was able to implement more complex actions with the help of waypoints in MAVROS setting the PX4 into AUTO.MISSION mode. Since everything is working in simulation, I wanted to shift it onto the real drone and first test, if everything is working in HITL mode. However, I encounter the following problems:

  • Even though the drone was armed and a takeoff was detected, I couldn’t observe it in Gazebo.
  • The FCU is beeping every time my script retries to arm it and set it into OFFBOARD mode (that’s because I am first following the Python Offboard example provided from PX4) So I guess something is also wrong there?

If you think, that I should rather resolve this problem in the MAVROS forum on Github, just let me know. Maybe its more MAVROS related than I thought…

I’m not too sure, but if you have done enough testing in SITL, I would probably start doing tests with the real drone. First with RC control in stabilized or altitude control and position control, to make sure everything is tuned and working well, and then back to offboard, etc.

I don’t think HITL will give you much that SITL doesn’t in its current state, and just waste your time.

You could also consider SIH, but again, not sure what it would teach you.

1 Like

It’s just that the site where I can test the code and everything is really far away so I first wanted to make sure, that my code actually works well with the Pixhawk. So I hoped to see if my codebase is working on the actual target hardware. That was the main reason why I opted for HITL. But I appreciate you explanations.

I would invest in a cheaper setup like an X500v2 that you can use to test things locally.

1 Like