Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SWIG-MATLAB work for Octave #67

Closed
6 tasks done
jaeandersson opened this issue Jun 13, 2016 · 4 comments
Closed
6 tasks done

Make SWIG-MATLAB work for Octave #67

jaeandersson opened this issue Jun 13, 2016 · 4 comments

Comments

@jaeandersson
Copy link
Owner

jaeandersson commented Jun 13, 2016

Octave has support for most of the features used by the MATLAB SWIG module: mex, classdef etc. It should (in principle at least) be possible to make the generated SWIG-MATLAB modules compilable for both Octave and MATLAB. This would be an attractive alternative to using SWIG's Octave module in many cases.

Issues encountered:

  • .cxx ending not recognised by mkoctfile
  • stdio.h missing (needed by vsnprintf)
  • CallMATLABWithTrap missing
  • mxSetProperty, mxGetProperty missing
  • ne not defined for handle objects
  • import module.* is not supported by Octave
@jaeandersson
Copy link
Owner Author

Pushed to the "matlab" branch. Note that this adds one MATLAB file: SwigGet.m. You'd need to distribute this file for the updated module to work. But then it should work for both MATLAB and Octave.

@jaeandersson
Copy link
Owner Author

Alerted octave devs about the fact that mkoctfile doesn't recognize ".cxx" suffix: https://savannah.gnu.org/bugs/index.php?48381. Can't do much more than that.

jaeandersson added a commit that referenced this issue Jul 3, 2016
Not supported in Octave and bad style in Matlab
@jaeandersson
Copy link
Owner Author

Octave issue fixed: ".cxx" will be recognized by mkoctfile in Octave 4.2.

jaeandersson added a commit that referenced this issue Jul 7, 2016
jaeandersson added a commit that referenced this issue Jul 7, 2016
jaeandersson added a commit that referenced this issue Jul 7, 2016
jaeandersson added a commit that referenced this issue Jul 7, 2016
jaeandersson added a commit that referenced this issue Jul 7, 2016
jaeandersson added a commit that referenced this issue Jul 7, 2016
@jaeandersson
Copy link
Owner Author

Build system now bilingual: Set the "--enable-octave-for-matab" configure option to use Octave instead of MATLAB for the testing (the generated code code is always bilingual). One unit test fails for Octave: #69.

kjyv pushed a commit to robotology/idyntree that referenced this issue Jul 14, 2016
* master: (40 commits)
  Update README.md
  [bindings] update matlab bindings
  Updataed SixAxisFTOffsetEstimatiom matlab examples
  [estimation] Add addNewUnknownFullWrenchInFrameOrigin to LinkUnknownWrenchContacts
  [tools] Added --print (-p) option to idyntree-model-info
  Added option in urdf parser to threat sensor frames as additional frames
  [estimation] Exposed momentum derivative information in estimator and added test
  Expose estiamtion of net wrench acting on a link in ExtWrenchesAndJointTorquesEstimator class
  Update model_loading.md
  Create model_loading.md
  [cmake] Set default value of IDYNTREE_DOXYGEN_VERBOSE to OFF
  Update faqs.md
  Update GetJointAxesInWorldFrame.m
  [matlab] Regenerate bindings
  [matlab] Install new file SwigGet.m introduced in jaeandersson/swig#67 (comment)
  Update README.md
  [matlab] Updated wrapping of joints in Bindings In particular, add helper methods in IJoint interface to overcome the lack of dynamic_cast-like operator in scripting languages.
  Working toward exposing revolute joints method in bindigs
  Fixed angular velocity projection to sensor frame in predictMeasurements
  Fixed angularAccelerationTest in PredictSensorsMeasurementsUnitTest
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant