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

PX4 and ping command #6721

Closed
shening opened this issue Mar 3, 2017 · 6 comments
Closed

PX4 and ping command #6721

shening opened this issue Mar 3, 2017 · 6 comments

Comments

@shening
Copy link

shening commented Mar 3, 2017

Hi I was wondering if the Mavlink ping command was implemented on the PX4 in order to measure GCS to aircraft connection latency

PING ( )
https://pixhawk.ethz.ch/mavlink/
A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections.

Thank you,

Sebastian

@dagar
Copy link
Member

dagar commented Mar 4, 2017

It's not implemented in PX4, but it shouldn't be that hard to add. If you're interested in adding this I'd be happy to point you in the right direction.

http://mavlink.org/messages/common#PING

You would add a simple function in the PX4 mavlink module here - https://github.com/PX4/Firmware/blob/master/src/modules/mavlink/mavlink_receiver.cpp#L704

void
MavlinkReceiver::handle_message_ping(mavlink_message_t *msg)
{
    // send ping reply
}

@mhkabir
Copy link
Member

mhkabir commented Mar 5, 2017

We should then expose the ping statics per-link via mavlink status.

I've been meaning to do this for a while, but if @shening is interested in doing it, that's awesome!

@dagar
Copy link
Member

dagar commented Apr 28, 2017

Would love to have this is you're interested in implementing. Pull requests welcome!

@dagar dagar closed this as completed Apr 28, 2017
@weiminshen99
Copy link

Hi, All,

Could you please tell me if this has been implemented yet? I just stated flying multiple UAVs and it would be great to have this handy. Thanks in advance.

Wingman

@weiminshen99
Copy link

Hi, @dagar,
I am interested in implementing this because I need it badly for my multi-PX4 swarms. Please let me know how. Do I need to open a new issue on this? Thanks!

@dagar
Copy link
Member

dagar commented Apr 3, 2018

@weiminshen99 it looks partially implemented. https://github.com/PX4/Firmware/blob/master/src/modules/mavlink/mavlink_receiver.cpp#L1718-L1728

Yes please open a new issue to discuss.

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

No branches or pull requests

4 participants