Skip to content

Conversation

@DavilaDawg
Copy link

@DavilaDawg DavilaDawg commented Nov 2, 2025

Description

That adds support for 1DOF Hinged Rigid Body State Effector to be the parent for Dynamic Effectors

Verification

Used hinged rigid body state effector properties to calculate the angular momentum and delta v and compared it to the modified equations of motion output angular momentum and delta v in test_effectorBranching_integrated.py and plots them against each other to verify dynamics. Additionally, a scenario with 5 different spacecraft was written and compared plotted dynamics variables to intuitive values and behaviors. One spacecraft exhibited natural dynamics. Two were enacted on by external force and an additional two were enacted on by external torque. The force and torque were located on the hub and on the hinged rigid body state effector for each.

Documentation

Added a note to docs/source/Support/bskReleaseNotes.rst. Changed the yellow cells associated with 1DOF HRB to green in bskPrinciples-11.rst. Occasional lines of RST documentation embedded throughout certain scripts using //!< in header file variable definitions, or /*! */ just before method definitions in cpp files. These show up in pages like https://avslab.github.io/basilisk/Documentation/simulation/dynamics/HingedRigidBodies/hingedRigidBodyStateEffector.html at the end of the file after the documentation generated by the standalone .rst file.

Future work

2DOF HRB and NDOF HRB augmented to support dynamic effectors.

@DavilaDawg DavilaDawg requested a review from a team as a code owner November 2, 2025 22:35
@DavilaDawg DavilaDawg added the enhancement New feature or request label Nov 2, 2025
@andrewmorell andrewmorell force-pushed the feature/hinged-branching2 branch from cb08784 to 283fab3 Compare November 5, 2025 16:20
@andrewmorell andrewmorell moved this to 👀 In review in Basilisk Nov 5, 2025
@andrewmorell andrewmorell force-pushed the feature/hinged-branching2 branch from 283fab3 to 688c16e Compare November 5, 2025 19:54
@DavilaDawg DavilaDawg force-pushed the feature/hinged-branching2 branch from 19970f5 to 39d28ed Compare November 6, 2025 23:10
@andrewmorell andrewmorell force-pushed the feature/hinged-branching2 branch from 39d28ed to 263c40e Compare November 7, 2025 17:20
@schaubh schaubh changed the title Feature/hinged branching 1DOF Support 1DOF hingedPanel branching with dynamic effectors Nov 9, 2025
Copy link
Contributor

@schaubh schaubh left a comment

Choose a reason for hiding this comment

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

Nice work. Some small things to address with my comments.
The integrated test, however, is regularly failing on my computer.

Eigen::Matrix3d ISPrimePntS_P; //!< [kg-m^2/s] time body derivative IPntS in body frame components
Eigen::Vector3d omegaLoc_PN_P; //!< [rad/s] local copy of omegaBN
Eigen::Vector3d omega_BN_B{0.0, 0.0, 0.0}; //!< Hub/Inertial angular velocity vector in B frame components
Eigen::MRPd sigma_BN{0.0, 0.0, 0.0}; //!< Hub/Inertial attitude represented by MRP
Copy link
Contributor

Choose a reason for hiding this comment

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

MRP is not a vector quantity. Should be moved to next section listing matrices, including the DCMs.


%include "architecture/utilities/bskException.swg"
%default_bsk_exception();
%feature("python:kwargs") HingedRigidBodyStateEffector::addDynamicEffector;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed? This method is defined in the *.h file already and will thus get swig'd?

{
// - Compute the force and torque contributions from the dynamicEffectors
(*dynIt)->computeForceTorque(integTime, double(0.0));
attBodyForce_S += (*dynIt)->forceExternal_B;
Copy link
Contributor

Choose a reason for hiding this comment

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

add a comment here why S and B frames are the same.

r_ScN_N_log = np.zeros_like(inertialPropLog.r_BN_N)
for i in range(len(inertialPropLog.sigma_BN)):
q_i = inertialPropLog.sigma_BN[i, :] # MRP at timestep i
dcm_NP = np.transpose(rbk.MRP2C(q_i))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the P and B frame the same here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

4 participants