-
Notifications
You must be signed in to change notification settings - Fork 1
e. Minimum test
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.
- Once you have opened UNetyEmu in the
Unity Editor
, go toProjects
window, find theAssets / Scenes
and open theFirst Scenario
scene by double clicking;
- 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 theHierarchy
window. This will zoom in on the object. Then, you can navigate using the mouseScroll
, and a combination ofAlt + Left or Right Click
, to view the objects in the scene.
- Run the simulation by clicking the
Start button
above theGame
window;
-
Once the simulation has started, we will hide some
Gizmos
from theGame
window for better visualization of the drone and the other objects. TheGizmos
are located in the upper right corner of theGame
window. It is important to keep theGizmos
activated for later viewing of the detection rays from the 360-degree LiDAR sensor. Click on the arrow next toGizmos
to display thedrop-down
list, and do the following steps as shown in the Figure below:- Turn the 3D Icons slider to the left to decrease the size of the camera image that is attached to the drone;
- Deactivate the Animator;
- Deactivate the BoxCollider;
- Deactivate the Camera;
- Deactivate the Canvas
If you don't see the
Gizmos
button in theGame
window, simply try adjusting the width of theGame
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.
- Click anywhere inside the
Game
window. Then, you can use thearrows
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 theU, 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.
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 aPID controller
to follow the target.