Skip to content

Commit a580c47

Browse files
committed
Issue #12: Add log_level and udp_port parameters
1 parent 8b42916 commit a580c47

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

run.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ Usage: $0 -w <path/to/ros_ws> -b <bbb_ip>
66
Run kpi_rover on real hardware.
77
88
Options:
9-
-w specify path to ros_ws folder
10-
-b specify BBB IP-address
9+
-w path to ros_ws folder
10+
-b BBB IP-address
11+
-u UDP port to listen IMU data to
12+
-l log verbosity level: debug, info, error, fatal
1113
-h print usage
1214
EOH
1315
}
@@ -16,14 +18,18 @@ EOH
1618

1719
ws_path="$HOME/ros_ws"
1820
bbb_ip=""
21+
udp_port_opt=""
22+
log_level_opt=""
1923

2024

21-
while getopts 'w:b:h' opt
25+
while getopts 'w:b:u:l:h' opt
2226
do
2327
case $opt in
2428
h) show_help; exit 0;;
2529
w) ws_path=$OPTARG;;
2630
b) bbb_ip=$OPTARG;;
31+
u) udp_port_opt="udp_port:=$OPTARG";;
32+
l) log_level_opt="log_level:=$OPTARG";;
2733
esac
2834
done
2935

@@ -41,4 +47,4 @@ docker run --rm --name=kpi_rover --user root --init --network=host \
4147
-e FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/super_client_cfg_file.xml \
4248
--device=/dev/sc_mini --device=/dev/video0 kpi-rover bash -c "source /opt/ros/jazzy/setup.bash \
4349
&& source install/setup.bash \
44-
&& ros2 launch kpi_rover launch_irl.launch.py ecu_ip:=$bbb_ip"
50+
&& ros2 launch kpi_rover launch_irl_rpi.launch.py ecu_ip:=$bbb_ip $udp_port_opt $log_level_opt"

0 commit comments

Comments
 (0)