mavlink / MAVSDK

API and library for MAVLink compatible systems written in C++17
https://mavsdk.mavlink.io
BSD 3-Clause "New" or "Revised" License
614 stars 502 forks source link

Connecting my MAVSDK server with c++ to my front-end #2375

Open VinayAquaairx opened 4 weeks ago

VinayAquaairx commented 4 weeks ago

Hi @JonasVautherin @julianoes This is vinayak i have front end ready and i installed jmavsim and MAVSDK_server, and grpc and connected these with my front-end the data is coming but now i want to try with my drone and i dont know how to connect i coonected my drone with lan to my pc and i tried my rasberry py ./build/default/src/mavsdk_server/src/mavsdk_server udp://:192.168.2.2:14550 -p 50000 this is my ipaddress and port address and i am getting this error

[06:16:04|Info ] MAVSDK version: v2.12.2-55-g249b064e (mavsdk_impl.cpp:28) [06:16:04|Info ] Waiting to discover system on udp://:192.168.2.2:14550... (connection_initiator.h:20) [06:16:04|Warn ] Connection using udp:// is deprecated, please use udpin:// or udpout:// (cli_arg.cpp:28) [06:16:04|Error] bind error: Permission denied (udp_connection.cpp:84) [06:16:04|Error] Connection failed: Bind error (connection_initiator.h:47)

can you help me connection my drone which sends data to my front-end

Thank You vinayak

julianoes commented 3 weeks ago

First of all, you are not using the latest release but you are using main which actually changes the connection API. However, that's not documented yet. So be aware of that. This warning actually tells you:

 [06:16:04|Warn ] Connection using udp:// is deprecated, please use udpin:// or udpout:// (cli_arg.cpp:28)

What you have to know is that with UDP connections, there are two ways:

I don't quite understand your setup and how it all connects. To help further I'd have to know how it all connects.

julianoes commented 3 weeks ago

And make sure to read through this: https://mavsdk.mavlink.io/main/en/cpp/guide/connections.html

VinayAquaairx commented 3 weeks ago

Hey first i installed JMAVSIM simulation to get sample data from drone and installed MAVSDK server from https://mavsdk.mavlink.io/main/en/cpp/guide/build.html this by following those steps and next i installed grpc which gets data from mavsdk server and it sends the data to my front-end this is what i did. Now i installed https://github.com/mavlink/MAVSDK/releases the latest version and followed these steps https://mavsdk.mavlink.io/main/en/cpp/guide/build.html to build it. Now so if there is another way for getting data through mavsdk server to front-end. please let me know and can you please tell me the steps what to do or any

image

to be clear i followed these steps upto now.

julianoes commented 3 weeks ago

Right, what I mean is how the things connect.

DronecodeBot commented 3 weeks ago

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/about-the-mavsdk-connect-with-drone/40245/2