Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions scripts/start_ursim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@
CONTAINER_NAME="ursim"
TEST_RUN=false

# TODO: Add support for more URSim PolyScopeX versions once released
# The PolyScopeX URSim containers follow the SDK versioning scheme. This maps those to marketing
# versions
declare -Ag POLYSCOPE_X_MAP=( ["10.7.0"]="0.12.159"
["10.8.0"]="0.13.124"
["10.9.0"]="0.14.47")

help()
{
# Display Help
Expand Down Expand Up @@ -205,8 +198,8 @@
fi
;;
polyscopex)
if [[ ! "${POLYSCOPE_X_MAP[${URSIM_VERSION_CHECK}]+_}" ]]; then
echo "URSim version $URSIM_VERSION_CHECK is unfortunately not supported"
if ! verlte "$MIN_POLYSCOPE_X" "$URSIM_VERSION_CHECK"; then
echo "PolyscopeX is only supported from version $MIN_POLYSCOPE_X onwards"
exit 1
fi
if [[ $ROBOT_MODEL != @(ur3e|ur5e|ur7e|ur10e|ur12e|ur16e|ur15|ur20|ur30) ]]; then
Expand Down Expand Up @@ -285,7 +278,7 @@
post_setup_polyscopex()
{

if [[ "$URSIM_VERSION" == "${POLYSCOPE_X_MAP[10.7.0]}" ]]; then
if [[ "$URSIM_VERSION" == "10.7.0" ]]; then

Check warning on line 281 in scripts/start_ursim.sh

View check run for this annotation

Codecov / codecov/patch

scripts/start_ursim.sh#L281

Added line #L281 was not covered by tests
get_download_url_urcapx 0.1.0
else
get_download_url_urcapx latest
Expand Down Expand Up @@ -434,7 +427,6 @@
DOCKER_ARGS=""

if [ "$ROBOT_SERIES" == "polyscopex" ]; then
URSIM_VERSION=${POLYSCOPE_X_MAP[$URSIM_VERSION]}
DOCKER_ARGS="$DOCKER_ARGS --privileged"
fi

Expand All @@ -456,7 +448,7 @@
PROGRAM_STORAGE=$(realpath "$PROGRAM_STORAGE")

ROBOT_MODEL_CONTROLLER_FLAG=""
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}"
verlte "10.7.0" "$URSIM_VERSION" && verlte "$URSIM_VERSION" "10.8.0" && ROBOT_MODEL_CONTROLLER_FLAG="-e ROBOT_TYPE_CONTROLLER=${ROBOT_MODEL}"

docker_cmd="docker run --rm -d \
--net ursim_net --ip $IP_ADDRESS \
Expand Down
9 changes: 1 addition & 8 deletions tests/test_start_ursim.bats
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
setup_file() {
echo "Pulling latest URSim Docker images for CB3 and PolyScope 5"
docker pull universalrobots/ursim_cb3:latest
docker pull universalrobots/ursim_e-series:latest
}
Expand Down Expand Up @@ -261,14 +262,6 @@ setup() {
[ $status -eq 1 ]
}

@test "docker image polyscopex" {
run main -v 10.7.0 -t
echo "$output"
image=$(echo "$output" | tail -n1 | awk '{ print $NF }')
[ $status -eq 0 ]
[ "$image" == "universalrobots/ursim_polyscopex:0.12.159" ]
}

@test "docker image cb3 latest" {
run main -m ur3 -t
echo "$output"
Expand Down
Loading