forked from hchengwang/Software-duckietown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
environment.sh
executable file
·33 lines (23 loc) · 1023 Bytes
/
environment.sh
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
#!/bin/bash
[ -z "$DUCKIETOWN_ROOT" ] && { echo "Need to set DUCKIETOWN_ROOT - configuration is invalid (!)"; }
[ -z "$HOSTNAME" ] && { echo "Need to set HOSTNAME."; }
# Do not compile Lisp messages
# XXX: not sure if this is the place to put this.
export ROS_LANG_DISABLE=gennodejs:geneus:genlisp
shell=`basename $SHELL`
echo "Activating ROS..."
source /opt/ros/kinetic/setup.$shell
echo "Setup ROS_HOSTNAME..."
export HOSTNAME=$HOSTNAME
export ROS_HOSTNAME=$HOSTNAME.local
echo "Setting up DUCKIETOWN_ROOT..."
export DUCKIETOWN_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
echo "Setting up PYTHONPATH..."
export PYTHONPATH=$DUCKIETOWN_ROOT/catkin_ws/src:$PYTHONPATH
# Cannot make machines before building
# echo "Building machines file..."
# make -C $DUCKIETOWN_ROOT machines
echo "Activating development environment..."
source $DUCKIETOWN_ROOT/catkin_ws/devel/setup.$shell
# TODO: check that the time is >= 2015
exec "$@" #Passes arguments. Need this for ROS remote launching to work.