You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SakuraSakura edited this page Oct 18, 2018
·
4 revisions
In this tutorial, we will show you how to use VIVID Python API to control your drone.
Suppose you have selected a scene and Vivid Drone as your vehicle:
Let's do a random fly first. First, make sure you have Python installed in your environment.
The source code of random_fly.py is provided below. First we use VividClient to connect to our environment:
client = VividClient(ip="127.0.0.1", port=16612)
Then we use moveByDistance() to fly our drone, isHit() to check if the drone has hit an obstacle, and turnByDegree() to make random turns when we hit an obstacle.