Skip to content

Commit c35b6cd

Browse files
livanov93destoglAndyZe
authored
Use GitHub Actions, use pre-commit formatting (#56)
* Use GitHub Actions instead of Travis (#54) * Update readme file * rename repos file * Initial configuration * Add CI configuration for dockersim * Added pre-commit config * Comment out the ur-sim ci * Updated build configs * correct tooling version * Updated configs * Linters and formater errors * Reformated all files * Add contributor guidelines to README. Co-authored-by: Denis Štogl <[email protected]> Co-authored-by: Denis Stogl <[email protected]> Co-authored-by: AndyZe <[email protected]>
1 parent a6fe13d commit c35b6cd

File tree

120 files changed

+1551
-834
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+1551
-834
lines changed

.ci.rosinstall

Lines changed: 0 additions & 4 deletions
This file was deleted.

.clang-format

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ AllowAllParametersOfDeclarationOnNextLine: false
88
AllowShortIfStatementsOnASingleLine: false
99
AllowShortLoopsOnASingleLine: false
1010
AllowShortFunctionsOnASingleLine: None
11-
AllowShortLoopsOnASingleLine: false
1211
AlwaysBreakTemplateDeclarations: true
1312
AlwaysBreakBeforeMultilineStrings: false
1413
BreakBeforeBinaryOperators: false
@@ -51,7 +50,7 @@ SpaceAfterCStyleCast: false
5150
BreakBeforeBraces: Custom
5251

5352
# Control of individual brace wrapping cases
54-
BraceWrapping: {
53+
BraceWrapping:
5554
AfterCaseLabel: 'true'
5655
AfterClass: 'true'
5756
AfterControlStatement: 'true'
@@ -63,5 +62,4 @@ BraceWrapping: {
6362
BeforeCatch : 'true'
6463
BeforeElse : 'true'
6564
IndentBraces : 'false'
66-
}
6765
...
2 KB
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#
2+
#Thu May 28 16:20:13 BST 2020
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/ursim/programs.UR5

.github/dockerursim/Dockerfile

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# MIT License
2+
#
3+
# Original from https://github.com/ahobsonsayers/DockURSim
4+
# Copyright (c) 2019 Arran Hobson Sayers
5+
#
6+
# Permission is hereby granted, free of charge, to any person obtaining a copy
7+
# of this software and associated documentation files (the "Software"), to deal
8+
# in the Software without restriction, including without limitation the rights
9+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
# copies of the Software, and to permit persons to whom the Software is
11+
# furnished to do so, subject to the following conditions:
12+
#
13+
# The above copyright notice and this permission notice shall be included in all
14+
# copies or substantial portions of the Software.
15+
#
16+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
# SOFTWARE.
23+
24+
FROM lsiobase/guacgui:latest
25+
26+
# Set Version Information
27+
ARG BUILD_DATE="15/08/19"
28+
ARG VERSION="5.8.0.10253"
29+
LABEL build_version="URSim Version: ${VERSION} Build Date: ${BUILD_DATE}"
30+
LABEL maintainer="Arran Hobson Sayers"
31+
LABEL MAINTAINER="Arran Hobson Sayers"
32+
ENV APPNAME="URSim"
33+
34+
# Set Timezone
35+
ARG TZ="Europe/London"
36+
ENV TZ ${TZ}
37+
38+
# Setup Environment
39+
ENV DEBIAN_FRONTEND noninteractive
40+
41+
# Set Home Directory
42+
ENV HOME /ursim
43+
44+
# Set robot model - Can be UR3, UR5 or UR10
45+
ENV ROBOT_MODEL UR5
46+
47+
RUN \
48+
echo "**** Installing Dependencies ****" && \
49+
apt-get update && \
50+
apt-get install -qy --no-install-recommends \
51+
openjdk-8-jre psmisc && \
52+
# Change java alternatives so we use openjdk8 (required by URSim) not openjdk11 that comes with guacgui
53+
update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 10000
54+
55+
# Setup JAVA_HOME
56+
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
57+
58+
RUN \
59+
echo "**** Downloading URSim ****" && \
60+
# Make sure we are in the root
61+
cd / && \
62+
# Download URSim Linux tar.gz
63+
curl https://s3-eu-west-1.amazonaws.com/ur-support-site/69987/URSim_Linux-5.8.0.10253.tar.gz -o URSim-Linux.tar.gz && \
64+
#curl https://s3-eu-west-1.amazonaws.com/ur-support-site/54411/URSim_Linux-5.4.2.76197.tar.gz -o URSim-Linux.tar.gz && \
65+
# Extract tarball
66+
tar xvzf URSim-Linux.tar.gz && \
67+
#Remove the tarball
68+
rm URSim-Linux.tar.gz && \
69+
# Rename the URSim folder to just ursim
70+
mv /ursim* /ursim
71+
72+
RUN \
73+
echo "**** Installing URSim ****" && \
74+
# cd to ursim folder
75+
cd /ursim && \
76+
# Make URControl and all sh files executable
77+
chmod +x ./*.sh ./URControl && \
78+
#
79+
# Stop install of unnecessary packages and install required ones quietly
80+
sed -i 's|apt-get -y install|apt-get -qy install --no-install-recommends|g' ./install.sh && \
81+
# Skip xterm command. We dont have a desktop
82+
sed -i 's|tty -s|(exit 0)|g' install.sh && \
83+
# Skip Check of Java Version as we have the correct installed and the command will fail
84+
sed -i 's|needToInstallJava$|(exit 0)|g' install.sh && \
85+
# Skip install of desktop shortcuts - we dont have a desktop
86+
sed -i '/for TYPE in UR3 UR5 UR10/,$ d' ./install.sh && \
87+
# Remove commands that are not relevant on docker as we are root user
88+
sed -i 's|pkexec ||g' ./install.sh && \
89+
sed -i 's|sudo ||g' ./install.sh && \
90+
sed -i 's|sudo ||g' ./ursim-certificate-check.sh && \
91+
#
92+
# Install URSim
93+
./install.sh && \
94+
#
95+
echo "Installed URSim"
96+
97+
RUN \
98+
echo "**** Clean Up ****" && \
99+
rm -rf \
100+
/tmp/* \
101+
/var/lib/apt/lists/* \
102+
/var/tmp/*
103+
104+
# Copy ursim run service script
105+
COPY ursim /etc/services.d/ursim
106+
COPY safety.conf.UR5 /ursim/.urcontrol/
107+
# Expose ports
108+
# Guacamole web browser viewer
109+
EXPOSE 8080
110+
# VNC viewer
111+
EXPOSE 3389
112+
# Modbus Port
113+
EXPOSE 502
114+
# Interface Ports
115+
EXPOSE 29999
116+
EXPOSE 30001-30004
117+
118+
# Mount Volumes
119+
VOLUME /ursim
120+
121+
ENTRYPOINT ["/init"]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4+
5+
docker network create --subnet=192.168.0.0/16 static_test_net
6+
7+
docker build ${DIR} -t mydockerursim
8+
docker volume create dockerursim
9+
docker run --name="mydockerursim" -d \
10+
-e ROBOT_MODEL=UR5 \
11+
--net static_test_net \
12+
--ip 192.168.56.101 \
13+
-p 8080:8080 \
14+
-p 29999:29999 \
15+
-p 30001-30004:30001-30004 \
16+
-v "${DIR}/.vol":/ursim/programs \
17+
-v dockursim:/ursim \
18+
--privileged \
19+
--cpus=1 \
20+
mydockerursim
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Beware: This file is auto-generated from PolyScope.
2+
# NOTE: The SafetyParameters section is protected by a CRC checksum, please use the supplied tool
3+
4+
## SafetyParameters ##
5+
[NormalModeSafetyLimits]
6+
maxTcpSpeed = 1.5
7+
maxForce = 150.0
8+
maxElbowSpeed = 1.5
9+
maxElbowForce = 150.0
10+
maxStoppingDistance = 0.5
11+
maxStoppingTime = 0.4
12+
maxPower = 300.0
13+
maxMomentum = 25.0
14+
maxJointSpeed = [3.3415926, 3.3415926, 3.3415926, 3.3415926, 3.3415926, 3.3415926]
15+
minJointPosition = [6.2308254, 6.2308254, 6.2308254, 6.2308254, 6.2308254, 6.2308254]
16+
maxJointPosition = [0.05235988, 0.05235988, 0.05235988, 0.05235988, 0.05235988, 0.05235988]
17+
minJointRevolutions = [-2, -2, -2, -2, -2, -2]
18+
maxJointRevolutions = [1, 1, 1, 1, 1, 1]
19+
plane0 = [0.0, 0.0, 0.0, 0.0, 0]
20+
plane1 = [0.0, 0.0, 0.0, 0.0, 0]
21+
plane2 = [0.0, 0.0, 0.0, 0.0, 0]
22+
plane3 = [0.0, 0.0, 0.0, 0.0, 0]
23+
plane4 = [0.0, 0.0, 0.0, 0.0, 0]
24+
plane5 = [0.0, 0.0, 0.0, 0.0, 0]
25+
plane6 = [0.0, 0.0, 0.0, 0.0, 0]
26+
plane7 = [0.0, 0.0, 0.0, 0.0, 0]
27+
tcpOrientationVector = [0.0, 0.0, 1.0]
28+
maximumTcpOrientationDeviation = 6.2831855
29+
30+
[ReducedModeSafetyLimits]
31+
maxTcpSpeed = 0.75
32+
maxForce = 120.0
33+
maxElbowSpeed = 0.75
34+
maxElbowForce = 120.0
35+
maxStoppingDistance = 0.3
36+
maxStoppingTime = 0.3
37+
maxPower = 200.0
38+
maxMomentum = 10.0
39+
maxJointSpeed = [3.3415926, 3.3415926, 3.3415926, 3.3415926, 3.3415926, 3.3415926]
40+
minJointPosition = [6.2308254, 6.2308254, 6.2308254, 6.2308254, 6.2308254, 6.2308254]
41+
maxJointPosition = [0.05235988, 0.05235988, 0.05235988, 0.05235988, 0.05235988, 0.05235988]
42+
minJointRevolutions = [-2, -2, -2, -2, -2, -2]
43+
maxJointRevolutions = [1, 1, 1, 1, 1, 1]
44+
plane0 = [0.0, 0.0, 0.0, 0.0, 0]
45+
plane1 = [0.0, 0.0, 0.0, 0.0, 0]
46+
plane2 = [0.0, 0.0, 0.0, 0.0, 0]
47+
plane3 = [0.0, 0.0, 0.0, 0.0, 0]
48+
plane4 = [0.0, 0.0, 0.0, 0.0, 0]
49+
plane5 = [0.0, 0.0, 0.0, 0.0, 0]
50+
plane6 = [0.0, 0.0, 0.0, 0.0, 0]
51+
plane7 = [0.0, 0.0, 0.0, 0.0, 0]
52+
tcpOrientationVector = [0.0, 0.0, 1.0]
53+
maximumTcpOrientationDeviation = 6.2831855
54+
55+
[MiscConfiguration]
56+
teach_pendant = 1
57+
euromap67 = 0
58+
59+
[SafetyIOConfiguration]
60+
emergencyStopInputA = 255
61+
emergencyStopInputB = 255
62+
reducedModeInputA = 255
63+
reducedModeInputB = 255
64+
safeguardStopResetInputA = 0
65+
safeguardStopResetInputB = 1
66+
threePositionEnablingInputA = 255
67+
threePositionEnablingInputB = 255
68+
operationalModeInputA = 255
69+
operationalModeInputB = 255
70+
systemEmergencyStopOutputA = 255
71+
systemEmergencyStopOutputB = 255
72+
robotMovingOutputA = 255
73+
robotMovingOutputB = 255
74+
robotNotStoppingOutputA = 255
75+
robotNotStoppingOutputB = 255
76+
reducedModeOutputA = 255
77+
reducedModeOutputB = 255
78+
notReducedModeOutputA = 255
79+
notReducedModeOutputB = 255
80+
81+
[ReducedModeTriggerPlanes]
82+
plane0 = [0.0, 0.0, 0.0, 0.0, 0]
83+
plane1 = [0.0, 0.0, 0.0, 0.0, 0]
84+
plane2 = [0.0, 0.0, 0.0, 0.0, 0]
85+
plane3 = [0.0, 0.0, 0.0, 0.0, 0]
86+
plane4 = [0.0, 0.0, 0.0, 0.0, 0]
87+
plane5 = [0.0, 0.0, 0.0, 0.0, 0]
88+
plane6 = [0.0, 0.0, 0.0, 0.0, 0]
89+
plane7 = [0.0, 0.0, 0.0, 0.0, 0]
90+
91+
[WorkpieceConfiguration]
92+
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]]
93+
toolDirectionInclination = 0.0
94+
toolDirectionAzimuth = 0.0
95+
96+
97+
## SafetyParameters ##
98+
[Checksum]
99+
safetyParameters = 3478627865
100+
majorVersion = 5
101+
minorVersion = 0

.github/dockerursim/ursim/run

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/execlineb -P
2+
3+
s6-envdir -fn -- /var/run/s6/container_environment
4+
importas -i ROBOT_MODEL ROBOT_MODEL
5+
6+
# Redirect stderr to stdout.
7+
fdmove -c 2 1
8+
9+
# Wait until openbox is running
10+
if { s6-svwait -t 10000 -U /var/run/s6/services/openbox/ }
11+
12+
# Set env
13+
s6-env DISPLAY=:1
14+
15+
# Execute URSim
16+
/ursim/start-ursim.sh ${ROBOT_MODEL}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build Source
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- develop
7+
schedule:
8+
# Run every morning to detect flakiness and broken dependencies
9+
- cron: '43 1 * * *'
10+
11+
jobs:
12+
source:
13+
name: source build
14+
runs-on: ubuntu-20.04
15+
strategy:
16+
fail-fast: false
17+
steps:
18+
- uses: ros-tooling/[email protected]
19+
- uses: ros-tooling/[email protected]
20+
with:
21+
target-ros2-distro: foxy
22+
# build all packages listed in the meta package
23+
package-name:
24+
Universal_Robots_ROS2_Driver
25+
vcs-repo-file-url: |
26+
https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos
27+
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/Universal_Robots_ROS2_Driver.repos
28+
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
29+
- uses: actions/upload-artifact@v1
30+
with:
31+
name: colcon-logs-${{ matrix.os }}
32+
path: ros_ws/log

0 commit comments

Comments
 (0)