Skip to content

Commit

Permalink
fix: (hack) Ensure vizinterface knows about RWModels enum.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpad committed Nov 11, 2024
1 parent 0e3e6d5 commit ea71108
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/source/Support/bskReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 `vizInterface` was also
imported would return a Swig Object instead of an enumerated integer.


Version 2.5.0 (Sept. 30, 2024)
Expand Down
10 changes: 10 additions & 0 deletions src/simulation/vizard/vizInterface/vizInterface.i
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ namespace std {
%include "vizInterface.h"
%include "simulation/vizard/_GeneralModuleFiles/vizStructures.h"

// XXX: 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"
Expand Down

0 comments on commit ea71108

Please sign in to comment.