Mats Bohlinsson
lvl.4
Flight distance : 1838077 ft
Sweden
Offline
|
peteredoc Posted at 6-27 10:54
Thanks for your replay Mats. Yeah I was looking for a drone-free option - but primarily to test the Android app I'm building.
If I understand your video correctly, your Python simulator is just testing the underlying algorithm, not the App itself, correct?
No, it tests the complete app.
I switch to python for development. So I only exported a simplified python api (dji sdk) from an android app.
The app itself is dumb. Only export a pythin api.
Then I did a simulator mocking the same api that runs on my desktop. Havn't had a android crash since, not joking :-)
Api looks like (Takeoff and goto a waypoint with virtualsticks and point the gimbal to a gps tracker)
api.drone.takeoff(altitude=20)
waypoint_loc = Location(lat=Lat, lon=Lon)
while api.private.slow_loop() and api.drone.get_location().distance(waypoint_loc)>5:
api.drone.move_towards(waypoint_loc, max_speed=9.5)
api.drone.point_gimbal(api.tracker.get_location(), time=2.0)
This can easily be mocked as you see, without callbacks, just a sequence. I have a solution for node programming (data flow) as well, but thats another story :-)
I'm using https://chaquo.com/chaquopy/ as python engine. You can crosscompile python yourseff, but it's beyond my knowledge. |
|