From a580c472b3c0f2be4f1fd51812b4d85eef160a23 Mon Sep 17 00:00:00 2001 From: ChVictoria Date: Thu, 24 Jul 2025 21:22:21 +0300 Subject: [PATCH] Issue #12: Add log_level and udp_port parameters --- run.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/run.sh b/run.sh index 41aa172..a7992bc 100755 --- a/run.sh +++ b/run.sh @@ -6,8 +6,10 @@ Usage: $0 -w -b Run kpi_rover on real hardware. Options: - -w specify path to ros_ws folder - -b specify BBB IP-address + -w path to ros_ws folder + -b BBB IP-address + -u UDP port to listen IMU data to + -l log verbosity level: debug, info, error, fatal -h print usage EOH } @@ -16,14 +18,18 @@ EOH ws_path="$HOME/ros_ws" bbb_ip="" +udp_port_opt="" +log_level_opt="" -while getopts 'w:b:h' opt +while getopts 'w:b:u:l:h' opt do case $opt in h) show_help; exit 0;; w) ws_path=$OPTARG;; b) bbb_ip=$OPTARG;; + u) udp_port_opt="udp_port:=$OPTARG";; + l) log_level_opt="log_level:=$OPTARG";; esac done @@ -41,4 +47,4 @@ docker run --rm --name=kpi_rover --user root --init --network=host \ -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" +&& ros2 launch kpi_rover launch_irl_rpi.launch.py ecu_ip:=$bbb_ip $udp_port_opt $log_level_opt"