Skip to content

Commit 868120b

Browse files
author
Felix Exner (fexner)
authored
Add support for ur20 in start_ursim script (#179)
UR20 Require URSim > 5.14
1 parent 479a197 commit 868120b

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

scripts/start_ursim.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ help()
3838
echo
3939
echo "Syntax: `basename "$0"` [-m|s|h]"
4040
echo "options:"
41-
echo " -m <model> Robot model. One of [ur3, ur3e, ur5, ur5e, ur10, ur10e, ur16e]. Defaults to ur5e."
41+
echo " -m <model> Robot model. One of [ur3, ur3e, ur5, ur5e, ur10, ur10e, ur16e, ur20]. Defaults to ur5e."
4242
echo " -v <version> URSim version that should be used.
4343
See https://hub.docker.com/r/universalrobots/ursim_e-series/tags
4444
for available versions. Defaults to 'latest'"
@@ -71,6 +71,10 @@ validate_model()
7171
ROBOT_MODEL=$(echo ${ROBOT_MODEL:0:$((${#ROBOT_MODEL}-1))})
7272
ROBOT_SERIES=e-series
7373
;;
74+
ur20)
75+
ROBOT_MODEL=${ROBOT_MODEL^^}
76+
ROBOT_SERIES=e-series
77+
;;
7478
*)
7579
echo "Not a valid robot model: $ROBOT_MODEL"
7680
exit
@@ -88,18 +92,29 @@ validate_ursim_version()
8892
[ $URSIM_VERSION == "latest" ] && return 0
8993
local MIN_CB3="3.14.3"
9094
local MIN_E_SERIES="5.9.4"
95+
local MIN_UR20="5.14.0"
96+
97+
local MIN_VERSION="0.0"
98+
9199

92100
case $ROBOT_SERIES in
93101
cb3)
94102
verlte "4.0.0" $URSIM_VERSION && echo "$URSIM_VERSION is no valid CB3 version!" && exit
95103
verlte $MIN_CB3 $URSIM_VERSION && return 0
104+
MIN_VERSION=$MIN_CB3
96105
;;
97106
e-series)
98-
verlte $MIN_E_SERIES $URSIM_VERSION && return 0
107+
if [[ $ROBOT_MODEL == "UR20" ]]; then
108+
verlte $MIN_UR20 $URSIM_VERSION && return 0
109+
MIN_VERSION=$MIN_UR20
110+
else
111+
verlte $MIN_E_SERIES $URSIM_VERSION && return 0
112+
MIN_VERSION=$MIN_E_SERIES
113+
fi
99114
;;
100115
esac
101116

102-
echo "Illegal version given. Version must be greater or equal to $MIN_CB3 / $MIN_E_SERIES. Given version: $URSIM_VERSION."
117+
echo "Illegal version given. Version must be greater or equal to $MIN_VERSION. Given version: $URSIM_VERSION."
103118
exit
104119
}
105120

0 commit comments

Comments
 (0)