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

Failure injection using mavlink and systemcmd #15063

Merged
merged 39 commits into from Sep 16, 2020
Merged

Conversation

julianoes
Copy link
Contributor

@julianoes julianoes commented Jun 9, 2020

Work in progress to implement failure injection using MAVLink (mavlink/mavlink#1331) as well as a systemcmd.

Unlike the SIM_BLOCK_... param this can be generic to SITL, HITL, reality.

@julianoes julianoes requested review from dagar and mcsauder June 9, 2020 12:28
@julianoes
Copy link
Contributor Author

julianoes commented Jun 11, 2020

The tests fail here because mavlink/MAVSDK#1124 is not merged and released yet.

@swham86
Copy link

swham86 commented Jun 19, 2020

Are you guys still working on the failure injection? I think this feature is really cool.
I would like to point out some issues when I used this draft version by using SITL (jmavsim).

failure gyro off <-- it causes kernel panic
failure accel off <-- it causes kernel panic
failure battery off <-- not working
failure motor off <-- not working
failure rc_signal off <-- not working
failure mavlink_signal off <-- not working

I hope that the failure injection will be implemented soon! Thanks.

@julianoes
Copy link
Contributor Author

@swham86 thanks for the interest and feedback. Yes I'm working on this, I was just on holiday last week.

What do you mean with kernel panic? Does your Linux system actually panic? Stopping gyro or accel won't work properly yet because the lockstep simulation depends on it and without it, everything stops. And the others you listed are not implemented yet, but I'm going to add more functionality soon.

@swham86
Copy link

swham86 commented Jun 24, 2020

@julianoes The kernel panic means just stopping simulation. I hope that the failure injection will be implemented soon. Thanks for your feedback!

@julianoes
Copy link
Contributor Author

If anyone feels like reviewing, now would be the time. I plan to get this in as soon as possible. FYI @jkflying

@julianoes
Copy link
Contributor Author

@dagar I think we can attempt to merge this.

@dagar dagar merged commit 720784b into master Sep 16, 2020
@dagar dagar deleted the pr-failure-injection branch September 16, 2020 16:51
@MaEtUgR
Copy link
Member

MaEtUgR commented Oct 12, 2020

I just saw this invalidated some of the documentation (JFYI @hamishwillee):
https://dev.px4.io/master/en/simulation/index.html#simulating-failsafes-and-sensorhardware-failure
https://dev.px4.io/master/en/simulation/failsafes.html#gps-loss

@julianoes Would it be possible to quickly change the param pointers to the new failsafe injection way?

@hamishwillee
Copy link
Contributor

Thanks @MaEtUgR - any info on docs that need to be added here?

@MaEtUgR
Copy link
Member

MaEtUgR commented Oct 26, 2020

I knew how the old way worked not the new way with this pr. That's why I was even looking for the docs. I could take the effort and figure it out but if the people write it who have implemented it and already know, that would probably be much quicker and more accurate.

@hamishwillee
Copy link
Contributor

Thanks @MaEtUgR

@julianoes On you > Would it be possible to quickly change the param pointers to the new failsafe injection way?

@julianoes
Copy link
Contributor Author

@hamishwillee ignoring this right now, sorry.

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.

None yet

8 participants