diff --git a/docs/source/Support/bskReleaseNotes.rst b/docs/source/Support/bskReleaseNotes.rst index 4c4c9403af..f358ae7251 100644 --- a/docs/source/Support/bskReleaseNotes.rst +++ b/docs/source/Support/bskReleaseNotes.rst @@ -54,6 +54,8 @@ Version |release| - Created unit tests for protobuffer packing and saving in :ref:`vizInterface` - Added YouTube video links of Vizard illustrating the :ref:`scenarioFlexiblePanel` and :ref:`scenarioRoboticArm` scenarios. +- Fixed issue in which reading ``RWModel`` from RW message payloads when :ref:`vizInterface` was also + imported would return a Swig Object instead of an enumerated integer. Version 2.5.0 (Sept. 30, 2024) diff --git a/src/simulation/vizard/vizInterface/vizInterface.i b/src/simulation/vizard/vizInterface/vizInterface.i index 87e8d7d38e..3a51658f6a 100755 --- a/src/simulation/vizard/vizInterface/vizInterface.i +++ b/src/simulation/vizard/vizInterface/vizInterface.i @@ -59,6 +59,16 @@ namespace std { %include "vizInterface.h" %include "simulation/vizard/_GeneralModuleFiles/vizStructures.h" +// Dan Padilha: Include the reactionWheelSupport to ensure that SWIG knows about the +// RWModels enum, and can correctly interpret it as an integer and destroy it +// without leaking memory. This needs to be imported here because of the way +// that Basilisk is built, which causes copies of types to be scattered across +// different modules. This means that instead of a model using the correct +// message type of `Basilisk.architecture.messaging.RWConfigLogMsgPayload`, they +// use `Basilisk.simulation.vizInterface.RWConfigLogMsgPayload` instead... :( +// TODO: We should clean up the SWIG build system so such issues don't occur. +%include "simulation/dynamics/reactionWheels/reactionWheelSupport.h" + %include "architecture/msgPayloadDefC/CameraConfigMsgPayload.h" struct CameraConfigMsg_C; %include "architecture/msgPayloadDefC/RWConfigLogMsgPayload.h"