Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: (hack) Ensure vizinterface knows about RWModels enum. #845

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 :ref:`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"

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