forked from bit-bots/bitbots_main
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfull_restart.sh
More file actions
executable file
·29 lines (23 loc) · 899 Bytes
/
Copy pathfull_restart.sh
File metadata and controls
executable file
·29 lines (23 loc) · 899 Bytes
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
#!/bin/bash
echo "=== RESTARTING SIMULATION ==="
# 1. Kill Webots on Host
echo "Closing Webots..."
pkill -f webots-bin || pkill -f webots || echo "Webots already closed."
# 2. Restart Docker Processes (NOT Container)
echo "Stopping Simulation Processes..."
docker exec bitbots_sim pkill -f python
docker exec bitbots_sim pkill -f ros2
docker exec bitbots_sim pkill -f launching
# 3. Launch Webots (Host)
echo "Launching Webots..."
open -a /Applications/Webots.app src/bitbots_simulation/bitbots_webots_sim/worlds/match.wbt &
# 4. Launch Simulation Stack (Docker)
echo "Waiting for Webots (5s)..."
sleep 5
echo "Launching Simulation Stack (Amy Only)..."
# Use pixi run to ensure environment is active
docker exec -d bitbots_sim zsh -c "/home/bitbots/.pixi/bin/pixi run ./launch_game.sh"
echo "=== DONE ==="
echo "1. Webots should open."
echo "2. Press PLAY (Cmd+2)."
echo "3. Amy should move."