Skip to content

Commit 7dec73d

Browse files
authored
Remove SDK version mapping (#355)
The PolyScope X Docker images do now also support marketing version tags. Thus, we can skip the SDK number to marketing version mapping. This way new versions will be available as soon as the Docker image is available.
1 parent 289c747 commit 7dec73d

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

scripts/start_ursim.sh

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ PORT_FORWARDING_WITHOUT_DASHBOARD="-p 30001-30004:30001-30004"
3636
CONTAINER_NAME="ursim"
3737
TEST_RUN=false
3838

39-
# TODO: Add support for more URSim PolyScopeX versions once released
40-
# The PolyScopeX URSim containers follow the SDK versioning scheme. This maps those to marketing
41-
# versions
42-
declare -Ag POLYSCOPE_X_MAP=( ["10.7.0"]="0.12.159"
43-
["10.8.0"]="0.13.124"
44-
["10.9.0"]="0.14.47")
45-
4639
help()
4740
{
4841
# Display Help
@@ -205,8 +198,8 @@ validate_parameters()
205198
fi
206199
;;
207200
polyscopex)
208-
if [[ ! "${POLYSCOPE_X_MAP[${URSIM_VERSION_CHECK}]+_}" ]]; then
209-
echo "URSim version $URSIM_VERSION_CHECK is unfortunately not supported"
201+
if ! verlte "$MIN_POLYSCOPE_X" "$URSIM_VERSION_CHECK"; then
202+
echo "PolyscopeX is only supported from version $MIN_POLYSCOPE_X onwards"
210203
exit 1
211204
fi
212205
if [[ $ROBOT_MODEL != @(ur3e|ur5e|ur7e|ur10e|ur12e|ur16e|ur15|ur20|ur30) ]]; then
@@ -285,7 +278,7 @@ get_download_url_urcap()
285278
post_setup_polyscopex()
286279
{
287280

288-
if [[ "$URSIM_VERSION" == "${POLYSCOPE_X_MAP[10.7.0]}" ]]; then
281+
if [[ "$URSIM_VERSION" == "10.7.0" ]]; then
289282
get_download_url_urcapx 0.1.0
290283
else
291284
get_download_url_urcapx latest
@@ -434,7 +427,6 @@ main() {
434427
DOCKER_ARGS=""
435428

436429
if [ "$ROBOT_SERIES" == "polyscopex" ]; then
437-
URSIM_VERSION=${POLYSCOPE_X_MAP[$URSIM_VERSION]}
438430
DOCKER_ARGS="$DOCKER_ARGS --privileged"
439431
fi
440432

@@ -456,7 +448,7 @@ main() {
456448
PROGRAM_STORAGE=$(realpath "$PROGRAM_STORAGE")
457449

458450
ROBOT_MODEL_CONTROLLER_FLAG=""
459-
verlte "${POLYSCOPE_X_MAP[10.7.0]}" "$URSIM_VERSION" && verlte "$URSIM_VERSION" "${POLYSCOPE_X_MAP[10.8.0]}" && ROBOT_MODEL_CONTROLLER_FLAG="-e ROBOT_TYPE_CONTROLLER=${ROBOT_MODEL}"
451+
verlte "10.7.0" "$URSIM_VERSION" && verlte "$URSIM_VERSION" "10.8.0" && ROBOT_MODEL_CONTROLLER_FLAG="-e ROBOT_TYPE_CONTROLLER=${ROBOT_MODEL}"
460452

461453
docker_cmd="docker run --rm -d \
462454
--net ursim_net --ip $IP_ADDRESS \

tests/test_start_ursim.bats

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
setup_file() {
2+
echo "Pulling latest URSim Docker images for CB3 and PolyScope 5"
23
docker pull universalrobots/ursim_cb3:latest
34
docker pull universalrobots/ursim_e-series:latest
45
}
@@ -261,14 +262,6 @@ setup() {
261262
[ $status -eq 1 ]
262263
}
263264

264-
@test "docker image polyscopex" {
265-
run main -v 10.7.0 -t
266-
echo "$output"
267-
image=$(echo "$output" | tail -n1 | awk '{ print $NF }')
268-
[ $status -eq 0 ]
269-
[ "$image" == "universalrobots/ursim_polyscopex:0.12.159" ]
270-
}
271-
272265
@test "docker image cb3 latest" {
273266
run main -m ur3 -t
274267
echo "$output"

0 commit comments

Comments
 (0)