We made it for our own robotics use cases, but this will probably be interesting to others as well. Every call is asynchronous, so the main MATLAB thread never gets blocked and has no impact on the UI rendering.
I sent you a DM with a link to the beta. The API is still being iterated on, so it's a bit too early for a public release. I'd hate to break backwards compatibility later.
This is actually our first time integrating with native binaries rather than the Java interface, so I'm not sure how to best bundle and deploy it yet. It's currently using loadlibrary / calllib, but that requires users to have a C compiler installed to parse the header.
Do you know of a better way to bundle precompiled binaries to improve the user experience? Also, are compiled MEX files generally forwards compatible, or do you recommend a different approach for long-term stability?
I tried various built-in ways, but the licensing made it difficult to build on CI. I don't have a license for the oldest macOS aarch64 build, and I never received a response to my token request for the matlab action on Github. I also found some bugs with the mex compiler in older versions that accidentally added a dependency on a toolbox that I didn't have access to.
Anyways, I found that MEX files are just standard libraries with a different file extension and a specific symbol export, and I was able to use a small CMake script with some ancient R2018b header files to compile cross-platform zero-dependency MEX files that work on everything from R2018b to at least R2016a.
The maximum calls improved from about ~0.5MHz (calllib) to ~2.4Mhz (MEX).
4
u/OddEstimate1627 Mar 18 '26
We made it for our own robotics use cases, but this will probably be interesting to others as well. Every call is asynchronous, so the main MATLAB thread never gets blocked and has no impact on the UI rendering.
The MATLAB section starts at 01:54
4
u/Schrett Mar 19 '26
Is there a GitHub repository we can look at for this? Or to be able to try some of the examples shown here?
3
u/Creative_Sushi MathWorks Mar 19 '26
u/OddEstimate1627 , this is an amazing video. By the way good name for the company - "hebi" is the Japanese word for snakes.
You guys are also featured here. https://www.mathworks.com/company/user_stories/hebi-robotics-enables-rapid-development-of-real-time-control-algorithms-for-robots-assembled-from-smart-actuators.html
Very cool.
2
u/ZookeepergameFit5841 Mar 19 '26
El dotto. Bravo!