Commit 4835a9fa authored by Ibrahim Ahmed's avatar Ibrahim Ahmed
Browse files

changed setup.sh so custom paths to gazebo plugin and models can be used

parent 96f93950
......@@ -20,10 +20,25 @@
git clone https://github.com/osrf/gazebo_models ~/src/
```
Set 2 environment variables (in `.bashrc`):
```
export MATLAB_GAZEBO_PLUGIN= # Path to GazeboPlugin/export/lib/
export GAZEBO_MODELS= # Path to gazebo model database repository
```
Call the setup script:
```
source setup.sh
```
The last 2 steps can be put in the `bashrc` file.
## Gazebo docs
These docs apply to the VM.
These docs apply to the VM. If you are using a custom installation, the paths may vary.
Gazebo variables can be initialized by running `/usr/share/gazebo/setup.sh`.
......
......@@ -3,11 +3,19 @@ source /usr/share/gazebo/setup.sh
# https://stackoverflow.com/a/9107028/4591810
SCRIPTPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [-z "$MATLAB_GAZEBO_PLUGIN"]
export MATLAB_GAZEBO_PLUGIN=~/src/GazeboPlugin/export/lib/
fi
if [-z "$GAZEBO_MODEL_REPO"]
export GAZEBO_MODEL_REPO=~/src/gazebo_models/
fi
plugin_dirs=""
for plugin_dir in $SCRIPTPATH/plugins/*/build/
do
plugin_dirs=$plugin_dirs:$plugin_dir
done
export GAZEBO_PLUGIN_PATH=~/src/GazeboPlugin/export/lib/:${plugin_dirs}:${GAZEBO_PLUGIN_PATH}
export GAZEBO_MODEL_PATH=${SCRIPTPATH}/models/:~/src/gazebo_models/:${GAZEBO_MODEL_PATH}
\ No newline at end of file
export GAZEBO_PLUGIN_PATH=${MATLAB_GAZEBO_PLUGIN}:${plugin_dirs}:${GAZEBO_PLUGIN_PATH}
export GAZEBO_MODEL_PATH=${SCRIPTPATH}/models/:${GAZEBO_MODEL_REPO}:${GAZEBO_MODEL_PATH}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment