MATLAB readme update
parent
9bdcd2caa7
commit
ff9dc99ddf
|
@ -4,16 +4,16 @@ http://borg.cc.gatech.edu/projects/gtsam
|
||||||
|
|
||||||
This is the GTSAM MATLAB toolbox, a MATLAB wrapper around the GTSAM C++ library. To build it, enable `GTSAM_INSTALL_MATLAB_TOOLBOX=ON` in CMake.
|
This is the GTSAM MATLAB toolbox, a MATLAB wrapper around the GTSAM C++ library. To build it, enable `GTSAM_INSTALL_MATLAB_TOOLBOX=ON` in CMake.
|
||||||
|
|
||||||
The interface to the toolbox is generated automatically by the wrap
|
The interface to the toolbox is generated automatically by the wrap tool which directly parses C++ header files.
|
||||||
tool which directly parses C++ header files. The tool generates matlab proxy objects together with all the native functions for wrapping and unwrapping scalar and non scalar types and objects. The interface generated by the wrap tool also redirects the standard output stream (cout) to matlab's console.
|
The tool generates matlab proxy objects together with all the native functions for wrapping and unwrapping scalar and non scalar types and objects.
|
||||||
|
The interface generated by the wrap tool also redirects the standard output stream (cout) to matlab's console.
|
||||||
|
|
||||||
## Ubuntu
|
## Ubuntu
|
||||||
|
|
||||||
If you have a newer Ubuntu system (later than 10.04), you must make a small modification to your MATLAB installation, due to MATLAB being distributed with an old version of the C++ standard library. Delete or rename all files starting with `libstdc++` in your MATLAB installation directory, in paths:
|
If you have a newer Ubuntu system (later than 10.04), you must make a small modification to your MATLAB installation, due to MATLAB being distributed with an old version of the C++ standard library. Delete or rename all files starting with `libstdc++` in your MATLAB installation directory, in paths:
|
||||||
|
|
||||||
/usr/local/MATLAB/[version]/sys/os/[system]/
|
|
||||||
/usr/local/MATLAB/[version]/bin/[system]/
|
|
||||||
|
|
||||||
|
/usr/local/MATLAB/[version]/sys/os/[system]/
|
||||||
|
/usr/local/MATLAB/[version]/bin/[system]/
|
||||||
|
|
||||||
## Adding the toolbox to your MATLAB path
|
## Adding the toolbox to your MATLAB path
|
||||||
|
|
||||||
|
@ -37,25 +37,28 @@ export LD_LIBRARY_PATH=<install-path>/gtsam:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
### Linker issues
|
### Linker issues
|
||||||
|
|
||||||
If you compile the MATLAB toolbox and everything compiles smoothly, but when you run any MATLAB script, you get following error messages in MATLAB
|
If you compile the MATLAB toolbox and everything compiles smoothly, but when you run any MATLAB script, you get any of the following error messages in MATLAB
|
||||||
|
|
||||||
```
|
```
|
||||||
Invalid MEX-file '/usr/local/gtsam_toolbox/gtsam_wrapper.mexa64':
|
Invalid MEX-file '/usr/local/gtsam_toolbox/gtsam_wrapper.mexa64':
|
||||||
Missing symbol 'mexAtExit' required by '/usr/local/gtsam_toolbox/gtsam_wrapper.mexa64'
|
Missing symbol 'mexAtExit' required by '/usr/local/gtsam_toolbox/gtsam_wrapper.mexa64'
|
||||||
Missing symbol 'mexCallMATLABWithObject' required by '/usr/local/gtsam_toolbox/gtsam_wrapper.mexa64'
|
Missing symbol 'mexCallMATLABWithObject' required by '/usr/local/gtsam_toolbox/gtsam_wrapper.mexa64'
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
run following shell line
|
run following shell line
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
|
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
|
||||||
```
|
```
|
||||||
before you run MATLAB from the same shell.
|
|
||||||
|
before you run MATLAB from the same shell.
|
||||||
|
|
||||||
This mainly happens if you have GCC >= 5 and newer version MATLAB like R2017a.
|
This mainly happens if you have GCC >= 5 and newer version MATLAB like R2017a.
|
||||||
|
|
||||||
|
|
||||||
## Trying out the examples
|
## Trying out the examples
|
||||||
|
|
||||||
The examples are located in the 'gtsam_examples' subfolder. You may either run them individually at the MATLAB command line, or open the GTSAM example GUI by running 'gtsamExamples'. Example:
|
The examples are located in the 'gtsam_examples' subfolder. You may either run them individually at the MATLAB command line, or open the GTSAM example GUI by running 'gtsamExamples'. Example:
|
||||||
|
|
||||||
```matlab
|
```matlab
|
||||||
>> cd /Users/yourname/toolbox % Change to wherever you installed the toolbox
|
>> cd /Users/yourname/toolbox % Change to wherever you installed the toolbox
|
||||||
|
@ -65,7 +68,7 @@ The examples are located in the 'gtsam_examples' subfolder. You may either run
|
||||||
|
|
||||||
## Running the unit tests
|
## Running the unit tests
|
||||||
|
|
||||||
The GTSAM MATLAB toolbox also has a small set of unit tests located in the gtsam_tests directory. Example:
|
The GTSAM MATLAB toolbox also has a small set of unit tests located in the gtsam_tests directory. Example:
|
||||||
|
|
||||||
```matlab
|
```matlab
|
||||||
>> cd /Users/yourname/toolbox % Change to wherever you installed the toolbox
|
>> cd /Users/yourname/toolbox % Change to wherever you installed the toolbox
|
||||||
|
@ -86,4 +89,4 @@ Tests complete!
|
||||||
|
|
||||||
## Writing your own code
|
## Writing your own code
|
||||||
|
|
||||||
Coding for the GTSAM MATLAB toolbox is straightforward and very fast once you understand a few basic concepts! Please see the manual to get started.
|
Coding for the GTSAM MATLAB toolbox is straightforward and very fast once you understand a few basic concepts! Please see the manual to get started.
|
||||||
|
|
Loading…
Reference in New Issue