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

example: added example for multiple drones #675

Merged
merged 5 commits into from
Feb 20, 2019

Conversation

julianoes
Copy link
Collaborator

This adds the example started by Shayaan Haider and shared via Slack.
The current state doesn't seem to be functional just yet, only one of
two drones responds.

@julianoes
Copy link
Collaborator Author

Presumably this needs some work/refactoring in the connection layer. Right now all messages are sent to all links.

@julianoes
Copy link
Collaborator Author

Ok, refactoring done. This now works for me.

@julianoes julianoes marked this pull request as ready for review February 19, 2019 14:16
<< "Connection error: " << connection_result_str(connection_result)
<< NORMAL_CONSOLE_TEXT << std::endl;
;
return 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if any of the port is already busy, the example exits ? Lets say I am controlling 3 drones, and 1 of them is QGC port! So, can't I just continue with those two of them ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thanks. That can be improved!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd leave it like that because it's really something unexpected and it will make it harder to debug why things are not working after that.

for (int i = 1; i < argc; ++i) {
ConnectionResult connection_result = dc.add_any_connection(argv[i]);
if (connection_result != ConnectionResult::SUCCESS) {
std::cout << ERROR_CONSOLE_TEXT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its better std::cerr for error messages, so that one may filter out errors only, while debugging.

Copy link
Contributor

@shakthi-prashanth-m shakthi-prashanth-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a useful example!

@julianoes
Copy link
Collaborator Author

Thanks for the review @shakthi-prashanth-m !

@julianoes
Copy link
Collaborator Author

Coveralls.io API status was orange, so let's hope it's just that.

@JonasVautherin
Copy link
Collaborator

Still seems to fail because of coveralls...

This adds the example started by Shayaan Haider and shared via Slack.
The current state doesn't seem to be functional just yet, only one of
two drones responds.
This keeps track of which system ID is behind which remote UDP port.
This enables several drones to connect to one UDP sink and the SDK to
talk back.
@JonasVautherin JonasVautherin merged commit 4e8882d into develop Feb 20, 2019
@JonasVautherin JonasVautherin deleted the add-example-multiple-vehicles branch February 20, 2019 20:43
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.

None yet

3 participants