-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·44 lines (33 loc) · 1010 Bytes
/
run.sh
File metadata and controls
executable file
·44 lines (33 loc) · 1010 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
show_help () {
cat << EOH
Usage: $0 -w <path/to/ros_ws> -b <bbb_ip>
Run kpi_rover on real hardware.
Options:
-w specify path to ros_ws folder
-b specify BBB IP-address
-h print usage
EOH
}
ws_path="$HOME/ros_ws"
bbb_ip=""
while getopts 'w:b:h' opt
do
case $opt in
h) show_help; exit 0;;
w) ws_path=$OPTARG;;
b) bbb_ip=$OPTARG;;
esac
done
shift "$(( OPTIND - 1 ))"
if [ -z "$bbb_ip" ]; then
echo '-b is mandatory' >&2
exit 1
fi
docker run --rm --name=kpi_rover --user root --init --network=host \
-v $ws_path:/workspace -w /workspace \
-e ROS_DISCOVERY_SERVER=172.17.0.1:11811 -e ROS_DOMAIN_ID=1 \
-e FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/super_client_cfg_file.xml \
--device=/dev/sc_mini --device=/dev/video0 kpi-rover bash -c "source /opt/ros/jazzy/setup.bash \
&& source install/setup.bash \
&& ros2 launch kpi_rover launch_irl.launch.py ecu_ip:=$bbb_ip"