forked from rapyuta-robotics/turtlebot3-UE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_editor.sh
executable file
·29 lines (24 loc) · 1.06 KB
/
run_editor.sh
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
#!/bin/bash
# Copyright 2020-2022 Rapyuta Robotics Co., Ltd.
if [ -z "${UE5_DIR}" ]; then
printf "Please set UE5_DIR to path of UE5 folder\n"
exit 1
fi
DISCOVERY_SERVER=${1:-true}
CURRENT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
TB3_UE_DIR=${2:-"${CURRENT_DIR}"}
if $DISCOVERY_SERVER; then
# Run discovery service for FastDDS
(exec "${TB3_UE_DIR}/run_discovery_service.sh")
# Configure environment for FastDDS discovery
source ${TB3_UE_DIR}/fastdds_setup.sh
fi
#change default level, generating DefautlEngine.ini
DEFAULT_LEVEL=${LEVEL_NAME:-"Turtlebot3_benchmark"}
DEFAULT_RATE=${FIXED_FRAME_RATE:-"100.0"}
DEFAULT_RTF=${TARGET_RTF:-"1.0"}
sed -e 's/${LEVEL_NAME}/'${DEFAULT_LEVEL}'/g' Config/DefaultEngineBase.ini > Config/DefaultEngine.ini
sed -i -e 's/${FIXED_FRAME_RATE}/'${DEFAULT_RATE}'/g' Config/DefaultEngine.ini
sed -i -e 's/${TARGET_RTF}/'${DEFAULT_RTF}'/g' Config/DefaultEngine.ini
UE_EDITOR="${UE5_DIR}/Engine/Binaries/Linux/UnrealEditor"
(exec "$UE_EDITOR" "${TB3_UE_DIR}/turtlebot3.uproject")