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

Redundant comms #429

Merged
merged 5 commits into from
May 17, 2013
Merged

Conversation

uaarg
Copy link

@uaarg uaarg commented Apr 27, 2013

Here's my pull request for the redundant communication system as described here: http://paparazzi.enac.fr/wiki/Redundant_Communication

This currently provides redundancy for plane to ground communication only (not ground to plane).

Since my last e-mail, I've added support for multiple aircraft sharing a link as well as displaying link status information during a replay.

Screenshot from 2013-04-15 22:59:01

camlee added 5 commits April 27, 2013 12:49
…g link agent to allow it to be given an id (through the -link_id flag) and to send ivy messages of a different format (when -redlink is set). The messages are sent within the TELEMETRY_MESSAGE message as a ;sv (colon-seperated-value) which are listed to by the link_combiner.py agent.
…the Link Combiner agent. This agent receives ivy messages from the link agent(s) when they have a name specified, removes duplicate messages, then sends ivy messages of the same format that the link agent used to send messages.
… from link_combiner.py in the LINK_STATUS message. The GCS now has a page in the notebook named Link, the ratio of active links appears in the main link indicator, and messages when a link is lost or gained are displayed in the console.
…ircraft are connected through the same link. Also added support for recording link status information in flight logs and displaying it during a replay.
@flixr
Copy link
Member

flixr commented May 3, 2013

Hi Cameron,

Thanks a lot, this looks nice! And really cool that you already made proper documentation for it :-)

There are probably some implications for other parts (e.g. the python messages app) due to the added link_id.
@gautierhattenberger will hopefully have time soon to take a look at this as well...

One other minor comment:
In the current python files the old optparse is used instead of argparse, since that is only available since python2.7 (and on some older systems (e.g. debian squeeze, lucid) we have only python 2.6 :-(
But since wheezy is coming out and lucid is EOL now, we should probably ignore that and require 2.7 as minimum version ;-)

@flixr
Copy link
Member

flixr commented May 3, 2013

Another minor style hint for future commits:
It is way nicer to browse the commit log if the first line of the commit has only a brief description (usually < 50 chars).
Then leave one line blank and describe it in more details if needed (with usually 80 chars per line).
This make is nice to view in git log and gitk :-D

@uaarg
Copy link
Author

uaarg commented May 14, 2013

Thanks for your comments Felix.

I tried to design the system to work with all of the other parts as is. So I don't believe there are any implications to other code, but I'd definitely like other people to verify this and let me know if I'm wrong. The messages app for instance (OCaml or Python) will display exactly the same data with only two changes: 1. the DOWNLINK_STATUS message has an extra field (the link_id) and 2. the message app will be displaying messages received from either link. Because the change to the DOWNLINK_STATUS message is recorded in messages.xml, item 1 isn't an issue. And because Link Combiner combines the links, item 2 isn't an issue. I've been running the messages app all the time with no problems. I've also tested multi-uav, logging and replay functionality without any issues.

Regarding the argument parsing, are you saying that we should keep it as argparse? I actually originally tried to implement optparse because I saw that's what was used elsewhere, but when I ran into troubles and looked up the documentation, the first thing it said was that optparse was deprecated and to use optparse instead: http://docs.python.org/2/library/optparse.html

On a similar note, for periodically sending the LINK_STATUS message from Link Combiner.py, I used threading.Timer instead of glib.Timeout. I tried to use glib.Timeout because I saw it used elsewhere, but I couldn't get it to work so used threading.Timer instead. I assume this is OK.

This is my first time using revision control software, so thanks for the advice regarding commit messages. I assume you don't want me to re-rebase.

One last thing: I'm still hoping someone can help me make the Link page appear in the notebook only when multiple links are used. E-mail me or the mailing list if you know how to do this.

Thanks.

@flixr
Copy link
Member

flixr commented May 14, 2013

I choose optparse at the time because even though it is deprecated it's still available in all python versions, but argparse is only availabe from 2.7 upwards.
Since we can now safely assume that python2.7 is installed on any recent supported debian/ubuntu it's fine to use argparse. (If someone really needs the redundant comms and is still using python2.6, argparse can be still be installed).
@gautierhattenberger might be able to help out regarding the Link page.
Gautier, feel free to merge it if you think it's ready... I'll be back in two weeks.

@gautierhattenberger
Copy link
Member

I'm really busy with a flight campaign these days, so I don't have much time testing your code.
Concerning compatibility, since only the DOWNLINK_STATUS message is modified, it should not be an issue since it is in fact generated by the ground and not parsed by the server.
For the Link info page, I actually find it really helpful even with a single link, since you don't need to open the messages tool to have the ping and data rate. So I'd rather keep it like that.
I will try to read again your modification to the system for any possible issues in "normal" mode, but I think I will merge this very soon.
Thanks again for your contribution.

gautierhattenberger added a commit that referenced this pull request May 17, 2013
@gautierhattenberger gautierhattenberger merged commit 31b35f1 into paparazzi:master May 17, 2013
@uaarg
Copy link
Author

uaarg commented May 18, 2013

Thanks for accepting.

Keep in mind that when used in "normal" mode (i.e. without the Link Combiner agent or the -redlink flag), the Link info page won't show any information. I'll just be there. If I get time, I'll look into adding information there even when the Link Combiner isn't running.

@gautierhattenberger
Copy link
Member

True. I have opened an issue for this #442

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

Successfully merging this pull request may close these issues.

4 participants