Quick way to reset the sitl

Hello everyone, does anyone know a quick way to reset the sitl and gazebo to the original position, without reinitialization, etc. I want to do the same restart in my project (SITL - Gazebo - Unity) as done in RealFlight via FlightAxis, i.e. pressing the space bar restores the copter to its original point, and SITL does not require recalibration, etc.

@rhys may be you know something about this?

Would this be what you’re looking for?

1 Like

To be honest, I would not like to go into Lua scripts either, and edit SITL sources in this way, since out of the box restart works together with RealFlight and probably there is such functionality, and you can somehow use ROS2 to send a request from Unity to move a position to the Gazebo without reinitializing SITL, as well as without Lua. scripts.

It is also worth noting that I am using version 4.5.7, which does not have the set_pose method. (Due to the fact that when we started making it, only this version was available).
The main question is whether it is possible to transfer the functionality for restarting the start of the simulation from FlightAxis to work with Gazebo?

Just as I wrote earlier, we are making a simulator for manual control modes mainly, and we just need to be able to reboot without errors using EKF and so on, and as I understand it, set_pose is needed for those modes where need_position_estimate is often requested. We need something simpler, just so that when moving the copter to the starting point, the EKF does not die or the link from the Gazebo does not disconnect, otherwise it is not pleasant)))