question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Telemetry logging fails

See original GitHub issue

Hi,

I ran into a problem using MAVSDK-Python telemetry class. I am able to initiate connection to my flight controller with mavsdk_server, and then also connect with examples/telemetry.py (every time I run it).

However, telemetry data is sometimes streamed, and sometimes not. So far I could not figure out anything systematic; it happens that I run the script, it works, I stop is, immediately run again and not working. I tried, reconnecting the flight control board, modifying /dev/ttyACM1 permissions, and not defining the port for mavsdk_server, but rather use the port number of it in my telemetry python script; none of them solved the problem.

What seems to be happening is in async for in_air in drone.telemetry.in_air(): the drone.telemetry.in_air() object is “empty”, so the program does not go into the for loop, but is constantly trying, since it runs asynchronously.

Anyone has any idea why it fails and runs correctly seemingly random? Thanks for any help!

Specs: My flight controller is Durandal. Using PX4 master build Running mavsdk-python on NVidia Jetson Nano board. The Jetson and Durandal are connected via USB, serial /dev/ttyACM1:115200. For mavsdk server I’m using the port option -p 50051.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
Safranek42commented, May 8, 2020

Hi,

thanks for your answer.

  • examples/telemetry.py always works
  • your script does not always receive the telemetry

Not exactly. The behavior of telemetry.py is the same as my script: sometimes works, sometimes not. The difference between the two script is mainly that I am writing to file instead of terminal. (I just wanted to test with the “official” example also.)

One limitation that we currently have in Python (as opposed to Java or Swift) is that if you call drone.telemetry.position() twice, the second call will stop the first one. So you can have only one coroutine running an async generator (here say drone.telemetry.position()) at a time. I opened an issue here a while ago.

Could it be the issue you are experiencing?

I don’t run two programs in the same time, so I don’t think that could be a problem.

Today morning I tried again, and it is always running correctly. Which is strange as I haven’t changed anything since yesterday, in the code or in the way I run it or use mavsdk_server. I will test it more and let you know the results.

0reactions
julianoescommented, Jul 29, 2020

Closing as there was no more answers here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failure in logging telemetry is failing the task #1315 - GitHub
Logging telemetry in tasks in logging an error on failure, it should just be a warning.
Read more >
Troubleshooting Office files and custom solutions with the ...
Use the Telemetry Log for Office 2013 to determine compatibility issues ... an error, fail to load, or cause the host application to...
Read more >
Telemetry: Diagnosing Test Failures - The Chromium Projects
If you're seeing a test failure on the bots and are unable to diagnose the issue from the test log, here are some...
Read more >
Telemetry Logging Error - Questions / Help - Elixir Forum
The error seems to have something to do with Telemetry. It looks like this: [error] an exception was raised logging %DBConnection.
Read more >
Error handling in OpenTelemetry
OpenTelemetry Java uses java.util.logging to output and handle all logs, including errors. Custom handlers and filters can be registered both in code and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found