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

MtbEffector causes issues when interacting with dynManager.setState #850

Open
atharris-work opened this issue Nov 15, 2024 · 1 comment
Open

Comments

@atharris-work
Copy link

Describe the bug
High level: Importing MtbEffector causes calls to dynManager.setState to fail, likely due to a missing %include "swig_eigen.i" line in MtbEffector.i. This occurs whenever MtbEffector is imported, regardless of whether the module itself is called (perhaps another bug).

Low level: Importing MtbEffector seems to override other BSK modules that implement the dynamics engine (dynManager, stateObject, etc). In addition, MtbEffector.i lacks the call to SWIG that results in Eigen functions/datatypes being properly wrapped, leading to errors when MtbEffector is imported into code.

To reproduce
Steps to reproduce the behavior:

  1. Add import MtbEffector to scenarioHohmann.py
  2. Run the scenario normally
  3. See error; described in additional detail in this discussion

Expected behavior

  • Manually setting states through the dynManager should work in sims that include MtbEffectors
  • Importing a module that isn't used shouldn't break other modules.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • BSK Version: Develop on 11/8, commit a413b11
  • Python version: 3.10.12

Additional context

  • Adding %include "swig_eigen.i" to MtbEffector.i` resolves this issue.
  • Someone should look into why the dynamics engine is re-swigged for every individual effector/dynamics related class, and whether this is necessary (lower priority).
@schaubh
Copy link
Contributor

schaubh commented Nov 22, 2024

Mm, interesting. Wasn't aware of this behavior. Thanks for sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants