forked from Riley-Tuckett/SRT-ROS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·52 lines (44 loc) · 1.44 KB
/
build.sh
File metadata and controls
executable file
·52 lines (44 loc) · 1.44 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
49
50
51
52
#!/bin/bash
set -e
echo "=========================================="
echo "Building Rover Control Docker Image"
echo "=========================================="
# Check if src directory exists
if [ ! -d "src/rover_control" ]; then
echo "ERROR: src/rover_control directory not found!"
echo "Please create all the required files first."
exit 1
fi
# Check if required files exist
required_files=(
"dockerfile"
"entrypoint.sh"
"src/rover_control/package.xml"
"src/rover_control/CMakeLists.txt"
"src/rover_control/src/control_node_controller.cpp"
"src/rover_control/src/control_node_joystick.cpp"
"src/rover_control/launch/system_launch.py"
)
for file in "${required_files[@]}"; do
if [ ! -f "$file" ]; then
echo "ERROR: Required file missing: $file"
exit 1
fi
done
echo "✓ All required files found"
echo ""
# Build the Docker image
echo "Building Docker image..."
docker build -t swinroverteam/srt-ros:latest .
echo ""
echo "=========================================="
echo "✓ Build complete!"
echo "=========================================="
echo ""
echo "To run the system:"
echo " docker run -it --rm --network host --privileged --device /dev/input swinroverteam/srt-ros:latest"
echo " alternatively, run the included run.sh shell file"
echo ""
echo "To run only the micro-ROS agent:"
echo " docker run -it --rm --network host -e LAUNCH_MODE=agent-only swinroverteam/srt-ros:latest"
echo ""