Hi,
It's very dumb and not such important, but I want to know what and why.
I run V-REP by command: $ ./vrep.sh since this is how I should run this program in Linux. After program starts I attach the program's icon to the launch bar (as I always do in Ubuntu) and then I exit program. And if I want to run this prgram again somehow i cant launch it form my launch bar. Instead I have to launch it again with the ./vrep.sh command.
Someone can explain what I am missing here?
Thanks
[dumbQuestion] launching v-rep from launchr bar in Ubuntu
Re: [dumbQuestion] launching v-rep from launchr bar in Ubunt
Hello,
you can try to use following bash script to start V-REP via double-click:
For some strange reason it will only succeed if the ROS plugin is not loaded (i.e. you will have to rename libv_repExtRos.so to _libv_repExtRos.so for instance).
Cheers
you can try to use following bash script to start V-REP via double-click:
Code: Select all
#!/bin/bash
pushd . > /dev/null
SCRIPT_PATH="${BASH_SOURCE[0]}";
while ([ -h "${SCRIPT_PATH}" ]); do
cd "`dirname "${SCRIPT_PATH}"`"
SCRIPT_PATH="$(readlink "`basename "${SCRIPT_PATH}"`")";
done
cd "`dirname "${SCRIPT_PATH}"`" > /dev/null
sh vrep.sh
popd > /dev/null
Cheers
Re: [dumbQuestion] launching v-rep from launchr bar in Ubunt
The problem is that the unity launcher will not spawn a login shell, so it will not source your .bashrc (which is the shell initialization file where you usually load ros stuff, like sourcing /opt/ros/DISTRO/setup.bash).
Since I need ROS, as a workaround for this, I created a launcher (put this in vrep directory, or change the line determining the vrep installation dir VREP_ROOT), that loads ROS before starting vrep:
it is a bit redundant, because you have to replicate your ROS shell setup both in .bashrc and in vrep-ros-launcher.sh (bash -l doesn't work either).
for more complex ROS shell setups, consider putting yours in ~/.rosrc and adding 'source ~/.rosrc' to both .bashrc and your vrep launcher.
Since I need ROS, as a workaround for this, I created a launcher (put this in vrep directory, or change the line determining the vrep installation dir VREP_ROOT), that loads ROS before starting vrep:
Code: Select all
#!/bin/bash
. /opt/ros/indigo/setup.bash
. ~/my-ros-ws/devel/setup.bash
VREP_ROOT="$(dirname "$0")"
cd "$VREP_ROOT"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$VREP_ROOT"
./vrep "$@"
for more complex ROS shell setups, consider putting yours in ~/.rosrc and adding 'source ~/.rosrc' to both .bashrc and your vrep launcher.
Re: [dumbQuestion] launching v-rep from launchr bar in Ubunt
Thank you, that's very useful!
Cheers
Cheers