How to command PX4 to reboot via MAVROS?

#1

Hi, I’m making SITL environment for PX4 using Gazebo simulator.
After some crashes, I coded the SITL program to let Gazebo sim reset the pose of the IRIS model, but it moved wired. I thought I should reboot PX4 firmware, but I don’t know how to do that…not manually. How can I send a reboot message to PX4 firmware?

Programmatically reset the EKF
#2

Hi ! I need to implement the same, any improvement on this?
Thank you,

Paolo.

#3

I’ve had trouble resetting simulations as well, the reason being that EKF2’s position estimate would need to be reset. I don’t think there’s a MAVLink command recognized by PX4 to do so.

What’s wrong with restarting PX4? That’s what I ended up doing

#4

I’ve been doing some test with the pixhawk 1 - offboard mode
seems like the only way to reset the ekf2 estimator is the hardware way -> pushing the little button nearby the usb port

#5

since there is a way to reset using QGC maybe we can send same mavlink via mavros

1 Like
#6

Any solution to this problem , how to reset the SITL programmatically?

#7

You can reset some modules by writing a mavlink message handler and stop - start the module in that handler by calling those functions.