AttributeError: 'SwigPyObject' object has no attribute 'recorder' #381
Closed
GorgiAstro
started this conversation in
General
Replies: 1 comment
-
Sorry about it, after many trying many things and re-running the The last thing I tried was to install the package |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello folks,
I have trouble using a custom C++ message definition in my basilisk simulation. I created the following C++ message definition called
QuatMsgPayload.h
(it is using a C-style array for now but it will contain C++ structures in the future):I placed this message definition in the subfolder
msgPayloadDefCpp
of my custom BSK folder following the naming conventions from here http://hanspeterschaub.info/basilisk/Install/buildExtModules.htmlI then created a simple C++ module which just converts MRP to quaternions.
Mrp2Quaternion.h
:Mrp2Quaternion.cpp
:Mrp2Quaternion.i
:I then ran
conan
again:python3 conanfile.py --pathToExternalModules ../tubix20-lib/adcs/basilisk/
Then in Python, I instantiate the module and create a recorder:
But trying to create a recorder on this output message brings the following error message:
It seems that my custom message definition is not recognized correctly in Python, but I can't find out why.
I tried with both Basilisk 2.1.6 and 2.2.0, using Python 3.9.12 on Ubuntu 22.10.
I also tried to place this message definition in the
basilisk/src/architecture/msgPayloadDefCpp/
folder, in this case I had to adapt the include path inMrp2Quaternion.i
andMrp2Quaternion.h
from%include "msgPayloadDefCpp/QuatMsgPayload.h"
to%include "architecture/msgPayloadDefCpp/QuatMsgPayload.h"
. I then ran conan again with the clean flag, and in this case it worked. So my issue seems to lie with message definitions in my external folder.Cheers
Clément
Beta Was this translation helpful? Give feedback.
All reactions