-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_example.sh
More file actions
executable file
·47 lines (38 loc) · 1.33 KB
/
Copy pathrun_example.sh
File metadata and controls
executable file
·47 lines (38 loc) · 1.33 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
#!/bin/bash
# Exit on error
set -e
# Check for required Python libraries
echo "Checking required Python libraries..."
MISSING_LIBS=0
if ! python3 -c "import yaml" 2>/dev/null; then
echo "Error: PyYAML is not installed."
echo "Please install it with: pip install pyyaml"
MISSING_LIBS=1
fi
if ! python3 -c "import inotify" 2>/dev/null; then
echo "Error: inotify is not installed."
echo "Please install it with: pip install inotify"
MISSING_LIBS=1
fi
if [ $MISSING_LIBS -eq 1 ]; then
echo ""
echo "Missing required libraries. Please install them and try again."
exit 1
fi
WORKSPACE_ROOT="$(pwd)"
PLUGIN_DIR="$WORKSPACE_ROOT/blender_stonefish_plugin"
BLEND_FILE="$PLUGIN_DIR/example.blend"
CONFIG_FILE="$PLUGIN_DIR/config.yaml"
OUTPUT_SCN="$WORKSPACE_ROOT/src/bridge_stonefish/data/scenarios/generated.scn"
echo "Converting example.blend to Stonefish scenario..."
cd "$PLUGIN_DIR"
python3 main.py "$BLEND_FILE" -o "$OUTPUT_SCN" -c "$CONFIG_FILE"
echo ""
echo "Building bridge_stonefish package..."
cd "$WORKSPACE_ROOT"
colcon build --packages-select bridge_stonefish --symlink-install
echo ""
echo "Launching Stonefish simulator..."
source /opt/ros/jazzy/setup.bash
source "$WORKSPACE_ROOT/install/setup.bash"
ros2 launch bringup test_mission_executor.launch.py mission_name:=prequalify env_file_name:="$OUTPUT_SCN"