Python Bindings in Custom OpenSim Build
Posted: Wed Dec 11, 2024 6:15 pm
Hi OpenSim Team,
I have created some new classes in a custom build of OpenSim 4.5 which seem to be behaving nicely and working in C++ on my local build. I would like to try and include these new classes in the Python bindings as I'm keen to run some more detailed pipelines and analyses with these classes - and I'd be more comfortable doing this in Python vs. C++. I made a relatively lazy attempt to include the new classes in the Python bindings by adding them to the Bindings\OpenSimHeaders_simulation.h file and creating a basic test case - yet this failed when running the continuous-integration workflow on GitHub actions in trying to build this custom version of OpenSim (whereas it succeeded before I made these changes). I can see there are other files in the Bindings folder where classes are mentioned (e.g. simulation.i), so I am wondering whether there is a recommended approach for adding classes to these bindings or if it might not actually be feasible?
Aaron
I have created some new classes in a custom build of OpenSim 4.5 which seem to be behaving nicely and working in C++ on my local build. I would like to try and include these new classes in the Python bindings as I'm keen to run some more detailed pipelines and analyses with these classes - and I'd be more comfortable doing this in Python vs. C++. I made a relatively lazy attempt to include the new classes in the Python bindings by adding them to the Bindings\OpenSimHeaders_simulation.h file and creating a basic test case - yet this failed when running the continuous-integration workflow on GitHub actions in trying to build this custom version of OpenSim (whereas it succeeded before I made these changes). I can see there are other files in the Bindings folder where classes are mentioned (e.g. simulation.i), so I am wondering whether there is a recommended approach for adding classes to these bindings or if it might not actually be feasible?
Aaron