提交 a2d7c8c3 编写于 作者: D Dong Li 提交者: Jiangtao Hu

scripts: added support for dreamview

上级 f3d43fca
......@@ -115,6 +115,17 @@ autorestart=unexpected
redirect_stderr=true
stdout_logfile=/apollo/data/log/dreamview.out
[program:sim_control]
command=/apollo/bazel-bin/modules/dreamview/dreamview --flagfile=/apollo/modules/dreamview/conf/dreamview.conf --enable_sim_control --log_dir=/apollo/data/log
autostart=false
numprocs=1
exitcodes=0
stopsignal=SIGINT
startretries=10
autorestart=unexpected
redirect_stderr=true
stdout_logfile=/apollo/data/log/dreamview.out
[program:monitor]
command=/apollo/bazel-bin/modules/monitor/monitor --flagfile=/apollo/modules/monitor/conf/monitor.conf --log_dir=/apollo/data/log
autostart=false
......
......@@ -115,6 +115,17 @@ autorestart=unexpected
redirect_stderr=true
stdout_logfile=/apollo/data/log/dreamview.out
[program:sim_control]
command=/apollo/modules/dreamview/dreamview --flagfile=/apollo/modules/dreamview/conf/dreamview.conf --enable_sim_control --log_dir=/apollo/data/log
autostart=false
numprocs=1
exitcodes=0
stopsignal=SIGINT
startretries=10
autorestart=unexpected
redirect_stderr=true
stdout_logfile=/apollo/data/log/dreamview.out
[program:monitor]
command=/apollo/modules/monitor/monitor --flagfile=/apollo/modules/monitor/conf/monitor.conf --log_dir=/apollo/data/log
autostart=false
......
......@@ -30,22 +30,19 @@ function start() {
supervisord -c /apollo/modules/tools/supervisord/release.conf >& /tmp/supervisord.start.log
echo "Started supervisord with release conf"
supervisorctl start monitor > /dev/null
supervisorctl start dreamview > /dev/null
else
supervisord -c /apollo/modules/tools/supervisord/dev.conf >& /tmp/supervisord.start.log
echo "Started supervisord with dev conf"
bash scripts/dreamview.sh
fi
supervisorctl start dreamview > /dev/null
echo "Dreamview is running at http://localhost:8888"
}
function stop() {
if [ "$HOSTNAME" == "in_release_docker" ]; then
supervisorctl stop monitor > /dev/null 2>&1 &
supervisorctl stop dreamview > /dev/null 2>&1 &
else
bash scripts/dreamview.sh stop
fi
supervisorctl stop dreamview
pkill -f roscore
}
......
......@@ -25,4 +25,35 @@ source "${DIR}/apollo_base.sh"
# run function from apollo_base.sh
# run command_name module_name
run dreamview "$@" --enable_sim_control=true
function start() {
echo "Start roscore..."
ROSCORELOG="${APOLLO_ROOT_DIR}/data/log/roscore.out"
nohup roscore </dev/null >"${ROSCORELOG}" 2>&1 &
if [ "$HOSTNAME" == "in_release_docker" ]; then
supervisord -c /apollo/modules/tools/supervisord/release.conf >& /tmp/supervisord.start.log
echo "Started supervisord with release conf"
else
supervisord -c /apollo/modules/tools/supervisord/dev.conf >& /tmp/supervisord.start.log
echo "Started supervisord with dev conf"
fi
supervisorctl start sim_control > /dev/null
echo "Dreamview is running at http://localhost:8888"
}
function stop() {
supervisorctl stop sim_control > /dev/null 2>&1 &
pkill -f roscore
}
case $1 in
start)
start
;;
stop)
stop
;;
*)
start
;;
esac
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册