Skip to content

Commit a55257d

Browse files
authored
UR18 support (#387)
Adds support to launch a UR18 through start_ursim.sh
1 parent 13cead2 commit a55257d

File tree

3 files changed

+28
-9
lines changed

3 files changed

+28
-9
lines changed

include/ur_client_library/ur/datatypes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ enum class RobotType : int8_t
9595
UR10 = 2,
9696
UR3 = 3,
9797
UR16 = 4,
98+
UR18 = 5,
9899
UR8LONG = 6,
99100
UR20 = 7,
100101
UR30 = 8,

scripts/start_ursim.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ help()
4343
echo
4444
echo "Syntax: `basename "$0"` [-m|s|h]"
4545
echo "options:"
46-
echo " -m <model> Robot model. One of [ur3, ur3e, ur5, ur5e, ur7e, ur8long, ur10e, ur12e, ur16e, ur15, ur20, ur30]. Defaults to ur5e."
46+
echo " -m <model> Robot model. One of [ur3, ur3e, ur5, ur5e, ur7e, ur8long, ur10e, ur12e, ur16e, ur15, ur18, ur20, ur30]. Defaults to ur5e."
4747
echo " -v <version> URSim version that should be used.
4848
See https://hub.docker.com/r/universalrobots/ursim_e-series/tags
4949
for available versions. Defaults to 'latest'"
@@ -86,7 +86,7 @@ get_series_from_model()
8686
ur3e|ur5e|ur7e|ur10e|ur12e|ur16e)
8787
ROBOT_SERIES=e-series
8888
;;
89-
ur8long|ur15|ur20|ur30)
89+
ur8long|ur15|ur18|ur20|ur30)
9090
ROBOT_SERIES=e-series
9191
;;
9292
*)
@@ -125,7 +125,7 @@ strip_robot_model()
125125
ROBOT_MODEL=${robot_model^^}
126126
else
127127
ROBOT_MODEL=${robot_model^^}
128-
# UR8LONG, UR15, UR20 and UR30 need no further adjustment
128+
# UR8LONG, UR15, UR18, UR20 and UR30 need no further adjustment
129129
if [[ "$robot_model" = @(ur3e|ur5e|ur10e|ur16e) ]]; then
130130
ROBOT_MODEL=$(echo "${ROBOT_MODEL:0:$((${#ROBOT_MODEL}-1))}")
131131
elif [[ "$robot_model" = @(ur7e|ur12e) ]]; then
@@ -153,8 +153,8 @@ validate_parameters()
153153
local MIN_UR30="5.15.0"
154154
local MIN_UR7e="5.22.0" # and UR12e
155155
local MIN_UR7e_X="10.9.0" # and UR12e
156-
local MIN_UR8LONG="5.23.0"
157-
local MIN_UR8LONG_X="10.11.0"
156+
local MIN_UR8LONG="5.23.0" # and UR18
157+
local MIN_UR8LONG_X="10.11.0" # and UR18
158158

159159
local URSIM_VERSION_CHECK="$URSIM_VERSION"
160160
if [[ "$URSIM_VERSION" == "latest" ]]; then
@@ -184,7 +184,7 @@ validate_parameters()
184184
verlte "$MIN_CB3" "$URSIM_VERSION_CHECK" && return 0
185185
;;
186186
e-series)
187-
if [[ $ROBOT_MODEL != @(ur3e|ur5e|ur7e|ur8long|ur10e|ur12e|ur16e|ur15|ur20|ur30) ]]; then
187+
if [[ $ROBOT_MODEL != @(ur3e|ur5e|ur7e|ur8long|ur10e|ur12e|ur16e|ur15|ur18|ur20|ur30) ]]; then
188188
echo "$ROBOT_MODEL is no valid e-series model!" && exit 1
189189
fi
190190
if [[ $ROBOT_MODEL == "ur15" ]]; then
@@ -195,7 +195,7 @@ validate_parameters()
195195
MIN_VERSION=$MIN_UR30
196196
elif [[ $ROBOT_MODEL == "ur7e" || $ROBOT_MODEL == "ur12e" ]]; then
197197
MIN_VERSION=$MIN_UR7e
198-
elif [[ $ROBOT_MODEL == "ur8long" ]]; then
198+
elif [[ $ROBOT_MODEL == "ur8long" || $ROBOT_MODEL == "ur18" ]]; then
199199
MIN_VERSION=$MIN_UR8LONG
200200
else
201201
MIN_VERSION=$MIN_E_SERIES
@@ -206,11 +206,11 @@ validate_parameters()
206206
echo "PolyscopeX is only supported from version $MIN_POLYSCOPE_X onwards"
207207
exit 1
208208
fi
209-
if [[ $ROBOT_MODEL != @(ur3e|ur5e|ur7e|ur8long|ur10e|ur12e|ur16e|ur15|ur20|ur30) ]]; then
209+
if [[ $ROBOT_MODEL != @(ur3e|ur5e|ur7e|ur8long|ur10e|ur12e|ur16e|ur15|ur18|ur20|ur30) ]]; then
210210
echo "$ROBOT_MODEL is no valid PolyscopeX model!" && exit 1
211211
elif [[ $ROBOT_MODEL == "ur7e" || $ROBOT_MODEL == "ur12e" ]]; then
212212
MIN_VERSION=$MIN_UR7e_X
213-
elif [[ $ROBOT_MODEL == "ur8long" ]]; then
213+
elif [[ $ROBOT_MODEL == "ur8long" || $ROBOT_MODEL == "ur18" ]]; then
214214
MIN_VERSION=$MIN_UR8LONG_X
215215
elif [[ $ROBOT_MODEL == "ur15" ]]; then
216216
MIN_VERSION=$MIN_UR15_X

tests/test_start_ursim.bats

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,24 @@ setup() {
265265
[ $status -eq 0 ]
266266
}
267267

268+
@test "test ur18 min version" {
269+
run test_input_handling -m ur18 -v 3.14.3
270+
echo "$output"
271+
[ $status -eq 1 ]
272+
run test_input_handling -m ur18 -v 5.22.3
273+
echo "$output"
274+
[ $status -eq 1 ]
275+
run test_input_handling -m ur18 -v 5.23.0
276+
echo "$output"
277+
[ $status -eq 0 ]
278+
run test_input_handling -m ur18 -v 10.10.0
279+
echo "$output"
280+
[ $status -eq 1 ]
281+
run test_input_handling -m ur18 -v 10.11.0
282+
echo "$output"
283+
[ $status -eq 0 ]
284+
}
285+
268286
@test "unsupported versions raise error" {
269287
run main -v 1.2.3 -t
270288
echo "$output"

0 commit comments

Comments
 (0)