Add aerodynamic drag model for MuJoCo dynamics #1212
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a reusable aerodynamic drag model for MuJoCo-based dynamics and a dedicated geometry payload to describe cannonball drag parameters.
DragGeometryMsgPayload
DragGeometryMsgPayloadthat packages basic drag geometry:projectedArea[m^2] projected area in the flow direction.dragCoeff[-] nondimensional drag coefficient.r_CP_S[3][m] center of pressure position relative to the site frame origin, expressed in the site frame.AerodynamicDrag model
AerodynamicDragSysModelthat computes drag force and torque at a MuJoCo site.dragGeometryInMsg(DragGeometryMsgPayload) for geometry and coefficient.atmoDensInMsg(AtmoPropsMsgPayload) for local atmospheric density.referenceFrameStateInMsg(SCStatesMsgPayload) for the kinematics of the site reference frame.forceOutMsg(ForceAtSiteMsgPayload) drag force in the site frame.torqueOutMsg(TorqueAtSiteMsgPayload) drag torque in the site frame.r_CP_Sand the site velocity in the site frame to compute:F_S = -0.5 * rho * v^2 * C_D * A * v_hat_ST_S = r_CP_S × F_SResetif any required input message is not linked.Verification
Added two tests: one, simple verification that the drag equation is right. Second, a test that replicates a test for the existign drag dynamic effector on an Earth orbit.
Documentation
Updated release notes and all methods have extensive doxygen comments. A scenario using this new model will be added through #1195.
Future work
Potentially add lift and torque coefficients. Include scenario using this model.