Skip to content

e. Minimum test

MauricioJRC edited this page May 27, 2025 · 1 revision

For a minimum test of UNetyEmu operation, we will run the First Scenario Demo and we will check the PID controller designed for the drone flight dynamics.

First Scenario Demo (only in Unity)

  1. Once you have opened UNetyEmu in the Unity Editor, go to Projects window, find the Assets / Scenes and open the First Scenario scene by double clicking;

Scenario1

  1. As you can see, this scenario shows a small environment with buildings, trees, and other static objects. A blue DronePad marks the drone's starting position and orientation, while the red DronePads indicate landing targets;

If you cannot see any objects in the Scene window, you can double-click on any object in the Hierarchy window. This will zoom in on the object. Then, you can navigate using the mouse Scroll, and a combination of Alt + Left or Right Click, to view the objects in the scene.

Scenario_1_1

  1. Run the simulation by clicking the Start button above the Game window;

Start1

  1. Once the simulation has started, we will hide some Gizmos from the Game window for better visualization of the drone and the other objects. The Gizmos are located in the upper right corner of the Game window. It is important to keep the Gizmos activated for later viewing of the detection rays from the 360-degree LiDAR sensor. Click on the arrow next to Gizmos to display the drop-down list, and do the following steps as shown in the Figure below:

    1. Turn the 3D Icons slider to the left to decrease the size of the camera image that is attached to the drone;
    2. Deactivate the Animator;
    3. Deactivate the BoxCollider;
    4. Deactivate the Camera;
    5. Deactivate the Canvas

If you don't see the Gizmos button in the Game window, simply try adjusting the width of the Game window by increasing its size.

You will only have to make these settings the first time you use UNetyEmu. The next time you open the project, these settings will be saved. You can test in each scenario and see the difference of enabling/disabling the view of these Gizmos.

Gizmos1

  1. Click anywhere inside the Game window. Then, you can use the arrows on your keyboard to move the drone's target position (white sphere) to up, down, left rotation, and right rotation. In addition, you can use the U, J, H, and K keyboard keys to move the target position forward, backward, left, and right, respectively. If the drone is following the white sphere (target), congratulations you have successfully installed UNetyEmu with its preliminary features.

drone1

The following section will complement this demonstration with the use of the sensors available on the drone.

Can you find all the red DronePads in the scene? Try to land on them. Remember that the keys on the keyboard change only the position and orientation of the target (white sphere), i.e. we do not change the position of the drone directly. The drone uses a PID controller to follow the target.

Clone this wiki locally