-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart
executable file
·41 lines (35 loc) · 1.01 KB
/
start
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
#!/bin/sh
# Sebastian Rockel, 2010-01-15
# Eases to start the different player instances
#
# @param $1: player cfg file
# @param $2: robot program
#
prefix="stage_local" # player/stage config files
DefStageWait=2 # Seconds to wait for Stage world to come up
PlaPort=6665 # Player port
LogPort=6667
killPlayers() {
echo "=Now kill remaining player background instances.."
killall player # Kill player processes in background
killall playerv # Kill playerv processes
sleep 1
}
if [ $1 = "-h" ] ; then
echo "\nUsage: `basename $0` [playerconfig] [robotprogram]\n"
exit 0
elif [ ! -z $1 ] ; then
world=$1
else
world="uhh"
fi
killPlayers
player -p $PlaPort $prefix/$world.cfg & # Stage world
sleep $DefStageWait # Wait for Stage world to come up
# Start playerv with params when in Stage
if [ $world = "uhh" ] ; then make view & fi
#player -p $LogPort -q $prefix/writelog.cfg & # Start writelog driver
#sleep 1
#playervcr -p $LogPort & # Start logging controller
# Start the robot program
if [ ! -z $2 ] ; then ./$2 ; fi