Giter Club home page Giter Club logo

Comments (20)

gulbulut avatar gulbulut commented on August 11, 2024 1

@JonasVautherin, @irsdkv thanks for your reply. I will check them all :)

from mavsdk-proto.

JonasVautherin avatar JonasVautherin commented on August 11, 2024

Isn't it what the logging C++ plugin does? If yes, I guess that's the way to go:

  1. Create a proto file corresponding to the logging plugin
  2. Write the gRPC code to add logging in mavsdk_server
  3. Generate the language bindings

Does that make sense?

from mavsdk-proto.

julianoes avatar julianoes commented on August 11, 2024

Note that the logging plugin is not yet implemented, it's mostly a skeleton:
https://github.com/mavlink/MAVSDK/blob/develop/src/plugins/logging/logging.h
https://github.com/mavlink/MAVSDK/blob/develop/src/plugins/logging/logging_impl.cpp

from mavsdk-proto.

irsdkv avatar irsdkv commented on August 11, 2024

Isn't it what the logging C++ plugin does?

Yes, it is.

Note that the logging plugin is not yet implemented, it's mostly a skeleton.

Yes, I realized this an hour ago 😄
I think that I will try to implement it.
But, because of ULog format looks a bit complicated, I think that I will create PR before full implementation to provide you the ability to check is my understanding of future logging module API correct.

from mavsdk-proto.

julianoes avatar julianoes commented on August 11, 2024

I could see the API to either give you a log stream or it logs directly to a file that you pass it the path to

from mavsdk-proto.

JonasVautherin avatar JonasVautherin commented on August 11, 2024

If it's acceptable in terms of overhead, I believe that a stream would be a more elegant API. And I don't know if you can "observe" a file on platforms like Android or iOS.

from mavsdk-proto.

julianoes avatar julianoes commented on August 11, 2024

I'm not sure if you want to stream at 20..50 kB/s through gRPC.

from mavsdk-proto.

irsdkv avatar irsdkv commented on August 11, 2024

And also question:
I think that logging C++ plugin should parse messages and call callback for each received message (like message_info_s) rather than pass raw data received in MAVLink message.
This should reduce the load for IPC (gRPC or file raw r/w).
What are you think about it?

from mavsdk-proto.

irsdkv avatar irsdkv commented on August 11, 2024

I could see the API to either give you a log stream or it logs directly to a file that you pass it the path to

May be this can be one of ways to do it. But this solution (raw data write) really seems not suitable for gRPC

from mavsdk-proto.

irsdkv avatar irsdkv commented on August 11, 2024

If it's acceptable in terms of overhead, I believe that a stream would be a more elegant API. And I don't know if you can "observe" a file on platforms like Android or iOS.

I know that Android support sockets (on mobile apps this is dirty hack, but that possible).
May be one of the solution may be in write some plugin (external for backend) which will receive messages or raw data with logging module and stream it in sockets or file?

from mavsdk-proto.

julianoes avatar julianoes commented on August 11, 2024

What about passing the logging plugin the path to the file or socket where it should write the log file to?

Something like this:
https://github.com/mavlink/MAVSDK/blob/e84034a468d67be6666296fadcb95312d77cc20c/src/plugins/log_files/include/plugins/log_files/log_files.h#L100-L113

from mavsdk-proto.

JonasVautherin avatar JonasVautherin commented on August 11, 2024

I'm not sure if you want to stream at 20..50 kB/s through gRPC.

I don't see why not. We get that stream from the drone through a radio, right? I believe gRPC is made to handle heavy loads on servers over the Internet.

from mavsdk-proto.

julianoes avatar julianoes commented on August 11, 2024

I suppose you're right.

from mavsdk-proto.

JonasVautherin avatar JonasVautherin commented on August 11, 2024

I mean, that's something to try probably. My concern is just that if we write it to a file, then it may become a plugin to download the logfiles and not a plugin to stream the logs.

from mavsdk-proto.

julianoes avatar julianoes commented on August 11, 2024

My concern is just that if we write it to a file, then it may become a plugin to download the logfiles and not a plugin to stream the logs.

No, you can only stream the logfile while flying, you can't download an existing logfile.

from mavsdk-proto.

JonasVautherin avatar JonasVautherin commented on August 11, 2024

Right. But in terms of API, if you give me a URL to a file and I can't "observe" it, then it looks like an incomplete log file, right?

And if I can observe it, then it's more looking like IPC. If it's just about performance, I would first try to stream it over gRPC. In other words I wouldn't assume gRPC can't deal with that.

from mavsdk-proto.

julianoes avatar julianoes commented on August 11, 2024

I'm fine with both.

from mavsdk-proto.

gulbulut avatar gulbulut commented on August 11, 2024

I want to list Log File and also i want to implement logging proto for MAVSDK-Python client.

1. Create a proto file corresponding to the `logging` plugin

2. Write the gRPC code to add `logging` in `mavsdk_server`

3. Generate the language bindings

Is this still the recommended way?

from mavsdk-proto.

JonasVautherin avatar JonasVautherin commented on August 11, 2024

Yes, together with "Note that the logging plugin is not yet implemented, it's mostly a skeleton", meaning that you may want to have a look at the existing C++ implementation, too 😄.

from mavsdk-proto.

irsdkv avatar irsdkv commented on August 11, 2024

@gulyvz also may be this implementation can help you a little: https://github.com/mavlink/qgroundcontrol/blob/2f5324fd1745aa7ffa8ab1d477e2c8f1cad61c1c/src/Vehicle/MAVLinkLogManager.h

from mavsdk-proto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.