forked from tue-robotics/emc-env
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.bash
50 lines (38 loc) · 1.43 KB
/
setup.bash
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
43
44
45
46
47
48
49
50
export EMC_ENV_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export EMC_DIR=$EMC_ENV_DIR/..
# --------------------------------------------------------------------------------
export EMC_SYSTEM_DIR=$EMC_DIR/system
# Default ROS distro is indigo
[ -n "$EMC_ROS_DISTRO" ] || export EMC_ROS_DISTRO=indigo
if [ -f $EMC_SYSTEM_DIR/devel/setup.bash ]
then
source $EMC_SYSTEM_DIR/devel/setup.bash
fi
# --------------------------------------------------------------------------------
function emc-update
{
if ! dpkg -s git &> /dev/null
then
echo "Going to install git"
sudo apt-get install git
fi
# Update the installer / updater
if [ ! -d $EMC_ENV_DIR ]
then
git clone https://github.com/tue-robotics/emc-env $EMC_ENV_DIR
else
git --git-dir=$EMC_ENV_DIR/.git --work-tree=$EMC_ENV_DIR pull
fi
# Run the installer / updater
$EMC_ENV_DIR/setup/emc-update-impl.bash
# Source the updated environment
source $EMC_ENV_DIR/setup.bash
}
# --------------------------------------------------------------------------------
alias emc-sim='rosrun emc_simulator pico_simulator'
alias pico-teleop='rosrun emc_simulator teleop.py'
alias emc-viz='rosrun emc_system emc_viz'
alias pico-core='export ROS_MASTER_URI=http://192.168.2.81:11311'
alias taco-core='export ROS_MASTER_URI=http://192.168.2.82:11311'
alias sshpico='ssh emc@192.168.2.81'
alias sshtaco='ssh emc@192.168.2.82'