Skip to content

Commit 302317a

Browse files
authored
Merge pull request #19 from lbr-stack/dev-doc
Documentation
2 parents f6b1058 + 75d3ec2 commit 302317a

20 files changed

+280
-120
lines changed

.github/CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ The [LBR-Stack](https://github.com/lbr-stack/) thrives to build a friendly commu
33
We **encourage** everyone to open issues for questions / problems / features. For additional information, we would like to provide some links below.
44

55
### Knowledge Sources
6-
- [Open issues](https://github.com/lbr-stack/pyFRI/issues)
7-
- [Closed issues](https://github.com/lbr-stack/pyFRI/issues?q=is%3Aissue+is%3Aclosed)
6+
- [Open issues](https://github.com/lbr-stack/pyfri/issues)
7+
- [Closed issues](https://github.com/lbr-stack/pyfri/issues?q=is%3Aissue+is%3Aclosed)
88

99
## Contributing
10-
### pyFRI
10+
### pyfri
1111
Contributions are vital to this project. If you want to contribute a feature / fix proceed as follows
1212

1313
1. Open an issue:
1414
- Explain the issue and your solution
1515
- Request a new branch: `dev-feature`, e.g. `dev-my-new-demo`
1616
2. Fork this repository
17-
3. Create a [pull request](https://github.com/lbr-stack/pyFRI/pulls) against `dev-<feature>`
17+
3. Create a [pull request](https://github.com/lbr-stack/pyfri/pulls) against `dev-<feature>`
1818

1919
### New FRI version
2020
Refer [README](https://github.com/lbr-stack/fri#contributing) for instructions.

CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
cmake_minimum_required(VERSION 3.16.3)
77

8-
project(_pyFRI)
8+
project(_pyfri)
99

1010
include(FetchContent)
1111

@@ -27,12 +27,12 @@ FetchContent_MakeAvailable(FRI)
2727

2828
add_subdirectory(pybind)
2929

30-
pybind11_add_module(_pyFRI ${CMAKE_CURRENT_SOURCE_DIR}/pyFRI/src/wrapper.cpp)
30+
pybind11_add_module(_pyfri ${CMAKE_CURRENT_SOURCE_DIR}/pyfri/src/wrapper.cpp)
3131

3232
target_include_directories(
33-
_pyFRI
33+
_pyfri
3434
PRIVATE
35-
${CMAKE_CURRENT_SOURCE_DIR}/pyFRI/src
35+
${CMAKE_CURRENT_SOURCE_DIR}/pyfri/src
3636
)
3737

38-
target_link_libraries(_pyFRI PRIVATE FRIClient)
38+
target_link_libraries(_pyfri PRIVATE FRIClient)

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ representative at an online or offline event.
6060

6161
Instances of abusive, harassing, or otherwise unacceptable behavior may be
6262
reported to the community leaders responsible for enforcement at
63-
https://github.com/lbr-stack/pyFRI/issues.
63+
https://github.com/lbr-stack/pyfri/issues.
6464
All complaints will be reviewed and investigated promptly and fairly.
6565

6666
All community leaders are obligated to respect the privacy and security of the

README.md

+15-81
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# pyFRI
1+
# pyfri
22

3-
[![License](https://img.shields.io/github/license/lbr-stack/pyFRI)](https://github.com/lbr-stack/pyFRI/tree/main?tab=Apache-2.0-1-ov-file#readme)
3+
[![Build](https://github.com/lbr-stack/pyfri/actions/workflows/build.yaml/badge.svg)](https://github.com/lbr-stack/pyfri/actions/workflows/build.yaml)
4+
[![License](https://img.shields.io/github/license/lbr-stack/pyfri)](https://github.com/lbr-stack/pyfri/tree/main?tab=Apache-2.0-1-ov-file#readme)
5+
[![JOSS](https://joss.theoj.org/papers/c43c82bed833c02503dd47f2637192ef/status.svg)](https://joss.theoj.org/papers/c43c82bed833c02503dd47f2637192ef)
46
[![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
57

68
KUKA Fast Robot Interface Python SDK.
7-
The code in this repository, provides Python bindings for the FRI Client SDK C++.
9+
The code in this repository, provides Python bindings for the FRI Client SDK C++ through [pybind11](https://github.com/pybind/pybind11).
810
The interface has been designed to be as similar as possible to the documentation provided by KUKA.
911

1012
There is one difference users of the Python bindings should be aware.
@@ -24,7 +26,7 @@ ClientApplication app(connection, client);
2426
In Python, the equivalent code is as follows.
2527
2628
```python
27-
import pyFRI as fri
29+
import pyfri as fri
2830
2931
# ..setup client..
3032
@@ -35,99 +37,31 @@ Since UDP is the only supported connection type and the connection object is not
3537

3638
See the [examples](examples/).
3739

38-
# Important notice
39-
40-
**THIS IS NOT A KUKA PRODUCT.**
41-
42-
[@cmower](https://github.com/cmower) and [@mhubii](https://github.com/mhubii) are not affiliated with KUKA.
43-
44-
# Support
45-
46-
The following versions of FRI are currently supported:
47-
* 1.15
48-
* 2.5
49-
50-
Note, whilst FRI version 2.5 is supported some functionality is not.
51-
Currently, FRI Cartesian Overlay is not supported by FRI-Client-SDK_Python.
52-
53-
If you have a different version, please consider [forking](https://github.com/lbr-stack/pyFRI/fork) and [submitting a pull request](https://github.com/lbr-stack/pyFRI/pulls).
54-
55-
# Install
40+
## Quickstart
5641

5742
1. Clone repository (make sure you include `--recursive`):
5843
```shell
59-
git clone --recursive https://github.com/lbr-stack/pyFRI.git
44+
git clone --recursive https://github.com/lbr-stack/pyfri.git
6045
```
6146
2. Change directory:
6247
```shell
63-
cd pyFRI
48+
cd pyfri
6449
```
6550
3. Install:
6651
```shell
6752
export FRI_CLIENT_VERSION=1.15
6853
pip3 install .
6954
```
7055

71-
## Upgrading/switching between FRI Versions
72-
73-
If you upgrade your FRI version or want to switch between them, you need to manually remove the `build/` directory before running `pip install`.
74-
75-
# Usage
76-
77-
## Data types
78-
79-
You can pass NumPy arrays to the "set" methods (e.g. `setJointPosition`) in order to command the robot.
80-
However, you **must** ensure the format of the array is correct.
81-
82-
Arrays that have a `dtype` of `np.float32` are the only ones that can be accepted.
83-
See how the commands are set in the the examples.
84-
85-
## Collecting data from the robot
86-
87-
We provide additional functionality to the LBR client application class that enables data collection to a text file.
88-
In Python, simply add the following
89-
90-
```python
91-
app = fri.ClientApplication(client)
92-
app.collect_data(file_name)
93-
```
94-
95-
The string `file_name` should contain the file name for the data file.
96-
We use the comma-separated values format for the data file, and so the file name should end with the extension `.csv` - *note*, if this isn't the case then `.csv` is automatically appended to the given file name.
97-
98-
The columns in the recorded csv file are as follows:
99-
* `index`: the index of the recorded data, starts at 0, and is incremented by 1 at each call to the `step` method.
100-
* `time`: the time of the command, starts at 0.0, then is incremented by the sample time at each call to the `step` method.
101-
* `record_time_nsec`: the epoch time collected when the data in the current time step is recorded.
102-
* `tsec`: controller time as specified by the FRI in seconds. See FRI documentation for `getTimestampSec`.
103-
* `tnsec`: controller time as specified by the FRI in nanoseconds. See FRI documentation for `getTimestampNanoSec`.
104-
* `mp1, ..., mp7`: The measured joint position for the robot.
105-
* `ip1, ..., ip7`: The ipo joint position for the robot.
106-
* `mt1, ..., mt7`: The measured torque for the robot.
107-
* `et1, ..., et7`: The external torque for the robot.
108-
* `dt`: The sample time specified on the KUKA controller.
109-
110-
See the [examples/LBRJointSineOverlay.py](examples/LBRJointSineOverlay.py) example that demonstrates how to easily collect data from the robot.
111-
112-
# Examples
113-
114-
First, ensure the corresponding Java applications for each example are installed (these were supplied with KUKA Sunrise).
115-
Then turn on the robot, connect your laptop via ethernet, and follow these steps on your laptop.
116-
117-
1. Change directory: `cd /path/to/FRI-Client-SDK_Python/examples`
118-
2. Run examples
119-
- `$ python LBRJointSineOverlay.py # based on examples provided by KUKA`
120-
- `$ python LBRTorqueSineOverlay.py # based on examples provided by KUKA`
121-
- `$ python LBRWrenchSineOverlay.py # based on examples provided by KUKA`
122-
- `$ python joint_teleop.py`
123-
- `$ python task_teleop.py`
56+
> [!NOTE]
57+
> FRI client is fetched from [fri](https://github.com/lbr-stack/fri) and must be available as branch, refer [README](https://github.com/lbr-stack/fri?tab=readme-ov-file#contributing).
12458
125-
# Documentation
59+
4. Setup the hardware, see [Hardware Setup](https://lbr-stack.readthedocs.io/en/latest/lbr_fri_ros2_stack/lbr_fri_ros2_stack/doc/hardware_setup.html).
12660

127-
You can find documentation for `pyFRI` in the [wiki](https://github.com/cmower/FRI-Client-SDK_Python/wiki).
61+
5. Checkout the [Example Applications](https://lbr-stack.readthedocs.io/en/latest/pyfri/doc/example_applications.html#example-applications).
12862

129-
# Citation
130-
If you enjoyed using this repository for your work, we would really appreciate ❤️ if you could cite it, as it helps us to continue offering support.
63+
## Citation
64+
If you enjoyed using this repository for your work, we would really appreciate ❤️ if you could leave a ⭐ and / or cite it, as it helps us to continue offering support.
13165

13266
```
13367
@misc{huber2023lbrstack,

0 commit comments

Comments
 (0)