Importing Isaac Module into Python Codelet

Hope all is well. I am trying to implement a Python Codelet to process Detections2Proto Message inputs. Since I am Implementing the code in a local folder that is linked to the main Isaac SDK, I am not able to directly use ’ from isaac import * ', but rather ’

from external.com_nvidia_isaac_sdk.packages.pyalice import * ', which I am not sure if it loads everything required or not, since upon declaring the TX/RX edge with a specific Proto Type the following error is displayed:

(<class ‘AttributeError’>, AttributeError(“module ‘external.com_nvidia_isaac_sdk.packages.pyalice.Message’ has no attribute ‘load_message_definitions’”,), <traceback object at 0x7ff4926e8a48>)

Given that in the BUILD file:

@com_nvidia_isaac_sdk//packages/message_generators:libmessage_generators_module.so” is loaded

And in the JSON APP File:

@com_nvidia_isaac_sdk//packages/message_generators” is loaded

Any tips on this issue ?

Isaac SDK is an external to your local Bazel workspace if I understood correctly? There is an issue that is being addressed for the next release with Python proto availability in external workspaces: Registering Protos in Python Codelet. It is possible you are facing a similar issue here. Could you post a snippet of your BUILD, WORKSPACE, and app JSON files here, just to confirm?

1 Like

Thank you for your reply, I was once given a temp solution such that I hardcode the path of the .capnp definitions in the CapnpMessages.py file in the pyalice folder. Is there a programmatic way to properly fix this issue ?