Skip to content
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

Connection Delay with DroneKit via Radio Telemetry #1233

Open
Uzair11622 opened this issue Dec 5, 2024 · 0 comments
Open

Connection Delay with DroneKit via Radio Telemetry #1233

Uzair11622 opened this issue Dec 5, 2024 · 0 comments

Comments

@Uzair11622
Copy link

Hi everyone,

I am currently working on a project where I need to execute missions using a DroneKit-based Python script while simultaneously triggering ArduCopter modes through Mission Planner. To achieve this, I have configured MAVProxy to broadcast on UDP ports to both Mission Planner and the Python script. Below is the MAVProxy command I am using:

mavproxy.exe --master=COM6 --out=udp:127.0.0.1:14550 --out=udp:127.0.0.1:14551

While Mission Planner establishes an instant connection with the vehicle via the UDP port, the DroneKit-based Python script takes approximately 2–3 minutes to establish a connection to the vehicle using the following connect function:

vehicle = connect('udp:127.0.0.1:14551', wait_ready=True)

Interestingly, this delay does not occur during SITL simulations, where the Python script connects to the vehicle instantly via UDP or TCP ports. The delay only arises when using radio telemetry (915 MHz).

To investigate further, I bypassed radio telemetry by directly connecting the Pixhawk to the computer via a COM port. When connecting to the Python script using the same connect function with the COM port, the connection is established almost instantly. This confirms that the delay is specific to the use of radio telemetry with Dronekit.

I understand that several factors may contribute to this delay, including:

  • No heartbeat received in time.
  • Timeout issues during the connection process.
  • Background vehicle parameter initialization by DroneKit.

These checks are embedded in the DroneKit library, and modifying them could result in unintended behavior, similar to altering the ArduPilot codebase.

I am reaching out to the community for expert advice and potential solutions to reduce this connection delay when using the DroneKit connect function with radio telemetry.

Any suggestions or insights would be highly appreciated. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant