Reset, reboot, and initialisation#
Reset the simulation#
You can reset the simulation by selecting
Reset World or by
Ctrl+R. You can also trig the
world_reset_all action on the
fwman world component. For example, using the following call:
$ sphinx-cli action -m world fwman world_reset_all
This will reset the time, drone poses, and restart the firmwares from scratch. All changes made by the firmwares on their file systems are lost.
Reboot the firmware#
There are two ways to reboot the firmware:
By issuing a reboot request to the Web server:
$ curl -i -X PUT http://anafi-ai.local/api/v1/system/reboot
This will properly shutdown all services and reboot the firmware instance. Any changes made by the firmware on the file system are preserved. The operation is canceled if the drone is flying.
This command is not supported on ANAFI. To reboot an ANAFI firmware, you have to connect to your firmware with
adband issue a reboot
$ adb connect 10.202.0.1:9050 ; adb shell reboot
By triggering a
reset_firmwareaction on the
$ sphinx-cli action fwman reset_firmware
This will reboot the firmware instance without properly shutting down services, and without checking if the drone is flying. Any changes made by the firmware on the file system are preserved.
Modify runtime parameters before firmware startup#
This section shows how to set up runtime parameters before the firmware starts up. This way, we can check the firmware initialization with custom parameter values.
First, you need to start Parrot Sphinx with the
$ sphinx -U /path/to/my.drone
Once Parrot Sphinx is started, all runtime parameters are accessible and can be modified even though the firmware is waiting to be launched.
Finally, you just have to start your firmware by sending the
action to the world component
fwman. This can be achieved either from the
Web interface, or using the command line:
$ sphinx-cli action -m world fwman start_firmwares
Change initial drone position for next world reset#
As already told in Interact with the simulation, the initial drone position (also called spawn point) can be configured using either Parrot Sphinx command line, or by editing the .drone file.
It is also possible to change this starting position so the drone gets spawned
at a different position after a world reset. To do that, just set the
initial_pose parameter of the
fwman component to the name of an existing
spawn point or an explicit 6-number pose. For example, use the following
command if you want the drone to be spawned 5 meters in front of the origin:
$ sphinx-cli param fwman initial_pose "5 0 0.2 0 0 0"
Change scene world altitude for next world reset#
It is also possible to change the altitude of the world (requires a world reset).
To do that, just set the
scene_altitude parameter of the
fwman component to
the altitude (in meters) you want.
This won’t change the position value of the drone, but components like the gps
and some world and physics parameters will be influenced by this change.
This setting overrides the gps elevation set by the
For example, use the following command if you want the world to be set at 2000m:
$ sphinx-cli param fwman scene_altitude 2000