-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathstart_demo.sh
executable file
·80 lines (68 loc) · 2.43 KB
/
start_demo.sh
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
echo ""
echo "ROS AR Tag Robot Pose Estimator Demo"
echo ""
# The -e option to xterm is useful for running a single command and then exiting (or closing xterm after a Ctrl+C)
# Fire up Gazebo world with maze environment
xterm -e "roslaunch plywood_mazes maze_3_6x6.launch" &
sleep 6
# Prompt for a key press to continue after Gazebo has loaded
#read -n 1 -r -s -p "Press any key to continue once Gazebo has loaded or Ctrl+C to abort..."
#echo ""
# Allow for noisy odometry choice
echo ""
read -p "After Gazebo has loaded, do you want to start a noisy odometry node? (y/n): " input_choice_1
if [ "$input_choice_1" = "y" ]
then
# Load robot description to parameter server and spawn a robot
xterm -e "roslaunch rtab_dumpster spawn_rtab_dumpster.launch odometryTopic:=odom_perfect" &
#xterm -e "roslaunch udacity_bot spawn_udacity_bot.launch odometryTopic:=odom_perfect" &
sleep 4
# Start noisy odometry node
xterm -e "roslaunch noisy_odometry noisy_odometry.launch" &
sleep 4
elif [ "$input_choice_1" = "n" ]
then
# Load robot description to parameter server and spawn a robot
xterm -e "roslaunch rtab_dumpster spawn_rtab_dumpster.launch" &
sleep 4
echo ""
else
echo ""
echo "Warning: Not an acceptable option. Do you want to start a noisy odometry node? Choose (y/n)"
echo ""
fi
# Kick off static transform broadcaster node
xterm -e "roslaunch apriltag_robot_pose static_transforms.launch" &
sleep 2
# Launch AprilTag detector node to detect AR markers in space
xterm -e "roslaunch apriltag_robot_pose apriltag_detector.launch image_topic:=/camera/rgb/image_raw info_topic:=/camera/rgb/camera_info" &
sleep 4
# Execute the robot pose estimator node.
xterm -hold -e "roslaunch apriltag_robot_pose robot_pose.launch camera_frame:=/camera_rgbd_frame" &
sleep 2
# Allow for Rviz choice
echo ""
read -p "Do you want to start RVIZ with a preconfigured view (y/n): " input_choice_2
if [ "$input_choice_2" = "y" ]
then
# Start RVIZ
xterm -e "roslaunch apriltag_robot_pose rviz.launch" &
sleep 4
# Load pre-made map using map server
xterm -e "roslaunch plywood_mazes map_server_maze_3.launch" &
echo ""
elif [ "$input_choice_2" = "n" ]
then
echo ""
echo "Rviz *NOT* started!"
echo ""
else
echo ""
echo "Warning: Not an acceptable option. Choose (y/n)"
echo ""
fi
# Prompt for a key press to continue..
echo "Press any key to return to the shell prompt or"
read -n 1 -r -s -p "Ctrl+C to close all X-Term processes..."
echo ""