gtrll / gpmp2

Gaussian Process Motion Planner 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

matlab issue

tcjcxy30 opened this issue · comments

hi JING DONG:
I install gtsam with change the cmakefile (enable GTSAM_INSTALL_MATLAB_TOOLBOX in CMake to build it), and install gpmp2 with this code
$ cmake -DGPMP2_BUILD_MATLAB_TOOLBOX:OPTION=ON -DGTSAM_TOOLBOX_INSTALL_PATH:PATH=/path/install/toolbox ..
$ make install
and add /path/install/toolbox to matlab at 'set path'

But i can't use matlab to run you matlab demo with the error:

Invalid MEX-file '/path/install/toolbox/gpmp2_wrapper.mexa64': libgpmp2.so: cannot open shared object
file: No such file or directory.

Error in gpmp2.PlanarSDF (line 21)
my_ptr = gpmp2_wrapper(64, varargin{1}, varargin{2}, varargin{3});

Error in PointRobot2DFactorGraphExample (line 21)
sdf = PlanarSDF(origin_point2, cell_size, field);

how can i do to fix it?

Hi where you install your gpmp2 .so file? Did you install to default /usr/local/lib? If so please try

  1. open a terminal
  2. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

  3. open matlab in THIS terminal
    If you change your install path just replace respectively. Let me know if this works or not.

dong jing :
Thank you for your answer so soon.
I have fixed this problem after i ran 'sudo ldconfig' in terminal.

Hi guys,
To be clear, for DGTSAM_TOOLBOX_INSTALL_PATH:PATH=/path/install/toolbox, is the /path/install/toolbox the path of GTSAM MATLAB toolbox?

Yes. Some of the GTSAM cmake variables are imported here to make things easy. It is less work to set up Matlab when we have the same location for both the GTSAM and GPMP2 toolboxes.