Skip to content

Commit

Permalink
update: automatically source devel/setup.bash
Browse files Browse the repository at this point in the history
  • Loading branch information
honden01 authored and honden01 committed May 24, 2021
1 parent 6a5e947 commit 908fb4e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/rviz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"; pwd )"
BASE_DIR="$( cd ${SCRIPT_DIR}/..; pwd )"
TRAJ_GENERATOR_DIR="$(cd "${BASE_DIR}/map_tools/modules/trajectory_generator"; pwd)"
TRAJ_GENERATOR_DIR="$( cd "${BASE_DIR}/map_tools/modules/trajectory_generator"; pwd )"
RVIZ_CONFIG_FILE=${TRAJ_GENERATOR_DIR}/rviz/rviz_config_traj_gene.rviz


Expand Down
21 changes: 16 additions & 5 deletions scripts/traj_generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,24 @@
# @version:
# @Author: LitoNeo
###
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BASE_DIR="cd "${SCRIPT_DIR}/.."; pwd"
GRIDMAP_GENERATOR_DIR="cd "${BASE_DIR}/map_tools/grid_map_generator"; pwd"
TRAJ_GENERATOR_DIR="cd "${BASE_DIR}/map_tools/trajectory_generator"; pwd"
# set -x

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"; pwd )"
BASE_DIR="$( cd ${SCRIPT_DIR}/..; pwd )"
GRIDMAP_GENERATOR_DIR="$( cd "${BASE_DIR}/map_tools/modules/grid_map_generator"; pwd )"
TRAJ_GENERATOR_DIR="$( cd "${BASE_DIR}/map_tools/modules/trajectory_generator"; pwd )"

source "${SCRIPT_DIR}/smartcar_base.sh"

CATKIN_DIR="$( cd ${BASE_DIR}/../..; pwd )"
ENV_BASH_FILE="${CATKIN_DIR}/devel/setup.bash"
if [ ! -f ${ENV_BASH_FILE} ];then
echo "${ENV_BASH_FILE} not found."
echo "Please build this project first"
exit 1
fi
source ${ENV_BASH_FILE}

function start(){
echo "Start roscore..."
${SCRIPT_DIR}/roscore.sh start
Expand Down Expand Up @@ -41,6 +52,6 @@ case $1 in
stop
;;
*)
echo "choose start or stop"
echo "choose start or stop argument"
;;
esac

0 comments on commit 908fb4e

Please sign in to comment.