Skip to content

Commit 262a912

Browse files
authored
Merge pull request #2 from urfeex/win-build
Merge upstream main and format code
2 parents 26d0553 + c5844e1 commit 262a912

File tree

107 files changed

+4536
-1420
lines changed

Some content is hidden

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

107 files changed

+4536
-1420
lines changed

.clang-format

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,64 @@
11
---
2-
BasedOnStyle: Google
32
AccessModifierOffset: -2
4-
ConstructorInitializerIndentWidth: 2
53
AlignEscapedNewlinesLeft: false
64
AlignTrailingComments: true
75
AllowAllParametersOfDeclarationOnNextLine: false
6+
AllowShortFunctionsOnASingleLine: None
87
AllowShortIfStatementsOnASingleLine: false
98
AllowShortLoopsOnASingleLine: false
10-
AllowShortFunctionsOnASingleLine: None
11-
AlwaysBreakTemplateDeclarations: true
129
AlwaysBreakBeforeMultilineStrings: false
10+
AlwaysBreakTemplateDeclarations: true
11+
BasedOnStyle: Google
12+
BinPackParameters: true
13+
14+
BraceWrapping: # Control of individual brace wrapping cases
15+
AfterCaseLabel: 'true'
16+
AfterClass: 'true'
17+
AfterControlStatement: 'true'
18+
AfterEnum: 'true'
19+
AfterFunction: 'true'
20+
AfterNamespace: 'true'
21+
AfterStruct: 'true'
22+
AfterUnion: 'true'
23+
BeforeCatch: 'true'
24+
BeforeElse: 'true'
25+
IndentBraces: 'false'
26+
1327
BreakBeforeBinaryOperators: false
1428
BreakBeforeTernaryOperators: false
1529
BreakConstructorInitializersBeforeComma: true
16-
BinPackParameters: true
17-
ColumnLimit: 120
30+
BreakBeforeBraces: Custom # Configure each individual brace in BraceWrapping
31+
32+
ColumnLimit: 120
1833
ConstructorInitializerAllOnOneLineOrOnePerLine: true
34+
ConstructorInitializerIndentWidth: 2
35+
ContinuationIndentWidth: 4
36+
Cpp11BracedListStyle: false
1937
DerivePointerBinding: false
20-
PointerBindsToType: true
2138
ExperimentalAutoDetectBinPacking: false
2239
IndentCaseLabels: true
40+
IndentFunctionDeclarationAfterType: false
41+
IndentPPDirectives: AfterHash
42+
IndentWidth: 2
2343
MaxEmptyLinesToKeep: 1
2444
NamespaceIndentation: None
2545
ObjCSpaceBeforeProtocolList: true
2646
PenaltyBreakBeforeFirstCallParameter: 19
2747
PenaltyBreakComment: 60
28-
PenaltyBreakString: 1
2948
PenaltyBreakFirstLessLess: 1000
49+
PenaltyBreakString: 1
3050
PenaltyExcessCharacter: 1000
3151
PenaltyReturnTypeOnItsOwnLine: 90
32-
SpacesBeforeTrailingComments: 2
33-
Cpp11BracedListStyle: false
34-
Standard: Auto
35-
IndentWidth: 2
36-
TabWidth: 2
37-
UseTab: Never
38-
IndentFunctionDeclarationAfterType: false
39-
SpacesInParentheses: false
40-
SpacesInAngles: false
41-
SpaceInEmptyParentheses: false
42-
SpacesInCStyleCastParentheses: false
43-
SpaceAfterControlStatementKeyword: true
44-
SpaceBeforeAssignmentOperators: true
45-
ContinuationIndentWidth: 4
52+
PointerBindsToType: true
4653
SortIncludes: false
4754
SpaceAfterCStyleCast: false
48-
49-
# Configure each individual brace in BraceWrapping
50-
BreakBeforeBraces: Custom
51-
52-
# Control of individual brace wrapping cases
53-
BraceWrapping: {
54-
AfterCaseLabel: 'true'
55-
AfterClass: 'true'
56-
AfterControlStatement: 'true'
57-
AfterEnum : 'true'
58-
AfterFunction : 'true'
59-
AfterNamespace : 'true'
60-
AfterStruct : 'true'
61-
AfterUnion : 'true'
62-
BeforeCatch : 'true'
63-
BeforeElse : 'true'
64-
IndentBraces : 'false'
65-
}
66-
...
55+
SpaceAfterControlStatementKeyword: true
56+
SpaceBeforeAssignmentOperators: true
57+
SpaceInEmptyParentheses: false
58+
SpacesBeforeTrailingComments: 2
59+
SpacesInAngles: false
60+
SpacesInCStyleCastParentheses: false
61+
SpacesInParentheses: false
62+
Standard: Auto
63+
TabWidth: 2
64+
UseTab: Never

.github/helpers/check_urls.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ urls=$(grep -oP '(http|ftp|https):\/\/([a-zA-Z0-9_-]+(?:(?:\.[a-zA-Z0-9_-]+)+))(
3838
fail_counter=0
3939

4040
FAILED_LINKS=()
41+
CHECKED_LINKS=()
4142
for item in $urls; do
4243
# echo $item
4344
skip=0
@@ -53,15 +54,18 @@ for item in $urls; do
5354
filename=$(echo "$item" | cut -d':' -f1)
5455
url=$(echo "$item" | cut -d':' -f2-)
5556
echo -n "Checking $url from file $filename"
56-
if ! curl --head --silent --fail "$url" 2>&1 > /dev/null; then
57-
echo -e " \033[0;31mNOT FOUND\033[32m\n"
57+
if [[ $(echo ${CHECKED_LINKS[@]} | fgrep -w $url) ]]; then
58+
echo -e " \033[36malready checked\033[0m"
59+
elif ! curl --head --silent --fail "$url" 2>&1 > /dev/null; then
60+
echo -e " \033[0;31mNOT FOUND\033[0m"
5861
FAILED_LINKS+=("$url from file $filename")
5962
((fail_counter=fail_counter+1))
6063
else
61-
printf " \033[32mok\033[0m\n"
64+
echo -e " \033[32mok\033[0m"
6265
fi
66+
CHECKED_LINKS+=("$url")
6367
done
6468

6569
echo "Failed files:"
6670
printf '%s\n' "${FAILED_LINKS[@]}"
67-
exit $fail_counter
71+
exit $fail_counter

.github/workflows/ci.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- main
7+
- master
8+
schedule:
9+
- cron: '38 2 * * *'
810

911
jobs:
1012
build:
@@ -15,22 +17,13 @@ jobs:
1517
fail-fast: false
1618
matrix:
1719
env:
18-
- DOCKER_RUN_OPTS: --network ursim_net
19-
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 192.168.56.101'
20-
CTEST_OUTPUT_ON_FAILURE: 1
21-
ROBOT_MODEL: 'ur5'
20+
- ROBOT_MODEL: 'ur5'
2221
URSIM_VERSION: '3.14.3'
2322
PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/cb3'
24-
- DOCKER_RUN_OPTS: --network ursim_net
25-
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 192.168.56.101'
26-
CTEST_OUTPUT_ON_FAILURE: 1
27-
ROBOT_MODEL: 'ur5e'
23+
- ROBOT_MODEL: 'ur5e'
2824
URSIM_VERSION: '5.9.4'
2925
PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/e-series'
30-
- DOCKER_RUN_OPTS: --network ursim_net
31-
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 192.168.56.101'
32-
CTEST_OUTPUT_ON_FAILURE: 1
33-
ROBOT_MODEL: 'ur20'
26+
- ROBOT_MODEL: 'ur20'
3427
URSIM_VERSION: 'latest'
3528
PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/e-series'
3629

@@ -39,7 +32,11 @@ jobs:
3932
- name: start ursim
4033
run: |
4134
scripts/start_ursim.sh -m $ROBOT_MODEL -v $URSIM_VERSION -p $PROGRAM_FOLDER -d
42-
env: ${{matrix.env}}
35+
env:
36+
DOCKER_RUN_OPTS: --network ursim_net
37+
ROBOT_MODEL: ${{matrix.env.ROBOT_MODEL}}
38+
URSIM_VERSION: ${{matrix.env.URSIM_VERSION}}
39+
PROGRAM_FOLDER: ${{matrix.env.PROGRAM_FOLDER}}
4340
- name: configure
4441
run: mkdir build && cd build && cmake .. -DBUILDING_TESTS=1 -DINTEGRATION_TESTS=1 -DWITH_ASAN=ON
4542
env:
@@ -51,7 +48,13 @@ jobs:
5148
- name: Create folder for test artifacts
5249
run: mkdir -p test_artifacts
5350
- name: test
54-
run: cd build && ctest --output-on-failure
51+
run: cd build && ctest --output-on-failure --output-junit junit.xml
52+
- name: Upload test results to Codecov
53+
if: ${{ !cancelled() }}
54+
uses: codecov/test-results-action@v1
55+
with:
56+
token: ${{ secrets.CODECOV_TOKEN }}
57+
fail_ci_if_error: true
5558
- name: run examples
5659
run: ./run_examples.sh "192.168.56.101" 1
5760
- name: install gcovr
@@ -63,6 +66,7 @@ jobs:
6366
with:
6467
fail_ci_if_error: true
6568
token: ${{ secrets.CODECOV_TOKEN }}
69+
flags: ${{ matrix.env.ROBOT_MODEL }}-${{ matrix.env.URSIM_VERSION }}
6670
- name: Generate URSim log files
6771
if: always()
6872
run: |
@@ -103,5 +107,5 @@ jobs:
103107
run: |
104108
.github/helpers/check_urls.sh \
105109
-d ".git build CMakeModules debian" \
106-
-f "package.xml urcl_architecture.svg trajectory_interface.svg dataflow.graphml start_ursim.sh" \
110+
-f "package.xml urcl_architecture.svg trajectory_interface.svg dataflow.graphml start_ursim.sh ursim_docker.rst" \
107111
-p "vnc\.html opensource\.org\/licenses\/BSD-3-Clause kernel\.org\/pub\/linux\/kernel"

3rdparty/endian/endian.h

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -16,88 +16,88 @@
1616

1717
// Byte order
1818
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__CYGWIN__)
19-
# include <endian.h>
19+
# include <endian.h>
2020
#elif defined(__APPLE__)
21-
# include <libkern/OSByteOrder.h>
21+
# include <libkern/OSByteOrder.h>
2222

23-
# define htobe16(x) OSSwapHostToBigInt16(x)
24-
# define htole16(x) OSSwapHostToLittleInt16(x)
25-
# define be16toh(x) OSSwapBigToHostInt16(x)
26-
# define le16toh(x) OSSwapLittleToHostInt16(x)
23+
# define htobe16(x) OSSwapHostToBigInt16(x)
24+
# define htole16(x) OSSwapHostToLittleInt16(x)
25+
# define be16toh(x) OSSwapBigToHostInt16(x)
26+
# define le16toh(x) OSSwapLittleToHostInt16(x)
2727

28-
# define htobe32(x) OSSwapHostToBigInt32(x)
29-
# define htole32(x) OSSwapHostToLittleInt32(x)
30-
# define be32toh(x) OSSwapBigToHostInt32(x)
31-
# define le32toh(x) OSSwapLittleToHostInt32(x)
28+
# define htobe32(x) OSSwapHostToBigInt32(x)
29+
# define htole32(x) OSSwapHostToLittleInt32(x)
30+
# define be32toh(x) OSSwapBigToHostInt32(x)
31+
# define le32toh(x) OSSwapLittleToHostInt32(x)
3232

33-
# define htobe64(x) OSSwapHostToBigInt64(x)
34-
# define htole64(x) OSSwapHostToLittleInt64(x)
35-
# define be64toh(x) OSSwapBigToHostInt64(x)
36-
# define le64toh(x) OSSwapLittleToHostInt64(x)
33+
# define htobe64(x) OSSwapHostToBigInt64(x)
34+
# define htole64(x) OSSwapHostToLittleInt64(x)
35+
# define be64toh(x) OSSwapBigToHostInt64(x)
36+
# define le64toh(x) OSSwapLittleToHostInt64(x)
3737

38-
# define __BYTE_ORDER BYTE_ORDER
39-
# define __BIG_ENDIAN BIG_ENDIAN
40-
# define __LITTLE_ENDIAN LITTLE_ENDIAN
41-
# define __PDP_ENDIAN PDP_ENDIAN
38+
# define __BYTE_ORDER BYTE_ORDER
39+
# define __BIG_ENDIAN BIG_ENDIAN
40+
# define __LITTLE_ENDIAN LITTLE_ENDIAN
41+
# define __PDP_ENDIAN PDP_ENDIAN
4242
#elif defined(__OpenBSD__)
43-
# include <sys/endian.h>
43+
# include <sys/endian.h>
4444
#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
45-
# include <sys/endian.h>
45+
# include <sys/endian.h>
4646

47-
# define be16toh(x) betoh16(x)
48-
# define le16toh(x) letoh16(x)
47+
# define be16toh(x) betoh16(x)
48+
# define le16toh(x) letoh16(x)
4949

50-
# define be32toh(x) betoh32(x)
51-
# define le32toh(x) letoh32(x)
50+
# define be32toh(x) betoh32(x)
51+
# define le32toh(x) letoh32(x)
5252

53-
# define be64toh(x) betoh64(x)
54-
# define le64toh(x) letoh64(x)
53+
# define be64toh(x) betoh64(x)
54+
# define le64toh(x) letoh64(x)
5555
#elif defined(_WIN32)
56-
# include <stdlib.h>
57-
# if BYTE_ORDER == LITTLE_ENDIAN
58-
# if defined(_MSC_VER)
59-
# define htobe16(x) _byteswap_ushort(x)
60-
# define htole16(x) (x)
61-
# define be16toh(x) _byteswap_ushort(x)
62-
# define le16toh(x) (x)
56+
# include <stdlib.h>
57+
# if BYTE_ORDER == LITTLE_ENDIAN
58+
# if defined(_MSC_VER)
59+
# define htobe16(x) _byteswap_ushort(x)
60+
# define htole16(x) (x)
61+
# define be16toh(x) _byteswap_ushort(x)
62+
# define le16toh(x) (x)
6363

64-
# define htobe32(x) _byteswap_ulong(x)
65-
# define htole32(x) (x)
66-
# define be32toh(x) _byteswap_ulong(x)
67-
# define le32toh(x) (x)
64+
# define htobe32(x) _byteswap_ulong(x)
65+
# define htole32(x) (x)
66+
# define be32toh(x) _byteswap_ulong(x)
67+
# define le32toh(x) (x)
6868

69-
# define htobe64(x) _byteswap_uint64(x)
70-
# define htole64(x) (x)
71-
# define be64toh(x) _byteswap_uint64(x)
72-
# define le64toh(x) (x)
73-
# elif defined(__GNUC__) || defined(__clang__)
74-
# define htobe16(x) __builtin_bswap16(x)
75-
# define htole16(x) (x)
76-
# define be16toh(x) __builtin_bswap16(x)
77-
# define le16toh(x) (x)
69+
# define htobe64(x) _byteswap_uint64(x)
70+
# define htole64(x) (x)
71+
# define be64toh(x) _byteswap_uint64(x)
72+
# define le64toh(x) (x)
73+
# elif defined(__GNUC__) || defined(__clang__)
74+
# define htobe16(x) __builtin_bswap16(x)
75+
# define htole16(x) (x)
76+
# define be16toh(x) __builtin_bswap16(x)
77+
# define le16toh(x) (x)
7878

79-
# define htobe32(x) __builtin_bswap32(x)
80-
# define htole32(x) (x)
81-
# define be32toh(x) __builtin_bswap32(x)
82-
# define le32toh(x) (x)
79+
# define htobe32(x) __builtin_bswap32(x)
80+
# define htole32(x) (x)
81+
# define be32toh(x) __builtin_bswap32(x)
82+
# define le32toh(x) (x)
8383

84-
# define htobe64(x) __builtin_bswap64(x)
85-
# define htole64(x) (x)
86-
# define be64toh(x) __builtin_bswap64(x)
87-
# define le64toh(x) (x)
88-
# else
89-
# error Compiler is not supported
90-
# endif
91-
# else
92-
# error Byte order is not supported
93-
# endif
84+
# define htobe64(x) __builtin_bswap64(x)
85+
# define htole64(x) (x)
86+
# define be64toh(x) __builtin_bswap64(x)
87+
# define le64toh(x) (x)
88+
# else
89+
# error Compiler is not supported
90+
# endif
91+
# else
92+
# error Byte order is not supported
93+
# endif
9494

95-
# define __BYTE_ORDER BYTE_ORDER
96-
# define __BIG_ENDIAN BIG_ENDIAN
97-
# define __LITTLE_ENDIAN LITTLE_ENDIAN
98-
# define __PDP_ENDIAN PDP_ENDIAN
95+
# define __BYTE_ORDER BYTE_ORDER
96+
# define __BIG_ENDIAN BIG_ENDIAN
97+
# define __LITTLE_ENDIAN LITTLE_ENDIAN
98+
# define __PDP_ENDIAN PDP_ENDIAN
9999
#else
100-
# error Platform is not supported
100+
# error Platform is not supported
101101
#endif
102102

103-
#endif // PORTABLE_ENDIAN_H__
103+
#endif // PORTABLE_ENDIAN_H__

CHANGELOG.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22
Changelog for package ur_client_library
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
1.6.0 (2025-01-23)
6+
------------------
7+
* Do not throw exception in DashboardClient::sendRequest (`#249 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/249>`_)
8+
* Add instruction executor for high-level robot control (`#242 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/242>`_)
9+
* Modernize cmake (`#244 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/244>`_)
10+
* Update links to dashboard server documentation (`#243 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/243>`_)
11+
* Trajectory point velocities and example (`#241 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/241>`_)
12+
* Updated documentation (`#228 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/228>`_)
13+
* Update ci (`#239 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/239>`_)
14+
* Enable force mode compatibility with various move types (`#230 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/230>`_)
15+
* Update package maintainers (`#238 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/238>`_)
16+
* Bump codecov/codecov-action from 3 to 5 (`#234 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/234>`_)
17+
* Remove the not regarding MIT license (`#237 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/237>`_)
18+
* Bump pre-commit/action from 3.0.0 to 3.0.1 (`#236 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/236>`_)
19+
* Bump actions/checkout from 1 to 4 (`#232 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/232>`_)
20+
* Bump actions/setup-python from 4 to 5 (`#235 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/235>`_)
21+
* Bump actions/upload-artifact from 3 to 4 (`#233 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/233>`_)
22+
* Add dependabot configuration to update actions (`#231 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/231>`_)
23+
* Contributors: Felix Exner, Rune Søe-Knudsen, dependabot[bot]
24+
525
1.5.0 (2024-11-25)
626
------------------
727
* Adapt RTDE output recipe based on robot response (`#221 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/221>`_)

0 commit comments

Comments
 (0)