Hello everyone,
I'm having a hard time understanding the 'TypeError: Could not convert that TypeAMsgPayload into a pointer for some reason. This is an ugly SWIG failur Good luck' error message, where 'TypeAMsgPayload' is a custom message payload defined outside of the original basilisk folder.
Assume that TypeBMsgPayload is defined as a custom msg payload enclosing an array of msg payloads:
typedef struct {
TypeAMsgPayload nestedPayloadList[10]
}
In python, creating an instance of TypeBMsgPayload and trying to set its nestedPayloadList member in the most natural way (e.g) 'instanceOfPayloadB.nestedPayloadList = listOfInstancesOfPayloadA ' sometimes fails with the above 'this is an ugly SWIG failure'.
Here, I'm saying 'sometimes' because I am honestly not sure I understand the array_functions() , ARRAYASLIST and STRUCTASLIST and how the should (or should not be) leveraged with custom nested payloads, and because I have encountered situations where this seemed to work just fine. But I can't honestly say that I have a deterministic understanding of what's going on.
Could the Basilisk developers shed some light on this and how to proceed with custom nested payloads ? A minimal working example would be immensely helpful.
Also, it is possible to work with custom nested payloads without changing any of the files in basilisk/src/architecture ?
Thanks,
Ben