test_MJSystemMassMatrix

test_MJSystemMassMatrix.hingedMassMatrix(hubMass, hubInertia, armMass, armInertia, armLength=0.6)[source]

Helper function to compute the expected mass matrix for a hub with a hinged arm when the hinge angle is zero.

test_MJSystemMassMatrix.sliderMassMatrix(hubMass, hubInertia, armMass, armInertia, armLength=0.6)[source]

Helper function to compute the expected mass matrix for a hub with a sliding arm when the slide position is zero.

test_MJSystemMassMatrix.test_MJSystemMassMatrix(modelName, xml, nSC, scStartIdx, jointTypes)[source]

Validation Test Description

This unit test sets up a spacecraft to determine its system mass matrix.

Test Parameters

The spacecraft geometry is varied between tests

Parameters:
  • modelName (str) – the model of the spacecraft for this parameterized unit test

  • xml (str) – the XML name for the spacecraft model

  • nSC (int) – the expected number of spacecraft in the model

  • scStartIdx (list) – the expected starting joint index for each spacecraft

  • jointTypes (list) – the expected joint types in the model

Description of Variables Being Tested

In this test we are checking the system mass matrix values and properties to ensure it is accurate