SymbolicLinksVREP.sh
Go to the documentation of this file.
1 VREPDIR=$HOME/V-REP_PRO_EDU_V3_2_2_64_Linux # Set to Vrep directory
2 # VREPDIR=/Applications/V-REP_PRO_EDU_V3_2_2_Mac/vrep.app/Contents/MacOS # OSX
3 
4 GRLDIR=$HOME/grl
5 BUILDDIR=$GRLDIR/build
6 
7 LIBDIR=/lib # Change if using eclipse or OSX
8 # LIBDIR=/lib/Debug/ # OSX
9 
10 LIBEXT=.so
11 # LIBEXT=.dylib
12 
13 for arg in "libagast" "libv_repExtGrlInverseKinematics" "libcamodocal_brisk" "libcamodocal_calib" "libcamodocal_camera_models" "libcamodocal_camera_systems" "libcamodocal_chessboard" "libcamodocal_fivepoint" "libcamodocal_pugixml" "libcamodocal_DBoW2" "libcamodocal_gpl" "libcamodocal_sparse_graph" "libv_repExtHandEyeCalibration" "libv_repExtPivotCalibration" "libcamodocal_DUtilsCV" "libcamodocal_infrastr_calib" "libcamodocal_visual_odometry" "libfusionTrack64" "libv_repExtKukaLBRiiwa" "libcamodocal_DUtils" "libcamodocal_location_recognition" "libcamodocal_DVision" "libcamodocal_pose_estimation" "libceres" "libcamodocal_features2d" "libcamodocal_pose_graph" "libdevice64" "libv_repExtAtracsysFusionTrack"
14 do
15  ln -s $BUILDDIR/$LIBDIR/$arg$LIBEXT $VREPDIR
16 done
17 
18 ln -s $GRLDIR/src/lua/grl.lua $VREPDIR
19 
20 # vrep won't pick up the correct libraries if everything is built with linuxbrew
21 # so change the dynamic library path loaded by vrep
22 #
23 # TODO: This solution isn't perfect, it may pick up versions conflicting with those
24 # used to build vrep, resulting in mysterious crashes. Try to use the libraries
25 # in the same directory as vrep whenever possible.
26 if [ -d $HOME/.linuxbrew ] ; then
27  ln -s $HOME/.linuxbrew/lib $VREPDIR
28  patchelf --set-rpath '$ORIGIN:$ORIGIN/lib' $VREPDIR/vrep
29 fi