-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bash
More file actions
48 lines (33 loc) · 1.21 KB
/
start.bash
File metadata and controls
48 lines (33 loc) · 1.21 KB
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
#!/bin/bash
# Funzione per creare una nuova scheda con comando
create_tab() {
local title="$1"
local command="$2"
gnome-terminal --tab --title="$title" -- bash -c "source install/setup.bash && $command; exec bash"
}
echo "Avvio dei servizi ROS2 su schede separate..."
# Prima scheda - Localization
create_tab "Localization" "ros2 launch navigation_pkg localization.launch.py"
sleep 2
# Seconda scheda - Navigation Server
create_tab "Navigation Server" "ros2 launch navigation_pkg navigation_server.launch.py"
sleep 2
# Terza scheda - Perception
create_tab "Perception" "ros2 launch perception_pkg perception.launch.py"
sleep 2
# Quarta scheda - Navigation
create_tab "Navigation" "ros2 launch navigation_pkg navigation.launch.py"
sleep 2
# Quinta scheda - TurtleBot4 Visualization
create_tab "TurtleBot4 Viz" "ros2 launch turtlebot4_viz view_robot.launch.py"
# Aspetta un momento prima di aprire la scheda successiva
sleep 2
echo "Tutti i servizi ROS2 sono stati avviati in schede separate!"
echo "Lo script terminerà automaticamente tra 3 secondi..."
# Countdown prima di chiudere
for i in 3 2 1; do
echo "Chiusura in $i..."
sleep 1
done
echo "Script completato. La finestra si chiuderà ora."
exit 0