-
Notifications
You must be signed in to change notification settings - Fork 1
/
savebag
55 lines (43 loc) · 1.56 KB
/
savebag
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
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# get where I am
MY_PATH=$(readlink -f $(dirname $0))
echo ${MY_PATH}
# what type of terminal
OPTION_WORKING_DIR='--working-directory'
OPTION_CORE_GEOMETRY='--geometry=50x10+600+0'
OPTION_RM_GEOMETRY='--geometry=50x10+500+0'
OPTION_COMMAND='--command'
MASTER_DISPLAY_OPTION="${OPTION_CORE_GEOMETRY} ${OPTION_TITLE}\=\"roscore\""
RUNMGR_DISPLAY_OPTION="${OPTION_RM_GEOMETRY} ${OPTION_TITLE}\=\"runtime_manager\""
if [ $(which gnome-terminal) ]; then
TERMINAL=gnome-terminal
GNOME_VERSION=$(gnome-terminal --version | cut -d '.' -f 2)
if [ ${GNOME_VERSION} -ge 14 ]; then
MASTER_DISPLAY_OPTION=''
RUNMGR_DISPLAY_OPTION=''
fi
elif [ $(which mate-terminal) ]; then
TERMINAL=mate-terminal
elif [ $(which xfce4-terminal) ]; then
TERMINAL=xfce4-terminal
elif [ $(which lxterminal) ]; then
TERMINAL=lxterminal
elif [ $(which konsole) ]; then
TERMINAL=konsole
OPTION_WORKING_DIR='--workdir'
OPTION_CORE_GEOMETRY=''
OPTION_RM_GEOMETRY=''
OPTION_PM_GEOMETRY=''
OPTION_COMMAND='-e'
OPTION_TITLE='-T'
fi
#display windows
echo "test windows"
#gksudo --message "Please input password for launching process manager" \
# -- $MY_PATH/run_proc_manager &
#ADDR=$($MY_PATH/src/.config/rviz/subnet_chk.py -)
#if [ "$?" == "0" ]; then
# export ROS_IP=$ADDR
#fi
# boot ros-master
${TERMINAL} ${MASTER_DISPLAY_OPTION} ${OPTION_WORKING_DIR}=${MY_PATH} ${OPTION_COMMAND}="bash -c 'source devel_isolated/setup.bash;cd ~/Slam_bag;rosbag record /imu /ns1/velodyne_points /ns2/velodyne_points; sleep 1'"& #!!!it is bug shell time too short