Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
Signed-off-by: Oguz Ozturk <[email protected]>
  • Loading branch information
oguzkaganozt committed Feb 3, 2025
1 parent 201f3d2 commit 984435a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
8 changes: 7 additions & 1 deletion docker/tools/scenario-simulator/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ run_scenario_simulator() {
SCENARIO=${SCENARIO:-$(find-pkg-share scenario_test_runner)/scenario/sample.yaml}
GLOBAL_TIMEOUT=${GLOBAL_TIMEOUT:-120}
RECORD=${RECORD:-false}
RVIZ_CONFIG=${RVIZ_CONFIG:-$(find-pkg-share rviz2)/share/rviz2/launch/default.rviz}
USE_SIM_TIME=${USE_SIM_TIME:-false}

# Print all variables
echo "ARCHITECTURE_TYPE: $ARCHITECTURE_TYPE"
Expand All @@ -26,6 +28,8 @@ run_scenario_simulator() {
echo "SCENARIO: $SCENARIO"
echo "GLOBAL_TIMEOUT: $GLOBAL_TIMEOUT"
echo "RECORD: $RECORD"
echo "RVIZ_CONFIG: $RVIZ_CONFIG"
echo "USE_SIM_TIME: $USE_SIM_TIME"

# Launch scenario test runner
ros2 launch scenario_test_runner scenario_test_runner.launch.py \
Expand All @@ -39,7 +43,9 @@ run_scenario_simulator() {
output_directory:="$OUTPUT_DIRECTORY" \
scenario:="$SCENARIO" \
global_timeout:="$GLOBAL_TIMEOUT" \
record:="$RECORD"
record:="$RECORD" \
rviz_config:="$RVIZ_CONFIG" \
use_sim_time:="$USE_SIM_TIME"
}

# Source ROS and Autoware setup files
Expand Down
15 changes: 12 additions & 3 deletions docker/tools/visualizer/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,17 @@ EOF
echo -e "\033[32m-------------------------------------------------------------------------\033[0m"
}

# shellcheck disable=SC1090
[ "$WEB_ENABLED" == "true" ] && configure_vnc
# Source ROS and Autoware setup files
source "/opt/ros/$ROS_DISTRO/setup.bash"
source "/opt/autoware/setup.bash"
exec "$@"

# Execute passed command if provided
if [ "$WEB_ENABLED" == "true" ]; then
configure_vnc
[ $# -eq 0 ] && sleep infinity
exec "$@"
else
[ -z "$RVIZ_CONFIG" ] && RVIZ_CONFIG="$(find-pkg-share autoware_launch)/rviz/$(var rviz_config_name)"
[ $# -eq 0 ] && rviz2 -d "$RVIZ_CONFIG"
exec "$@"
fi
2 changes: 1 addition & 1 deletion docker/tools/visualizer/xstartup
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# cspell:ignore openbox, VNC, tigervnc, novnc, websockify, newkey, xstartup, DBUS, Xresources, xrdb
# cspell:ignore openbox, VNC, xstartup, DBUS, Xresources, xrdb

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
Expand Down

0 comments on commit 984435a

Please sign in to comment.