How to stop a simulation

Once a simulation has started, it might be a long one, is there a way to stop it? The only way I know is to close MP and reopen MP and start again. Seems like there should be a way to just abort the sim with a click. I think this is an issue because if for example I start a mission with a high altitude by mistake how can I stop it so I can change the altitudes or other factors?

Just “disconnect” from the drone/sim.

Exactly how? I hit the disconnect icon in the upper right corner and then did as connect and all sorts of wierd things happened. Maybe I don’t know how to disconnect.

Look for a console window where ardupilot.exe is running and close it. Or look for ardupilot.exe in task manager and kill the process’s

Clearly I can about the entire MP program but that is not what I am looking for. I just want to do a reset and have the option to change some parameters like altitude of way points and then restart.

I tried to do the mission restart command but this does wierd things it seems. In factg, I do not know what many of the action buttons are for. I will have to look at the documentation and try to find out what they are for.

Maybe a reset bujtton is needed on the action screen.

If you just want to completely stop the simulation without exiting MP, look for a console window in the Windows taskbar (it appears minimized during SITL execution).

Close that window. You can restart the simulation on the simulation page of MP.

If you want to change parameters that require rebooting the simulated autopilot, make your changes, and then use the reboot command from any of the pages where it’s available (the Setup/Mandatory Hardware/Compass page is an easy place to access it). You will see that MP disconnects from the SITL instance, but the console window actually remains open.

To reconnect to a running instance of SITL that has disconnected for any reason (like selecting “reboot”), select TCP as the connection port, enter “localhost” as the hostname, and use port 5760.

1 Like

If you don’t want to stop and restart the sim from MP simulator window, then while connected to the sim, press CTRL-F and press the Reboot Pixhawk button.
You have to be disarmed; otherwise it will be ignored.
The simulator will reset and MP will disconnect, you have to reconnect again.

1 Like

Seems like a lot of trouble.

Say Yuri, can you suggest to the developers that they add a “reset” button to the action menu? It would be nice.

Also, I keep looking for where the action buttons are described. For example, what does “mission restart” I would have thought it would have done what I wanted but it doesn’t. there are other options that I have no idea what they do and when to use them. When would I change loiter radius or speed or altitude? In what mode??

It’s a lot of trouble to close a window?

The remainder of the functions work exactly as they do on real hardware (which is the point). Mission restart should set the waypoint back to 1.

See here for the confusing altitude button (should also apply to Loiter Radius, since that’s a Plane only feature):
Remove “Change Alt” button for Copter and Rover · Issue #2612 · ArduPilot/MissionPlanner (github.com)

Mission restart sets WP 2 on my sim. However, I do not see the logic here.

If waypoint 1 is a takeoff waypoint and the craft is already airborne, it is skipped in favor of the next achievable waypoint. It can’t take off again…

There’s also a reboot action available in the same Action tab you previously referenced:
image

I started a sim mission and during the mission I clicked “preflight reboot shutdown” and absolutely nothing happened. So, what is it there for"" There are many buttons that I have no idea what they are for and I do not see and documentation in the docs.

Must be disarmed to reboot, as has been said here at least once.

1 Like

I don’t have a Pixhawk button.

BTW, isn’t there an option somewhere where MP doesn’t constantly move the window around to center it on the drone? I looked at config>planner but it is not there.

So I started a sim mission. During the mission I hit disarm then “pre flight shutdown” and the action hung up. At this popint no buttons had any effect.The mission stopped in its tracks then nothing.

Follow Andras’ instructions fully:
Ctrl+F. Then there is indeed a “Reboot Pixhawk” button.

And when you did the reboot action where nothing had further effect…didn’t the SITL instance disconnect? Would that not explain it? And then you reconnect as I already said.

Yes there was a disconnect. But then when I tried to re connect, I got errors. I must have done something wrong. Anyway, I’ll keep trying.

At this point it seems the best way is to just close MP and start over. It is not real hard since the mission is still in the simulator and a read brings it back.

Yes, that does work. You asked for a more efficient way, and we gave you a handful of methods that should achieve that.

If you ever get really bogged down in frustration, you can check the “Wipe” button in the SITL window, which will reset all sim vehicle parameters for that frame to default when you start a new simulation.

1 Like

All is not lost. I am now able to design a mission. Do a sim, load it into my drone via a bluetooth link and then execute the mission successfully. My primary objective has been achieved.

I just have to learn the finer points of Ardupiulot and MP.

disarm, Cntrk F, reboot pixhawk, does seem to work but then I have to re-connect. Then a white screen and eventually the sim starts. It is not really a clean way to reset but it works.