# P600: a virtual-propeller quadcopter

> Documentation version: 3.0
> HTML: https://docs.flarelive.manifolddynamics.com/manual/tutorials/p600/
> [Complete contents](https://docs.flarelive.manifolddynamics.com/contents.md) · [Agent index](https://docs.flarelive.manifolddynamics.com/llms.txt)

Run a prepared aircraft with a position command, inspect its rotor/body response and export Camera views.

Download [p600-gen2.fll](https://docs.flarelive.manifolddynamics.com/examples/p600/p600-gen2.fll) and [p600_flight.py](https://docs.flarelive.manifolddynamics.com/examples/p600/p600_flight.py) into the same tutorial folder. The FLL contains Gen 2, a rigid-body aircraft, virtual propellers, an actuator-surface fuselage model, a large static ground mesh and tracked side/top Cameras.

For an immediate preview, open the FLL and choose **Simulation > Run automatically**. Its enabled Custom Input supplies a hover command. The Python script below takes over that command for a repeatable trial.

![The prepared P600 aircraft and rotor downwash above a large static ground mesh, viewed by its tracked side camera.](https://docs.flarelive.manifolddynamics.com/examples/p600/preview.png)

## 1. Start Flare Live and install the client

Open Flare Live and save any existing work. Stop Simulation and end any Experiment before running the script, which opens the downloaded project in that instance.

In a terminal in your tutorial folder, follow [Workspace RPC](https://docs.flarelive.manifolddynamics.com/manual/operation/rpc.md#install-the-client) to install the client and activate its environment. `connect()` uses the running instance automatically.

For a run without a GUI, start [CLI serve](https://docs.flarelive.manifolddynamics.com/manual/operation/index.md#headless) in terminal A and run the script in terminal B.

## 2. Run a short hover trial

The settings at the top of `p600_flight.py` specify the project, output folder, duration and target height. Run:

```sh
python p600_flight.py
```

The script opens the project, begins a temporary Experiment, disables its fixed Custom Input and initializes. It sends the PX4 controller position mode with target world position `(0, 0, 1)` m and yaw 0. Unspecified velocity, acceleration and yaw-rate terms use NaN as allowed by the controller.

Expect a message near **1.9995 simulated seconds** for the supplied setup. The 2-second target is reached at the nearest simulation-step boundary.

## 3. Read the outputs

```text
p600-output/
├── trajectory.csv
└── export/
    └── <run-series>/
        └── camera_views/
            ├── Tutorial side/
            └── Tutorial top/
```

The CSV columns are `time_s, x_m, y_m, z_m`. The position comes from [Body Info](https://docs.flarelive.manifolddynamics.com/reference/sensors-and-io/body-info.md) at `p600/core/info`.

Plot `z_m` against `time_s`: it should rise from its starting height toward the 1 m target. Inspect the aircraft and downwash in the final images. Each Camera has an initial and final PNG; the final filename suffix is the simulation step used as that export's identifier.

The last two calls, `clear_simulation()` and `end_experiment()`, return to Document. To leave the final pose visible for inspection, comment out those calls; Stop and End experiment afterwards to return to Document. Rerunning the script overwrites `trajectory.csv` and creates a new image-export series.

## What is in the prepared scene?

| Setting | Supplied value |
| --- | --- |
| Fluid | Gen 2; density 1.225 kg/m³; kinematic viscosity 1.8e−5 m²/s. |
| Cell size / maximum velocity | 0.06 m / 40 m/s; step size 0.0015 s. |
| Block edge / Need criteria | 16 cells per edge / 0.1. |
| Wall model | CappedNavierSlip; slip length 2 cells, maximum slip ratio 0.8, NormalSide. |
| Visualization velocity range | 2–13 m/s. |
| Gravity | `(0, 0, -9.81)` m/s². |
| Fuselage | Actuator Surface with shared Actuator Surface Coupling. |
| Rotors | Virtual Propellers with shared Virtual Propeller Coupling; Simple Motor drives. |
| Ground | A 200 × 200 m static Triangle Mesh Shape and Box collider grouped under the same Empty object. |

```text
p600 (Free Joint-Body Pair)
├── fuselage visual/fluid shape
├── coarse collider
├── core (Fixed Joint-Body Pair)
│   ├── info (Body Info)
│   └── px4 (PX4 X-Quadcopter Controller)
└── four rotor Revolute Joint-Body Pairs
    ├── visual rotor shape
    ├── Simple Motor → Simple Motor Model
    ├── Virtual Propeller → Propeller / Blade / Airfoil presets
    └── optional Joint Sensor
```

The core is a sensor/control frame with its own offset. Its Body Info position is measured at that frame; see [sensors](https://docs.flarelive.manifolddynamics.com/manual/rigid-bodies/sensors.md).

## Large static terrain

The supplied ground stays fixed in world space:

```text
floor (Empty Scene Object)
├── mesh (Triangle Mesh Shape, 200 × 200 m; Visual + FluidBoundary)
└── collider (Box, 200 × 200 × 0.2 m; Collider only)
```

The terrain mesh supplies **Visual + FluidBoundary** and the Box supplies rigid-body **Collider** contact. The Box's center is at z = −0.1 m, so its top face aligns with the terrain mesh at z = 0. The floor and both shapes keep fixed transforms without Position Tracker or Transform Driver.

Rigid Body Solver collects this standalone static Box directly from the scene; no Joint-Body Pair is needed for the floor. See [static collider setup](https://docs.flarelive.manifolddynamics.com/manual/concepts/shapes.md#static-scenery-colliders).

Gen 2 classifies this mesh as static. It intersects and caches the relevant terrain geometry when fluid blocks are created, then reuses that boundary data during stepping. The large floor does not need dense sampling over its entire area.

Fluid blocks still follow the aircraft, rotor forcing and flow activity. Enlarging static terrain does not create blocks across the whole terrain: coupling takes place where the active fluid region reaches the surface. This allows a large fixed environment instead of a small floor moved with the aircraft. See [static boundaries](https://docs.flarelive.manifolddynamics.com/manual/fluids/boundaries.md#static-versus-dynamic-in-gen-2).

## Build or adapt another aircraft

Choose one fuselage fluid-force model: **FluidBoundary** on its mesh, or an **Actuator Surface** child with its coupling System. For this aircraft, the supplied scene uses Actuator Surface and clears FluidBoundary on that same shape.

Assign the controller's FL/FR/BL/BR references to the intended rotors. Check rotor axes, motor direction and propeller direction with a low-command test, then confirm upward thrust and yaw response. Simple Motor uses rad/s; configure its torque coefficient consistently with those units.

Set density, viscosity, resolution and maximum velocity for the experiment. Calibrate blade polars, motor response and control gains against your aircraft before interpreting quantitative flight performance.

When adapting a scene that used a small tracked floor, remove its Position Tracker and keep the terrain and its ancestors fixed to use Gen 2's static boundary cache. Keep the tracked tutorial Cameras separate from that terrain hierarchy.

If you already have an older P600 project, follow [migration from 2.x](https://docs.flarelive.manifolddynamics.com/manual/migration/from-2x.md) and save an upgraded copy separately.
