Hi,
I am trying to develop a stand-alone ROS node in simulink that utilizes the robotics toolbox matchScansGrid() function.
But as simulink coder does not support code generation for the matchScansGrid() function (or any of the lidarSLAM tools), I was proposed an alternate method to use the matchScansGrid() in simulink:
- Make a matlab function {eg testScanMatching() } that utilizes (or calls) the matchScansGrid().
- Generate C code of this function (testScanMatching) using Matlab coder. This is possible as matchScansGrid() is supported by matlab coder.
- Use the packNGo functionality
- Unzip the output of step 3.
- Use the legacy code to generate a compatible S-function (of testScanMatching)
- Import it in simulink
Question:
- Does this method work? Can I really use matchScansGrid() in simulink using this round-about way?
- Is there a guide to implement S-functions from matlab coder generated C/C++ code ?
Thanks in advance.
note: I am testing this method but currently I have trouble building an S function from the code generated of testScanMatching
Best Answer