Metadata-Version: 2.4
Name: pylibfranka-macos
Version: 0.21.3
Summary: Unofficial macOS build of pylibfranka, the Python bindings for libfranka
Author-email: Franka Robotics GmbH <info@franka.de>
Maintainer: Younghyo Park
License: Apache-2.0
Project-URL: Homepage, https://github.com/younghyopark/libfranka/tree/macos-support
Project-URL: Upstream, https://github.com/frankarobotics/libfranka
Project-URL: Documentation, https://frankarobotics.github.io/libfranka/pylibfranka/latest
Project-URL: Repository, https://github.com/younghyopark/libfranka
Project-URL: Issues, https://github.com/younghyopark/libfranka/issues
Project-URL: Changelog, https://github.com/frankarobotics/libfranka/blob/main/CHANGELOG.md
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: C++
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.19.0
Provides-Extra: dev
Requires-Dist: pre-commit>=3.3.2; extra == "dev"
Requires-Dist: black>=23.3.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: flake8-docstrings>=1.7.0; extra == "dev"
Requires-Dist: mypy>=1.3.0; extra == "dev"
Requires-Dist: pytest>=7.3.1; extra == "dev"
Requires-Dist: pybind11-stubgen>=2.5; extra == "dev"
Dynamic: requires-python

# pylibfranka-macos

Unofficial macOS build of [pylibfranka](https://github.com/frankarobotics/libfranka), the Python bindings for libfranka, from [younghyopark/libfranka](https://github.com/younghyopark/libfranka/tree/macos-support), a fork with macOS support.

**This package is not affiliated with or endorsed by Franka Robotics GmbH.** On Linux, use the official [pylibfranka](https://pypi.org/project/pylibfranka/).

## Installation

```bash
pip install pylibfranka-macos
```

It needs an Apple Silicon Mac with macOS 15 or newer and Python 3.10 to 3.14. The wheels bundle their native dependencies, such as Poco, pinocchio and Boost, so they need no Homebrew.

The package installs the same `pylibfranka` module as the official package, so do not install both into one environment:

```python
import pylibfranka

robot = pylibfranka.Robot("172.16.0.2")
```

See the [pylibfranka documentation](https://frankarobotics.github.io/libfranka/pylibfranka/latest) for the API.

## Changes from libfranka

- Build on macOS.
- Busy-wait for robot states in a thread with the QoS class `USER_INTERACTIVE` instead of sleeping between control cycles. A thread that sleeps is often woken on an efficiency core or a clocked-down core, which slows down the following cycle several times and makes the robot drop commands. Set the environment variable `LIBFRANKA_MACOS_BUSY_WAIT=0` to sleep in a Mach time constraint thread instead.
- Detect TCP connections that the robot closed, which macOS reports differently from Linux.
- Do not hang when cancelling a motion that already ended, for example with `Robot.stop()`.

## Real-time notes

macOS is not a real-time operating system. Busy-waiting keeps one performance core fully busy while a control loop runs, so plug in the Mac when controlling the robot. Only the thread that creates the `Robot` gets the highest scheduling priority, so run the control loop on that thread. Connect the robot via wired Ethernet and watch `RobotState.control_command_success_rate` to check that your setup keeps up with the 1 kHz control loop.

## License

Apache-2.0, like libfranka. Each wheel includes the license and notice of libfranka and the licenses of the bundled libraries in its `.dist-info/licenses` directory.
