forked from dusty-nv/jetbot_ros
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_jetbot_model.sh
More file actions
executable file
·42 lines (32 loc) · 948 Bytes
/
Copy pathinstall_jetbot_model.sh
File metadata and controls
executable file
·42 lines (32 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
#
# make sure gazebo has been installed first
#
GAZEBO_DIR=~/.gazebo
GAZEBO_MODEL_DIR=$GAZEBO_DIR/models
GAZEBO_JETBOT_DIR=$GAZEBO_MODEL_DIR/jetbot
echo "checking for: " $GAZEBO_DIR
if [ ! -d "$GAZEBO_DIR" ]; then
echo "error: please install and run Gazebo once before running this script"
exit
fi
echo "checking for: " $GAZEBO_MODEL_DIR
if [ ! -d "$GAZEBO_MODEL_DIR" ]; then
echo "error: please install and run Gazebo once before running this script"
exit
fi
echo "checking for: " $GAZEBO_JETBOT_DIR
if [ -d "$GAZEBO_JETBOT_DIR" ]; then
echo "error: $GAZEBO_JETBOT_DIR already exists"
exit
fi
#
# get the directory of the jetbot model
#
SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
JETBOT_DIR=$SOURCE_DIR/jetbot
echo "source from: " $SOURCE_DIR
echo "jetbot from: " $JETBOT_DIR
echo " "
echo "linking $GAZEBO_JETBOT_DIR -> $JETBOT_DIR"
ln -s $JETBOT_DIR $GAZEBO_JETBOT_DIR