Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8aa1984

Browse files
fmauchVinDp
authored andcommittedJun 17, 2024
Update README
1 parent 22d966a commit 8aa1984

File tree

3 files changed

+83
-70
lines changed

3 files changed

+83
-70
lines changed
 

‎.markdownlint.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
MD013:
3+
line_length: 100
4+
MD033:
5+
allowed_elements: [img, a]

‎.pre-commit-config.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@ repos:
22
- repo: https://github.com/pre-commit/mirrors-clang-format
33
rev: 'v14.0.6'
44
hooks:
5-
- id: clang-format
5+
- id: clang-format
6+
- repo: https://github.com/DavidAnson/markdownlint-cli2
7+
rev: v0.13.0
8+
hooks:
9+
- id: markdownlint-cli2
10+
exclude: "include/ur_client_library/queue/LICENSE.md"

‎README.md

+72-69
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,101 @@
11
# Universal Robots Client Library
2-
* [Universal Robots Client Library](#universal-robots-client-library)
3-
* [Build instructions](#build-instructions)
4-
* [Use this library in other projects](#use-this-library-in-other-projects)
5-
* [License](#license)
6-
* [Library contents](#library-contents)
7-
* [Example driver](#example-driver)
8-
* [Architecture](#architecture)
9-
* [A word on the primary / secondary interface](#a-word-on-the-primary--secondary-interface)
10-
* [A word on Real-Time scheduling](#a-word-on-real-time-scheduling)
11-
* [Producer / Consumer architecture](#producer--consumer-architecture)
12-
* [Logging configuration](#logging-configuration)
13-
* [Change logging level](#change-logging-level)
14-
* [Create new log handler](#create-new-log-handler)
15-
* [Console_bridge](#console_bridge)
16-
* [Acknowledgement](#acknowledgement)
17-
182

193
A C++ library for accessing Universal Robots interfaces. With this library C++-based drivers can be
204
implemented in order to create external applications leveraging the versatility of Universal Robots
215
robotic manipulators.
226

237
## Requirements
24-
* **Polyscope** (The software running on the robot controller) version **3.14.3** (for CB3-Series),
25-
or **5.9.4** (for e-Series) or higher. If you use an older Polyscope version it is suggested to
26-
update your robot. If for some reason (please tell us in the issues why) you cannot upgrade your
27-
robot, please see the [version compatibility table](doc/polyscope_compatibility.md) for a
28-
compatible tag.
29-
* The library requires an implementation of **POSIX threads** such as the `pthread` library
30-
* Socket communication is currently based on Linux sockets. Thus, this library will require Linux
31-
for building and using.
32-
* The [master](https://github.com/UniversalRobots/Universal_Robots_Client_Library/tree/master)
33-
branch of this repository requires a C++17-compatible compiler. For building this library without
34-
a C++17-requirement, please use the
35-
[boost](https://github.com/UniversalRobots/Universal_Robots_Client_Library/tree/boost) branch
36-
instead that requires the boost library.
37-
For the C++17 features, please use those minimum compiler versions:
38-
39-
| Compiler | min. version |
40-
|-----------|--------------|
41-
| **GCC** | 7 |
42-
| **Clang** | 7 |
438

9+
* **Polyscope** (The software running on the robot controller) version **3.14.3** (for CB3-Series),
10+
or **5.9.4** (for e-Series) or higher. If you use an older Polyscope version it is suggested to
11+
update your robot. If for some reason (please tell us in the issues why) you cannot upgrade your
12+
robot, please see the [version compatibility table](doc/polyscope_compatibility.rst) for a
13+
compatible tag.
14+
* The library requires an implementation of **POSIX threads** such as the `pthread` library
15+
* Socket communication is currently based on Linux sockets. Thus, this library will require Linux
16+
for building and using.
17+
* The [master](https://github.com/UniversalRobots/Universal_Robots_Client_Library/tree/master)
18+
branch of this repository requires a C++17-compatible compiler. For building this library without
19+
a C++17-requirement, please use the
20+
[boost](https://github.com/UniversalRobots/Universal_Robots_Client_Library/tree/boost) branch
21+
instead that requires the boost library.
4422

4523
## Build instructions
46-
See [Build / installation](docs/installation.rst)
24+
25+
See [Build / installation](doc/installation.rst)
4726

4827
## License
28+
4929
The majority of this library is licensed under the Apache-2.0 licensed. However, certain parts are
5030
licensed under different licenses:
51-
- The queue used inside the communication structures is originally written by Cameron Desrochers
52-
and is released under the BSD-2-Clause license.
53-
- The semaphore implementation used inside the queue implementation is written by Jeff Preshing and
54-
licensed under the zlib license
55-
- The Dockerfile used for the integration tests of this repository is originally written by Arran
56-
Hobson Sayers and released under the MIT license
31+
32+
* The queue used inside the communication structures is originally written by Cameron Desrochers
33+
and is released under the BSD-2-Clause license.
34+
* The semaphore implementation used inside the queue implementation is written by Jeff Preshing and
35+
licensed under the zlib license
36+
* The Dockerfile used for the integration tests of this repository is originally written by Arran
37+
Hobson Sayers and released under the MIT license
5738

5839
While the main `LICENSE` file in this repository contains the Apache-2.0 license used for the
5940
majority of the work, the respective libraries of third-party components reside together with the
6041
code imported from those third parties.
6142

6243
## Library contents
44+
6345
Currently, this library contains the following components:
64-
* **Basic primary interface:** The primary interface isn't fully implemented at the current state
65-
and provides only basic functionality. See [A word on the primary / secondary
66-
interface](#a-word-on-the-primary--secondary-interface) for further information about the primary
67-
interface.
68-
* **RTDE interface:** The [RTDE interface](https://www.universal-robots.com/articles/ur-articles/real-time-data-exchange-rtde-guide/)
69-
is fully supported by this library. See [RTDEClient](#rtdeclient) for further information on how
70-
to use this library as an RTDE client.
71-
* **Dashboard interface:** The [Dashboard server](https://www.universal-robots.com/articles/ur-articles/dashboard-server-e-series-port-29999/) can be accessed directly from C++ through helper functions using this library.
72-
* **Custom motion streaming:** This library was initially developed as part of the [Universal
73-
Robots ROS driver](https://github.com/UniversalRobots/Universal_Robots_ROS_Driver). Therefore, it
74-
also contains a mechanism to do data streaming through a custom socket, e.g. to perform motion
75-
command streaming.
46+
47+
* **Basic primary interface:** The primary interface isn't fully implemented at the current state
48+
and provides only basic functionality. See [A word on the primary / secondary
49+
interface](#a-word-on-the-primary--secondary-interface) for further information about the primary
50+
interface.
51+
* **RTDE interface:** The [RTDE interface](https://www.universal-robots.com/articles/ur-articles/real-time-data-exchange-rtde-guide/)
52+
is fully supported by this library. See
53+
[RTDEClient](https://docs.universal-robots.com/Universal_Robots_ROS2_Documentation/doc/ur_client_library/doc/architecture.html#rtdeclient)
54+
for further information on how
55+
to use this library as an RTDE client.
56+
* **Dashboard interface:** The [Dashboard
57+
server](https://www.universal-robots.com/articles/ur-articles/dashboard-server-e-series-port-29999/)
58+
can be accessed directly from C++ through helper functions using this library.
59+
* **Custom motion streaming:** This library was initially developed as part of the [Universal
60+
Robots ROS driver](https://github.com/UniversalRobots/Universal_Robots_ROS_Driver). Therefore, it
61+
also contains a mechanism to do data streaming through a custom socket, e.g. to perform motion
62+
command streaming.
7663

7764
## Example driver
65+
7866
In the `examples` subfolder you will find a minimal example of a running driver. It starts an
7967
instance of the `UrDriver` class and prints the RTDE values read from the controller. To run it make
8068
sure to
81-
* have an instance of a robot controller / URSim running at the configured IP address (or adapt the
82-
address to your needs)
83-
* run it from the package's main folder (the one where this README.md file is stored), as for
84-
simplicity reasons it doesn't use any sophisticated method to locate the required files.
69+
70+
* have an instance of a robot controller / URSim running at the configured IP address (or adapt the
71+
address to your needs)
72+
* run it from the package's main folder (the one where this README.md file is stored), as for
73+
simplicity reasons it doesn't use any sophisticated method to locate the required files.
8574

8675
## Architecture
87-
See [Architecture documentation](docs/architecture.rst)
76+
77+
See [Architecture documentation](doc/architecture.rst)
8878

8979
## A word on the primary / secondary interface
80+
9081
Currently, this library doesn't support the primary interface very well, as the [Universal Robots
9182
ROS driver](https://github.com/UniversalRobots/Universal_Robots_ROS_Driver) was built mainly upon
9283
the RTDE interface. Therefore, there is also no `PrimaryClient` for directly accessing the primary
9384
interface. This may change in future, though.
9485

95-
The `comm::URStream` class can be used to open a connection to the primary / secondary interface and
96-
send data to it. The [producer/consumer](#producer--consumer-architecture) pipeline structure can also be used
97-
together with the primary / secondary interface. However, package parsing isn't implemented for most
98-
packages currently. See the [`primary_pipeline` example](examples/primary_pipeline.cpp) on details
99-
how to set this up. Note that when running this example, most packages will just be printed as their
100-
raw byte streams in a hex notation, as they aren't implemented in the library, yet.
86+
The `comm::URStream` class can be used to open a connection to the primary / secondary interface
87+
and send data to it. The [producer/consumer](#producer--consumer-architecture) pipeline structure
88+
can also be used together with the primary / secondary interface. However, package parsing isn't
89+
implemented for most packages currently. See the [`primary_pipeline`
90+
example](examples/primary_pipeline.cpp) on details how to set this up. Note that when running this
91+
example, most packages will just be printed as their raw byte streams in a hex notation, as they
92+
aren't implemented in the library, yet.
10193

10294
## A word on Real-Time scheduling
95+
10396
As mentioned above, for a clean operation it is quite critical that arriving RTDE messages are read
10497
before the next message arrives. Due to this, both, the RTDE receive thread and the thread calling
105-
`getDataPackage()` should be scheduled with real-time priority. See [this guide](doc/real_time.md)
98+
`getDataPackage()` should be scheduled with real-time priority. See [this guide](doc/real_time.rst)
10699
for details on how to set this up.
107100

108101
The RTDE receive thread will be scheduled to real-time priority automatically, if applicable. If
@@ -112,24 +105,28 @@ scheduled to real-time priority by the application. See the
112105
as an example.
113106

114107
## Producer / Consumer architecture
108+
115109
Communication with the primary / secondary and RTDE interfaces is designed to use a
116110
consumer/producer pattern. The Producer reads data from the socket whenever it comes in, parses the
117111
contents and stores the parsed packages into a pipeline queue.
118112
You can write your own consumers that use the packages coming from the producer. See the
119113
[`comm::ShellConsumer`](include/ur_client_library/comm/shell_consumer.h) as an example.
120114

121115
## Logging configuration
116+
122117
As this library was originally designed to be included into a ROS driver but also to be used as a
123118
standalone library, it uses custom logging macros instead of direct `printf` or `std::cout`
124119
statements.
125120

126121
The macro based interface is by default using the [`DefaultLogHandler`](include/ur_client_library/default_log_handler.h)
127122
to print the logging messages as `printf` statements. It is possible to define your own log handler
128-
to change the behavior, [see create new log handler](#Create-new-log-handler) on how to.
123+
to change the behavior, [see create new log handler](#create-new-log-handler) on how to.
129124

130125
### Change logging level
126+
131127
Make sure to set the logging level in your application, as by default only messages of level
132128
WARNING or higher will be printed. See below for an example:
129+
133130
```c++
134131
#include "ur_client_library/log.h"
135132

@@ -143,6 +140,7 @@ int main(int argc, char* argv[])
143140
```
144141
145142
### Create new log handler
143+
146144
The logger comes with an interface [`LogHandler`](include/ur_client_library/log.h), which can be
147145
used to implement your own log handler for messages logged with this library. This can be done by
148146
inheriting from the `LogHandler class`.
@@ -197,24 +195,29 @@ int main(int argc, char* argv[])
197195
```
198196

199197
## Contributor Guidelines
198+
200199
* This repo supports [pre-commit](https://pre-commit.com/) e.g. for automatic code formatting. TLDR:
201200
This will prevent you from committing falsely formatted code:
202-
```
201+
202+
``` bash
203203
pipx install pre-commit
204204
pre-commit install
205205
```
206+
206207
* Succeeding pipelines are a must on Pull Requests (unless there is a reason, e.g. when there have
207208
been upstream changes).
208209
* We try to increase and keep our code coverage high, so PRs with new
209210
features should also have tests covering them.
210211
* Parameters of public methods must all be documented.
211212

212213
## Acknowledgment
214+
213215
Many parts of this library are forked from the [ur_modern_driver](https://github.com/ros-industrial/ur_modern_driver).
214216

215217
Developed in collaboration between:
216218

217-
[<img height="60" alt="Universal Robots A/S" src="doc/resources/ur_logo.jpg">](https://www.universal-robots.com/) &nbsp; and &nbsp;
219+
[<img height="60" alt="Universal Robots A/S" src="doc/resources/ur_logo.jpg">](https://www.universal-robots.com/)
220+
&nbsp; and &nbsp;
218221
[<img height="60" alt="FZI Research Center for Information Technology" src="doc/resources/fzi-logo_transparenz.png">](https://www.fzi.de).
219222

220223
<!--

0 commit comments

Comments
 (0)
Please sign in to comment.