-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't make MAVSDK work with our PX4 based drone #188
Comments
The actions are failing because there is "No System", i.e. the drone has not been discovered. You should check for that first. From the log output, we see that a drone has not been detected. When it happens, it looks more like this:
I think that's where the confusion is. You configured QGC to send MAVLink messages to Have a try with px4-gazebo-headless: set the app to listen to
Where 192.168.0.12 would be the IP of the device running your app |
Here is what our drone's hardware developer says:
So how do you think, can we implement all the three patterns with MAVSDK-Swift? How can we configure MAVSDK-Swift to initiate communication with the drone (192.168.4.1:8001)? Is it possible in any way? In Android SDK (https://github.com/dronefleet/mavlink) you can just use MavlinkConnection with input and output streams and you can just send data packets using DatagramSocket to both directions (from app to drone and vice versa) |
I agree with you that it would be nice for MAVSDK to initiate the connection, but right now it cannot do it from MAVSDK-Swift. MAVSDK-C++ can, though, and I would like to make it work for MAVSDK-Swift/MAVSDK-Java in the future (probably after this PR is finished). But in the meantime, you'll have to make your drone initiate the connection (that's actually the traditional way it is done in PX4, though I agree with you in that I would rather have the GCS initiate the connection). |
We have a drone which is based on PX4 and esp.
We already have an Android app which successfully connects to the drone and allows to control the flight:
Also we tried QGroundControl app, in which we create udp connection on 192.168.4.1:8001. The app connects to the drone and allows at least to get some telemetry data (there are some problems with take off however - it does not work).
Now we are trying to make an iOS Swift app to control the drone.
We tried MAVSDKSample app and also tried our own project.
Here is our code and what we get in console for MAVSDK Sample app:
We get a "No System" error when trying to run some commands from the Example app (press buttons like Take Off)
It seems that we should somehow set the 192.168.4.1 ip address but we don't know how to properly set it. How to properly do it?
The text was updated successfully, but these errors were encountered: