Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ 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
-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
}
Expand All @@ -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

Expand All @@ -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"