![]() Package NameĬontrib.go.opencensus.io/exporter/stackdriver To run the system, we’ll import the following packages. Alternatively, Microsoft's AirSim simulator provides explicit support for training machine learning models for self-flying drones.Go get -u /census-ecosystem/opencensus-experiments Packages to import How cool would it be to have the ability to set a marker on a map and have the Tello fly there autonomously, while automatically avoiding obstacles in its way? A good starting point for this might be to take a look into GoCV, which is a Go interface to OpenCV. In case I have some time to further work in this little project, I would love to add basic "self-flying" capabilities. Within the tick() method, the only thing done is to translate the binary key states to API commands and sync them to the device. ←), a flag for that key is toggled on for 250 ms before it's automatically reset again, if the key was released in the meantime. To cope with that, I introduced a debouncing logic. ![]() This behavior combined with the fact that Gobot's keyboard driver only supports to communicate when a key is pressed, but not when it's released again, made it a little difficult to smoothly control the drone. In this case, the drone would go left with max speed until you explicitly send drone.Left(0). Once called, they are being applied continuously until manually stopped. One thing that made me stuck for a while was the way API commands like drone.Left(100) (where the integer parameter represents the movement's "intensity" or speed) work. The entire code is available on GitHub at n1try/tello. The program's main method is as simple as this:Įnter fullscreen mode Exit fullscreen mode renders the drone's video stream to an MPlayer window with 10 FPS. ![]()
0 Comments
Leave a Reply. |