-
Notifications
You must be signed in to change notification settings - Fork 20.2k
autotest: add a WaitAndMaintainAttitude method #31969
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
autotest: add a WaitAndMaintainAttitude method #31969
Conversation
Tools/autotest/arducopter.py
Outdated
| self.arm_vehicle() | ||
| self.wait_disarmed() | ||
|
|
||
| def WaitAndMaintainAttitude(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the test name to not exactly match the test class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Fixed.
4cb1307 to
8a25c29
Compare
Tools/autotest/vehicle_test_suite.py
Outdated
| if self.desroll is not None: | ||
| axis_progress.append(f"r={achieved_roll:.03} des-r={self.desroll}") | ||
|
|
||
| if self.despitch is not None: | ||
| axis_progress.append(f"p={achieved_pitch:.3} des-p={self.despitch}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These format specifiers don't make a lot of sense. They will convert the values to scientific notation above 100 degrees. Which is admittedly unlikely. In any case they should be the same on both axes!
Also unsure if it's worth abbreviating the axes, they are not abbreviated in the start text. But I don't mind either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
AT-0004.0: Waiting for roll=0 and pitch=0
AT-0004.0: r= -19.345 des-r=0 p= -17.824 des-p=0
AT-0004.0: r= 8.664 des-r=0 p= 9.096 des-p=0
AT-0004.1: r= 12.462 des-r=0 p= 11.692 des-p=0
AT-0004.1: r= 1.952 des-r=0 p= 1.725 des-p=0
.... so we can have minimum_duration which wait_attitude does not
8a25c29 to
87f640e
Compare
tpwrules
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, test passes and log makes sense.
.... so we can have minimum_duration which wait_attitude does not