Skip to content

Possible Wrapper Issue with MATLAB Toolbox #950

Closed
@mattking-smith

Description

Description

I recently installed a fresh 20.04 Ubuntu OS on a new computer to test GTSAM + MATLAB toolbox. After following available documentation it appeared that I successfully wrapped GTSAM into the MATLAB environment, noting that the MATLAB toolbox folder was created in the correct file path destination and there was a MATLAB MEX file in the appropriate location. However, I am unable to run any GTSAM code in MATLAB (including the basic unit tests) due to the wrapper being unable to find the functions. The errors I am currently experiencing are not listed under the MATLAB wrapper documentation.

Steps to reproduce

  1. Build GTSAM from source, clone or download the latest release from the GTSAM Github repo. Then follow the build & install instructions posted on GTSAM build page.
  2. To flag the MATLAB toolbox, before the build process, in the terminal, run the command

cmake -DGTSAM_TOOLBOX_INSTALL_PATH:PATH= $HOME/toolbox ..

A successfully flagged MATLAB toolbox enabled cmake appears as:

image
Noting that MATLAB root and MEX binary paths have been located.
3. Run the command make install
4. Follow the step given in the MATLAB Wrapper documentation.
5. In the MATLAB environment attempt the following:

cd /Users/yourname/toolbox % Change to wherever you installed the toolbox
cd gtsam_examples % Change to the examples directory
gtsamExamples % Run the GTSAM examples GUI

Expected behavior

Expected to see the following messages in the command window of the MATLAB environment:

Starting: testJacobianFactor
Starting: testKalmanFilter
Starting: testLocalizationExample
Starting: testOdometryExample
Starting: testPlanarSLAMExample
Starting: testPose2SLAMExample
Starting: testPose3SLAMExample
Starting: testSFMExample
Starting: testStereoVOExample
Starting: testVisualISAMExample
Tests complete!

Observed behavior

The output of the MATLAB command window:

>> testCal3Unified
Unrecognized function or variable 'Cal3Unified'.

Environment

MATLAB version: 2021a
Linux OS: Ubuntu 20.04
Standard GTSAM + MATLAB Toolbox build.

Additional information

Metadata

Assignees

No one assigned

    Labels

    bugBug reporthigh-priorityNeed this done quicklymatlabRelated to MATLAB wrapperwrapperRelated to the wrapper

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions