Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f3ea4e7
Add instruction executor for high-level robot control (#242)
urfeex Jan 23, 2025
09c6908
Do not throw exception in DashboardClient::sendRequest (#249)
urfeex Jan 23, 2025
b5dae63
Update changelog for upcoming release
urfeex Jan 23, 2025
798b55b
1.6.0
urfeex Jan 23, 2025
2bab046
Add more information about acceleration/velocity parametrization in t…
urfeex Jan 24, 2025
0f6b513
Move setup instructions to ur_client_library (#248)
urfeex Jan 27, 2025
fd2a938
Use joint speed for extrapolation rather than differences (#254)
urfeex Jan 30, 2025
3cbe112
Update link to sphinx-doc.org using https (#247)
urfeex Jan 30, 2025
25d81bf
docs: Clarify that the motion functions use script functions for exec…
urfeex Jan 30, 2025
ce779b3
Allow clang-format to indent preprocessor directives (#246)
urfeex Jan 30, 2025
6509961
Add a wrapper to handle all robot setup
urfeex Jan 23, 2025
cb79da8
Use ExampleRobotWrapper in integration tests
urfeex Jan 24, 2025
6aad4ff
Make CI capable to run with urcap
urfeex Jan 27, 2025
5544c98
Fix typo in start_ursim.sh help
urfeex Jan 29, 2025
fd2fda3
Use EXPECT_NEAR vs EXPECT_EQ
urfeex Jan 27, 2025
f4a563e
Update RT setup documentation to point to urcl docs
urfeex Jan 31, 2025
78875f5
Add documentation for all examples
urfeex Jan 21, 2025
edd6e94
Show which example is running in run_examples.sh
urfeex Feb 3, 2025
88d31b9
Update URL check
urfeex Feb 3, 2025
bc404d9
Fix GH edit URL for trajectory_point_interface example (#259)
urfeex Feb 5, 2025
8f7e9cf
Add codecov/test-results-action (#260)
urrsk Feb 6, 2025
c956c83
Fix branch name for integration tests run on push (#262)
urfeex Feb 6, 2025
d348df3
Use coverage flags to distinguish between runs (#261)
urfeex Feb 6, 2025
316b1b3
RTDEClient: pause and stop in destructor only if running (#257)
urfeex Feb 6, 2025
61680ae
Expose diagnostic error codes (#225)
jessica-chen-ocado Feb 7, 2025
b9b9fcf
Enable nightly CI jobs (#263)
urfeex Feb 7, 2025
f717f83
Use ExampleRobotWrapper for initialization in all examples (#265)
urfeex Feb 10, 2025
1ed9667
Use a config struct for initializing UrDriver
urfeex Feb 7, 2025
c380b8e
Disable internal deprecation warning
urfeex Feb 7, 2025
97ad825
Increase dashboard timeout in ExampleRobotWrapper to 10s
urfeex Feb 11, 2025
9890ba7
Fix DashboardClient load program from subdir (#269)
urfeex Feb 18, 2025
886d9e2
Merge remote-tracking branch 'origin/master' into win-build
urfeex Feb 18, 2025
fecb175
Parametrize reconnection time for UrDriver (#266)
urfeex Feb 18, 2025
1c34f75
Merge remote-tracking branch 'origin/master' into win-build
urfeex Feb 18, 2025
cdaaa10
Cast socket::recv arguments only for windows
urfeex Feb 18, 2025
ae18a4c
Prefer using std::this_thread::sleep over platform-specific sleeps
urfeex Feb 18, 2025
c5844e1
revert unnecessary change
urfeex Feb 18, 2025
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
80 changes: 39 additions & 41 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,66 +1,64 @@
---
BasedOnStyle: Google
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 2
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BasedOnStyle: Google
BinPackParameters: true

BraceWrapping: # Control of individual brace wrapping cases
AfterCaseLabel: 'true'
AfterClass: 'true'
AfterControlStatement: 'true'
AfterEnum: 'true'
AfterFunction: 'true'
AfterNamespace: 'true'
AfterStruct: 'true'
AfterUnion: 'true'
BeforeCatch: 'true'
BeforeElse: 'true'
IndentBraces: 'false'

BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true
BinPackParameters: true
ColumnLimit: 120
BreakBeforeBraces: Custom # Configure each individual brace in BraceWrapping

ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerBinding: false
PointerBindsToType: true
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: false
IndentPPDirectives: AfterHash
IndentWidth: 2
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakString: 1
PenaltyBreakFirstLessLess: 1000
PenaltyBreakString: 1
PenaltyExcessCharacter: 1000
PenaltyReturnTypeOnItsOwnLine: 90
SpacesBeforeTrailingComments: 2
Cpp11BracedListStyle: false
Standard: Auto
IndentWidth: 2
TabWidth: 2
UseTab: Never
IndentFunctionDeclarationAfterType: false
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
PointerBindsToType: true
SortIncludes: false
SpaceAfterCStyleCast: false

# Configure each individual brace in BraceWrapping
BreakBeforeBraces: Custom

# Control of individual brace wrapping cases
BraceWrapping: {
AfterCaseLabel: 'true'
AfterClass: 'true'
AfterControlStatement: 'true'
AfterEnum : 'true'
AfterFunction : 'true'
AfterNamespace : 'true'
AfterStruct : 'true'
AfterUnion : 'true'
BeforeCatch : 'true'
BeforeElse : 'true'
IndentBraces : 'false'
}
...
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
Standard: Auto
TabWidth: 2
UseTab: Never
12 changes: 8 additions & 4 deletions .github/helpers/check_urls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ urls=$(grep -oP '(http|ftp|https):\/\/([a-zA-Z0-9_-]+(?:(?:\.[a-zA-Z0-9_-]+)+))(
fail_counter=0

FAILED_LINKS=()
CHECKED_LINKS=()
for item in $urls; do
# echo $item
skip=0
Expand All @@ -53,15 +54,18 @@ for item in $urls; do
filename=$(echo "$item" | cut -d':' -f1)
url=$(echo "$item" | cut -d':' -f2-)
echo -n "Checking $url from file $filename"
if ! curl --head --silent --fail "$url" 2>&1 > /dev/null; then
echo -e " \033[0;31mNOT FOUND\033[32m\n"
if [[ $(echo ${CHECKED_LINKS[@]} | fgrep -w $url) ]]; then
echo -e " \033[36malready checked\033[0m"
elif ! curl --head --silent --fail "$url" 2>&1 > /dev/null; then
echo -e " \033[0;31mNOT FOUND\033[0m"
FAILED_LINKS+=("$url from file $filename")
((fail_counter=fail_counter+1))
else
printf " \033[32mok\033[0m\n"
echo -e " \033[32mok\033[0m"
fi
CHECKED_LINKS+=("$url")
done

echo "Failed files:"
printf '%s\n' "${FAILED_LINKS[@]}"
exit $fail_counter
exit $fail_counter
36 changes: 20 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
pull_request:
push:
branches:
- main
- master
schedule:
- cron: '38 2 * * *'

jobs:
build:
Expand All @@ -15,22 +17,13 @@ jobs:
fail-fast: false
matrix:
env:
- DOCKER_RUN_OPTS: --network ursim_net
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 192.168.56.101'
CTEST_OUTPUT_ON_FAILURE: 1
ROBOT_MODEL: 'ur5'
- ROBOT_MODEL: 'ur5'
URSIM_VERSION: '3.14.3'
PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/cb3'
- DOCKER_RUN_OPTS: --network ursim_net
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 192.168.56.101'
CTEST_OUTPUT_ON_FAILURE: 1
ROBOT_MODEL: 'ur5e'
- ROBOT_MODEL: 'ur5e'
URSIM_VERSION: '5.9.4'
PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/e-series'
- DOCKER_RUN_OPTS: --network ursim_net
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 192.168.56.101'
CTEST_OUTPUT_ON_FAILURE: 1
ROBOT_MODEL: 'ur20'
- ROBOT_MODEL: 'ur20'
URSIM_VERSION: 'latest'
PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/e-series'

Expand All @@ -39,7 +32,11 @@ jobs:
- name: start ursim
run: |
scripts/start_ursim.sh -m $ROBOT_MODEL -v $URSIM_VERSION -p $PROGRAM_FOLDER -d
env: ${{matrix.env}}
env:
DOCKER_RUN_OPTS: --network ursim_net
ROBOT_MODEL: ${{matrix.env.ROBOT_MODEL}}
URSIM_VERSION: ${{matrix.env.URSIM_VERSION}}
PROGRAM_FOLDER: ${{matrix.env.PROGRAM_FOLDER}}
- name: configure
run: mkdir build && cd build && cmake .. -DBUILDING_TESTS=1 -DINTEGRATION_TESTS=1 -DWITH_ASAN=ON
env:
Expand All @@ -51,7 +48,13 @@ jobs:
- name: Create folder for test artifacts
run: mkdir -p test_artifacts
- name: test
run: cd build && ctest --output-on-failure
run: cd build && ctest --output-on-failure --output-junit junit.xml
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: run examples
run: ./run_examples.sh "192.168.56.101" 1
- name: install gcovr
Expand All @@ -63,6 +66,7 @@ jobs:
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ matrix.env.ROBOT_MODEL }}-${{ matrix.env.URSIM_VERSION }}
- name: Generate URSim log files
if: always()
run: |
Expand Down Expand Up @@ -103,5 +107,5 @@ jobs:
run: |
.github/helpers/check_urls.sh \
-d ".git build CMakeModules debian" \
-f "package.xml urcl_architecture.svg trajectory_interface.svg dataflow.graphml start_ursim.sh" \
-f "package.xml urcl_architecture.svg trajectory_interface.svg dataflow.graphml start_ursim.sh ursim_docker.rst" \
-p "vnc\.html opensource\.org\/licenses\/BSD-3-Clause kernel\.org\/pub\/linux\/kernel"
132 changes: 66 additions & 66 deletions 3rdparty/endian/endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,88 +16,88 @@

// Byte order
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__CYGWIN__)
# include <endian.h>
# include <endian.h>
#elif defined(__APPLE__)
# include <libkern/OSByteOrder.h>
# include <libkern/OSByteOrder.h>

# define htobe16(x) OSSwapHostToBigInt16(x)
# define htole16(x) OSSwapHostToLittleInt16(x)
# define be16toh(x) OSSwapBigToHostInt16(x)
# define le16toh(x) OSSwapLittleToHostInt16(x)
# define htobe16(x) OSSwapHostToBigInt16(x)
# define htole16(x) OSSwapHostToLittleInt16(x)
# define be16toh(x) OSSwapBigToHostInt16(x)
# define le16toh(x) OSSwapLittleToHostInt16(x)

# define htobe32(x) OSSwapHostToBigInt32(x)
# define htole32(x) OSSwapHostToLittleInt32(x)
# define be32toh(x) OSSwapBigToHostInt32(x)
# define le32toh(x) OSSwapLittleToHostInt32(x)
# define htobe32(x) OSSwapHostToBigInt32(x)
# define htole32(x) OSSwapHostToLittleInt32(x)
# define be32toh(x) OSSwapBigToHostInt32(x)
# define le32toh(x) OSSwapLittleToHostInt32(x)

# define htobe64(x) OSSwapHostToBigInt64(x)
# define htole64(x) OSSwapHostToLittleInt64(x)
# define be64toh(x) OSSwapBigToHostInt64(x)
# define le64toh(x) OSSwapLittleToHostInt64(x)
# define htobe64(x) OSSwapHostToBigInt64(x)
# define htole64(x) OSSwapHostToLittleInt64(x)
# define be64toh(x) OSSwapBigToHostInt64(x)
# define le64toh(x) OSSwapLittleToHostInt64(x)

# define __BYTE_ORDER BYTE_ORDER
# define __BIG_ENDIAN BIG_ENDIAN
# define __LITTLE_ENDIAN LITTLE_ENDIAN
# define __PDP_ENDIAN PDP_ENDIAN
# define __BYTE_ORDER BYTE_ORDER
# define __BIG_ENDIAN BIG_ENDIAN
# define __LITTLE_ENDIAN LITTLE_ENDIAN
# define __PDP_ENDIAN PDP_ENDIAN
#elif defined(__OpenBSD__)
# include <sys/endian.h>
# include <sys/endian.h>
#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
# include <sys/endian.h>
# include <sys/endian.h>

# define be16toh(x) betoh16(x)
# define le16toh(x) letoh16(x)
# define be16toh(x) betoh16(x)
# define le16toh(x) letoh16(x)

# define be32toh(x) betoh32(x)
# define le32toh(x) letoh32(x)
# define be32toh(x) betoh32(x)
# define le32toh(x) letoh32(x)

# define be64toh(x) betoh64(x)
# define le64toh(x) letoh64(x)
# define be64toh(x) betoh64(x)
# define le64toh(x) letoh64(x)
#elif defined(_WIN32)
# include <stdlib.h>
# if BYTE_ORDER == LITTLE_ENDIAN
# if defined(_MSC_VER)
# define htobe16(x) _byteswap_ushort(x)
# define htole16(x) (x)
# define be16toh(x) _byteswap_ushort(x)
# define le16toh(x) (x)
# include <stdlib.h>
# if BYTE_ORDER == LITTLE_ENDIAN
# if defined(_MSC_VER)
# define htobe16(x) _byteswap_ushort(x)
# define htole16(x) (x)
# define be16toh(x) _byteswap_ushort(x)
# define le16toh(x) (x)

# define htobe32(x) _byteswap_ulong(x)
# define htole32(x) (x)
# define be32toh(x) _byteswap_ulong(x)
# define le32toh(x) (x)
# define htobe32(x) _byteswap_ulong(x)
# define htole32(x) (x)
# define be32toh(x) _byteswap_ulong(x)
# define le32toh(x) (x)

# define htobe64(x) _byteswap_uint64(x)
# define htole64(x) (x)
# define be64toh(x) _byteswap_uint64(x)
# define le64toh(x) (x)
# elif defined(__GNUC__) || defined(__clang__)
# define htobe16(x) __builtin_bswap16(x)
# define htole16(x) (x)
# define be16toh(x) __builtin_bswap16(x)
# define le16toh(x) (x)
# define htobe64(x) _byteswap_uint64(x)
# define htole64(x) (x)
# define be64toh(x) _byteswap_uint64(x)
# define le64toh(x) (x)
# elif defined(__GNUC__) || defined(__clang__)
# define htobe16(x) __builtin_bswap16(x)
# define htole16(x) (x)
# define be16toh(x) __builtin_bswap16(x)
# define le16toh(x) (x)

# define htobe32(x) __builtin_bswap32(x)
# define htole32(x) (x)
# define be32toh(x) __builtin_bswap32(x)
# define le32toh(x) (x)
# define htobe32(x) __builtin_bswap32(x)
# define htole32(x) (x)
# define be32toh(x) __builtin_bswap32(x)
# define le32toh(x) (x)

# define htobe64(x) __builtin_bswap64(x)
# define htole64(x) (x)
# define be64toh(x) __builtin_bswap64(x)
# define le64toh(x) (x)
# else
# error Compiler is not supported
# endif
# else
# error Byte order is not supported
# endif
# define htobe64(x) __builtin_bswap64(x)
# define htole64(x) (x)
# define be64toh(x) __builtin_bswap64(x)
# define le64toh(x) (x)
# else
# error Compiler is not supported
# endif
# else
# error Byte order is not supported
# endif

# define __BYTE_ORDER BYTE_ORDER
# define __BIG_ENDIAN BIG_ENDIAN
# define __LITTLE_ENDIAN LITTLE_ENDIAN
# define __PDP_ENDIAN PDP_ENDIAN
# define __BYTE_ORDER BYTE_ORDER
# define __BIG_ENDIAN BIG_ENDIAN
# define __LITTLE_ENDIAN LITTLE_ENDIAN
# define __PDP_ENDIAN PDP_ENDIAN
#else
# error Platform is not supported
# error Platform is not supported
#endif

#endif // PORTABLE_ENDIAN_H__
#endif // PORTABLE_ENDIAN_H__
20 changes: 20 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
Changelog for package ur_client_library
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.6.0 (2025-01-23)
------------------
* Do not throw exception in DashboardClient::sendRequest (`#249 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/249>`_)
* Add instruction executor for high-level robot control (`#242 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/242>`_)
* Modernize cmake (`#244 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/244>`_)
* Update links to dashboard server documentation (`#243 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/243>`_)
* Trajectory point velocities and example (`#241 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/241>`_)
* Updated documentation (`#228 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/228>`_)
* Update ci (`#239 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/239>`_)
* Enable force mode compatibility with various move types (`#230 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/230>`_)
* Update package maintainers (`#238 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/238>`_)
* Bump codecov/codecov-action from 3 to 5 (`#234 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/234>`_)
* Remove the not regarding MIT license (`#237 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/237>`_)
* Bump pre-commit/action from 3.0.0 to 3.0.1 (`#236 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/236>`_)
* Bump actions/checkout from 1 to 4 (`#232 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/232>`_)
* Bump actions/setup-python from 4 to 5 (`#235 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/235>`_)
* Bump actions/upload-artifact from 3 to 4 (`#233 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/233>`_)
* Add dependabot configuration to update actions (`#231 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/231>`_)
* Contributors: Felix Exner, Rune Søe-Knudsen, dependabot[bot]

1.5.0 (2024-11-25)
------------------
* Adapt RTDE output recipe based on robot response (`#221 <https://github.com/UniversalRobots/Universal_Robots_Client_Library/issues/221>`_)
Expand Down
Loading
Loading