Home        Store        Docs        Blog

Hitl regime for ardusub on Pixhawk platform

Hello! I have a question for such opportunity as setting parameters from Imitation to Pixhawk with ardusub, get signals to meters and set them back to simulator. Also is it possible to debug ArduSub code with gdbserver or something like that on Pixhawk, during Hitl emulation. Please give step by step instructions, as in https://dev.px4.io/master/en/simulation/#simulator-mavlink-api. I need to check, how code works with real signals, and what it send to motors and other peripheral devices!

Hi @YuryArnaut,

What about SITL?
There are some instructions on HITL for ardupilot but I’m afraid there is no suitable simulator yet.

SITL works just fine with gdb.

Thank you for answer William. The main problem is that I have to test what happen if pixhawk 1 would work and how it would behave with a lot of computational loads. I don’t have hardware for now. But I have to prepared for hardware coming.

I’m sorry, I passed wrong reference, here with hitl for Px4 : https://dev.px4.io/master/en/simulation/hitl.html#simulation_environment. Would it work correct with Px1. Also, for testing I did Gazeebo SITL as defined in “Running ArduSub SITL with Gazebo” article. But I install gazeboo 9. I have the same problem as described in Setting up a simulation environment. Would it work with hitl in such scenario?

Hi @YuryArnaut,

These instructions are for PX4 and do not apply to ArduSub.
Another option for analyzing performance is using the PM nesssages in dataflash logs. Those should let you know if your code is taking too much time too run or using too much memory.

Thanks. But I have some problems for installing as in this post Setting up a simulation environment. There are problems with ROS package, I’m running ubuntu 18.04

You don’t really need Gazebo for SITL. It has an internal model with simplified physics.

just run sim_vehicle.py --vehicle=ArduSub and you can connect QGC to it.

Thank you. I know, I did it. Is there some approaches for running hitl with ardusub? I want to test, how it would work as close as possible. While I don’t have hardware and I want to prepare for unknown situations.

Got it.
I’m afraid there’s no way to do it for Sub without substantial work.

So , for now, there is now such tools for hitl in sub? Or maybe I can connect via
sim_vehicle.py script?

Upon further research, I realized that currently there is no HITL support left in Ardupilot at all. The instructions linked earlier are old (7~8 years) and are currently archived.

Thank You William!

1 Like

This topic was automatically closed after 28 hours. New replies are no longer allowed.