https://github.com/duckietown/Software
Raw File
Tip revision: c24c136451fea51d24045c83d4c4de338fbc0367 authored by Andrea Censi on 15 October 2017, 20:31:56 UTC
Merge pull request #230 from duckietown/andrea-devel
Tip revision: c24c136
environment.sh
#!/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.
back to top