diff --git a/.github/actions/build_urcap/Dockerfile b/.github/actions/build_urcap/Dockerfile deleted file mode 100644 index 5a9cc94..0000000 --- a/.github/actions/build_urcap/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -# Container image that runs your code -FROM ubuntu:bionic - -# Copies your code file from your action repository to the filesystem path `/` of the container -COPY entrypoint.sh /entrypoint.sh - -RUN apt-get update && apt-get install -y \ - default-jdk\ - maven\ - unzip\ - dialog\ - sshpass\ - curl - -# Code file to execute when the docker container starts up (`entrypoint.sh`) -ENTRYPOINT ["/entrypoint.sh"] diff --git a/.github/actions/build_urcap/action.yml b/.github/actions/build_urcap/action.yml deleted file mode 100644 index b6dbda0..0000000 --- a/.github/actions/build_urcap/action.yml +++ /dev/null @@ -1,6 +0,0 @@ -# action.yml -name: 'Build URCap' -description: 'Builds a URCap in a container' -runs: - using: 'docker' - image: 'Dockerfile' diff --git a/.github/actions/build_urcap/entrypoint.sh b/.github/actions/build_urcap/entrypoint.sh deleted file mode 100755 index 08f0583..0000000 --- a/.github/actions/build_urcap/entrypoint.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -e - -SDK_MAJOR=$(echo ${SDK_VERSION} | awk -F. '{print $1}') -SDK_MINOR=$(echo ${SDK_VERSION} | awk -F. '{print $2}') -SDK_BUILD=$(echo ${SDK_VERSION} | awk -F. '{print $3}') - -download_folder=$(mktemp -d) -pushd ${download_folder} -curl -o sdk-${SDK_VERSION}.zip https://s3-eu-west-1.amazonaws.com/urplus-developer-site/sdk/sdk-${SDK_VERSION}.zip -mkdir sdk -unzip -q sdk-${SDK_VERSION}.zip -d sdk -if [ "$SDK_MAJOR" -eq 1 ] && [ "$SDK_MINOR" -lt 10 ]; then - cd sdk -else - cd sdk/URCap_SDK-${SDK_VERSION} -fi -./install.sh - -popd - -mvn install diff --git a/.github/dockerursim/.vol/default.installation b/.github/dockerursim/.vol/default.installation index 7cd0e67..cd49183 100644 --- a/.github/dockerursim/.vol/default.installation +++ b/.github/dockerursim/.vol/default.installation @@ -1,4 +1,4 @@ - + @@ -19,8 +19,7 @@ - - + @@ -31,23 +30,11 @@ - + + - - - - - - - - - - - - - - - + + @@ -61,8 +48,51 @@ - +[SafetyIOConfiguration Inputs] +emergencyStopInputA = 255 +emergencyStopInputB = 255 +reducedModeInputA = 255 +reducedModeInputB = 255 +safeguardStopResetInputA = 0 +safeguardStopResetInputB = 1 +threePositionEnablingInputA = 255 +threePositionEnablingInputB = 255 +operationalModeInputA = 255 +operationalModeInputB = 255 +automaticModeSafeguardStopInputA = 255 +automaticModeSafeguardStopInputB = 255 +automaticModeSafeguardStopResetInputA = 255 +automaticModeSafeguardStopResetInputB = 255 +freedriveOnRobotInputA = 255 +freedriveOnRobotInputB = 255 + +[SafetyIOConfiguration Outputs] +systemEmergencyStopOutputA = 255 +systemEmergencyStopOutputB = 255 +robotMovingOutputA = 255 +robotMovingOutputB = 255 +robotNotStoppingOutputA = 255 +robotNotStoppingOutputB = 255 +reducedModeOutputA = 255 +reducedModeOutputB = 255 +notReducedModeOutputA = 255 +notReducedModeOutputB = 255 +safeHomeOutputA = 255 +safeHomeOutputB = 255 +configOut0and1_OSSD = 0 +configOut2and3_OSSD = 0 +configOut4and5_OSSD = 0 +configOut6and7_OSSD = 0 + +[SafetySetup] +verified = true +withPositionLimits = [true, true, true, true, true, true] + +[Safety Checksum] +version = 5.5 +crc = 1475618907 + [SafetyLimits BoundaryPlane0] name = Safety plane 0 displacement = 0.0 @@ -132,20 +162,16 @@ tcpOrientationVector = [0.0, 0.0, 1.0] maximumTcpOrientationDeviation = 3.159045946109736 mode = DISABLED -[WorkpieceConfiguration] -toolSpheres = [[0.0, 0.0, 0.0, 0.0]] -toolSphereNames = [Tool Flange] -toolSphereIDs = [null] -toolDirectionInclination = 0.0 -toolDirectionAzimuth = 0.0 +[MiscConfiguration] +teach_pendant = 1 +euromap67 = 0 [ThreePositionEnabling] useTP3PE = 0 allowManualHighSpeed = 1 -[MiscConfiguration] -teach_pendant = 1 -euromap67 = 0 +[SafeHome] +safeHomePosition = [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0] [SafetyLimits Normal Values] maxTcpSpeed = 1.5 @@ -181,62 +207,40 @@ maxJointPosition = [0.05235987799999986, 0.05235987799999986, 0.0523598779999998 minJointRevolutions = [-2, -2, -2, -2, -2, -2] maxJointRevolutions = [1, 1, 1, 1, 1, 1] -[SafetySetup] -withPositionLimits = [true, true, true, true, true, true] -verified = true - -[Safety Checksum] -version = 5.5 -crc = 1475618907 - -[SafeHome] -safeHomePosition = [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0] - -[SafetyIOConfiguration Inputs] -emergencyStopInputA = 255 -emergencyStopInputB = 255 -reducedModeInputA = 255 -reducedModeInputB = 255 -safeguardStopResetInputA = 0 -safeguardStopResetInputB = 1 -threePositionEnablingInputA = 255 -threePositionEnablingInputB = 255 -operationalModeInputA = 255 -operationalModeInputB = 255 -automaticModeSafeguardStopInputA = 255 -automaticModeSafeguardStopInputB = 255 -automaticModeSafeguardStopResetInputA = 255 -automaticModeSafeguardStopResetInputB = 255 - -[SafetyIOConfiguration Outputs] -systemEmergencyStopOutputA = 255 -systemEmergencyStopOutputB = 255 -robotMovingOutputA = 255 -robotMovingOutputB = 255 -robotNotStoppingOutputA = 255 -robotNotStoppingOutputB = 255 -reducedModeOutputA = 255 -reducedModeOutputB = 255 -notReducedModeOutputA = 255 -notReducedModeOutputB = 255 -safeHomeOutputA = 255 -safeHomeOutputB = 255 -configOut0and1_OSSD = 0 -configOut2and3_OSSD = 0 -configOut4and5_OSSD = 0 -configOut6and7_OSSD = 0 +[WorkpieceConfiguration] +toolSpheres = [[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]] +toolSphereNames = [Tool Flange, DISABLED, DISABLED] +toolSphereIDs = [null, 05cb2fa6-f92a-43e7-9f8f-268f9eb48afd, 05cb2fa6-f92a-43e7-9f8f-268f9eb48afd] +toolDirectionInclination = 0.0 +toolDirectionAzimuth = 0.0 + + + + + + + + + + + + + + + + + + - - - - - - + + + + - + \ No newline at end of file diff --git a/.github/dockerursim/.vol/default.variables b/.github/dockerursim/.vol/default.variables index ddb1239..04d8bd2 100644 --- a/.github/dockerursim/.vol/default.variables +++ b/.github/dockerursim/.vol/default.variables @@ -1,2 +1 @@ -# -#Fri Jun 18 10:27:46 BST 2021 + \ No newline at end of file diff --git a/.github/dockerursim/build_and_run_docker_ursim.sh b/.github/dockerursim/build_and_run_docker_ursim.sh deleted file mode 100755 index ac54b61..0000000 --- a/.github/dockerursim/build_and_run_docker_ursim.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -# Make directory to store the URCap -mkdir ${DIR}/urcaps 2>/dev/null -cp target/externalcontrol-*.jar ${DIR}/urcaps/externalcontrol.jar - -docker run --rm --name="mydockerursim" -d \ - -e ROBOT_MODEL=UR5 \ - --network host \ - -v "${DIR}/.vol":/ursim/programs \ - -v "${DIR}/urcaps":/urcaps \ - --privileged \ - --cpus=1 \ - universalrobots/ursim_e-series diff --git a/.github/helpers/wait_for_dashboard_server.sh b/.github/helpers/wait_for_dashboard_server.sh index cde78d1..6542fd3 100755 --- a/.github/helpers/wait_for_dashboard_server.sh +++ b/.github/helpers/wait_for_dashboard_server.sh @@ -1,11 +1,12 @@ #!/bin/bash -netcat -z 127.0.0.1 29999 -while [ $? -eq 1 ] +expected="Connected: Universal Robots Dashboard Server +Disconnected" +response=$(echo "quit" | netcat -q 1 127.0.0.1 29999) +while [ "$response" != "$expected" ] do echo "Dashboard server not accepting connections..." sleep 3 - netcat -z 127.0.0.1 29999 + response=$(echo "quit" | netcat -q 1 127.0.0.1 29999) done echo "Dashboard server connections are possible." -sleep 5 \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dd13b84..e3fa083 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,5 +1,10 @@ name: Build URCap -on: [push, pull_request] +on: + workflow_dispatch: + pull_request: + push: + branches: + - master jobs: build: @@ -7,19 +12,51 @@ jobs: strategy: fail-fast: false matrix: - SDK_VERSION: [1.6.1, 1.7.0, 1.8.0, 1.9.0] + SDK_VERSION: + - 1.11.0 + - 1.12.0 + - 1.13.0 + - 1.14.0 steps: - - uses: actions/checkout@v1 - - uses: ./.github/actions/build_urcap + - uses: actions/checkout@v4 + - run: | + SDK_MAJOR=$(echo ${SDK_VERSION} | awk -F. '{print $1}') + SDK_MINOR=$(echo ${SDK_VERSION} | awk -F. '{print $2}') + SDK_BUILD=$(echo ${SDK_VERSION} | awk -F. '{print $3}') + sudo apt-get update && sudo apt-get install -y openjdk-8-jdk maven dialog sshpass unzip curl + download_folder=$(mktemp -d) + pushd ${download_folder} + curl -o sdk-${SDK_VERSION}.zip https://s3-eu-west-1.amazonaws.com/urplus-developer-site/sdk/sdk-${SDK_VERSION}.zip + mkdir sdk + unzip -q sdk-${SDK_VERSION}.zip -d sdk + if [ "$SDK_MAJOR" -eq 1 ] && [ "$SDK_MINOR" -eq 10 ]; then + cd sdk/URCap_SDK-${SDK_VERSION} + else + cd sdk + fi + ./install.sh + popd + mvn install env: SDK_VERSION: ${{ matrix.SDK_VERSION }} - - name: Run URSim + - run: docker network create --subnet=192.168.56.0/24 ursim_net + - name: start ursim run: | - .github/dockerursim/build_and_run_docker_ursim.sh + docker run --rm -d \ + -p 29999:29999 \ + -p 30001-30004:30001-30004 \ + -v ${PROGRAM_FOLDER}:/ursim/programs \ + -v ${URCAPS_FOLDER}:/urcaps \ + --net ursim_net --ip 192.168.56.101 \ + --name ursim \ + universalrobots/ursim_e-series:latest + env: + PROGRAM_FOLDER: ./.github/dockerursim/.vol + URCAPS_FOLDER: ./target - name: Install netcat run: | - sudo apt-get update && sudo apt-get install -y netcat + sudo apt-get install -y netcat-openbsd - name: Wait for dashboard client run: | ./.github/helpers/wait_for_dashboard_server.sh @@ -27,7 +64,7 @@ jobs: run: | python3 tests/test_urcap.py - name: Upload urcap_artifact - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: path: target name: external_control_sdk-${{ matrix.SDK_VERSION }}.urcap diff --git a/pom.xml b/pom.xml index e024f05..1eaf8bd 100644 --- a/pom.xml +++ b/pom.xml @@ -52,8 +52,8 @@ maven-compiler-plugin 3.6.0 - 1.6 - 1.6 + 1.8 + 1.8