Skip to content

Adds goto test. - #199

Merged
mrpollo merged 5 commits into
masterfrom
tcr-gototest
Jul 21, 2015
Merged

mrpollo merged 5 commits into
masterfrom
tcr-gototest

Conversation

@tcr3dr

@tcr3dr tcr3dr commented Jul 14, 2015

Copy link
Copy Markdown
Contributor

Copied from vehicle_goto

Issue: timeout added to delay. I think this is because of requirements waiting

Also: rebased over #197

@tcr3dr
tcr3dr force-pushed the tcr-gototest branch 7 times, most recently from 56eacfc to d1a8c29 Compare July 14, 2015 20:26
@tcr3dr

tcr3dr commented Jul 14, 2015

Copy link
Copy Markdown
Contributor Author

The test here is pretty grim. On a significantly slow platform (free tier of Appveyor) we inadvertently expose the lack of resilience of DKPY code: https://ci.appveyor.com/project/3drobotics/dronekit-python/build/1.0.116

link 1 OK
heartbeat OK
GUIDED> Mode GUIDED
APM: Initialising APM...
Got MAVLink msg: COMMAND_ACK {command : 400, result : 0}
 Waiting for arming 36 seconds...
GPS fix lost
 ublox GPS OK
ARMED
APM: DISARMING MOTORS
DISARMED
 Waiting for arming 35 seconds...
 Waiting for arming 34 seconds...
 Waiting for arming 33 seconds...
 Waiting for arming 32 seconds...
 Waiting for arming 31 seconds...
 Waiting for arming 30 seconds...
 Waiting for arming 29 seconds...
 Waiting for arming 28 seconds...
 Waiting for arming 27 seconds...
 Waiting for arming 26 seconds...
 Waiting for arming 25 seconds...
 Waiting for arming 24 seconds...
 Waiting for arming 23 seconds...

Arming and immediately disarming the motors can get us into an infinite loop without additional safeguards. I'm concerned these sort of examples are all over the codebase. I'll be adding log dumping to the CI builds so I can see what is triggering this particular issue.

@mrpollo

mrpollo commented Jul 14, 2015

Copy link
Copy Markdown
Member

yes logs should be there, great way to tell what happened, and as a plus since you are running mavproxy you can also get jpegs of plots if you wanted to say debug a failure by plotting

@hamishwillee

Copy link
Copy Markdown
Contributor

@tcr3dr

Arming and immediately disarming the motors can get us into an infinite loop without additional safeguards. I'm concerned these sort of examples are all over the codebase.

Are you proposing that the vehicle_goto.py example needs to change? If so, how? I'm not a fan of timeouts - but I was hoping to do additional checks when #156 is merged.

Taking off in this example can similarly can get "stuck" if for any reason the vehicle is unable to rise (it is possible to have SITL in such a state where this can happen).

@tcr3dr

tcr3dr commented Jul 15, 2015

Copy link
Copy Markdown
Contributor Author

@hamishwillee No proposal to change the example should come from this. Just pointing out a pedantic issue exposed by the test setup that should be addressed in a general way.

I don't expect to test the examples as-is before additional modifications like #156. These tests should remain for now separate (hopefully supersets) of the code we recommend.

@tcr3dr
tcr3dr force-pushed the tcr-gototest branch 19 times, most recently from b16385d to 79a5a1d Compare July 15, 2015 21:46
@tcr3dr tcr3dr changed the title [WIP] Adds goto test. Adds goto test. Jul 15, 2015
@tcr3dr

tcr3dr commented Jul 15, 2015

Copy link
Copy Markdown
Contributor Author

The changes made to the SITL tests to add higher affinity on Windows and also use simulation speedups now result in success ~80% of the time on Windows. Since tests can always be re-run, and nothing will be merged into master if it is not green, I think this is as good as it will get for the moment.

In a future issue/PR, I'll be investigating how to make these tests more general (local testing) and perform more consistently on Appveyor. Right now this is lower priority thank making sure we have a working testing process.

@tcr3dr

tcr3dr commented Jul 16, 2015

Copy link
Copy Markdown
Contributor Author

Update: I'm going to make this test slightly more general. Hold off on merging.

@tcr3dr

tcr3dr commented Jul 16, 2015

Copy link
Copy Markdown
Contributor Author

@mrpollo This is good to review again. Made more general and avoids random Appveyor failures with a tunable retry parameter.

@tcr3dr tcr3dr added this to the v1.3.2 milestone Jul 16, 2015
@mrpollo

mrpollo commented Jul 21, 2015

Copy link
Copy Markdown
Member

lgtm 👍

mrpollo added a commit that referenced this pull request Jul 21, 2015
@mrpollo
mrpollo merged commit 2f61adc into master Jul 21, 2015
@mrpollo
mrpollo deleted the tcr-gototest branch July 21, 2015 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants