gtrll / gpmp2

Gaussian Process Motion Planner 2
Other
312 stars 98 forks source link

matlab issue #6

Closed tcjcxy30 closed 7 years ago

tcjcxy30 commented 7 years ago

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?

dongjing3309 commented 7 years ago

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.
tcjcxy30 commented 7 years ago

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

JiatianWu commented 6 years ago

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?

mhmukadam commented 6 years ago

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.