Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Install dependencies
run: |
uv sync --locked --all-extras --all-groups
uv sync --locked --all-groups

- name: Clear all caches and compiled files
run: |
Expand All @@ -55,6 +55,8 @@ jobs:
env:
NO_COLOR: "1"
PYTHONDONTWRITEBYTECODE: "1"
PYTHONOPTIMIZE: "2"
UV_COMPILE_BYTECODE: "0"
run: |
uv run pytest tests --maxfail=1 --disable-warnings --tb=short -v

Expand All @@ -77,4 +79,4 @@ jobs:

- name: Check if uv.lock is up to date
run: |
uv sync --locked --all-extras --all-groups --dry-run
uv sync --locked --all-groups --dry-run
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ The `armctl` library currently supports the following manufacturers and robot mo
pip install armctl
```

> **Note:** Universal Robots (UR) support requires the optional extra:
> ```bash
> pip install armctl[ur]
> ```

*From GitHub:*

```bash
Expand Down
16 changes: 13 additions & 3 deletions armctl/universal_robots/protocols/rtde.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@

from pathlib import Path
from typing import NewType

from rtde import RTDE as _RTDE
from rtde.rtde_config import ConfigFile
from ctypes import c_uint32

try:
from rtde import RTDE as _RTDE
from rtde.rtde_config import ConfigFile
except ImportError:
_RTDE = None
ConfigFile = None

u32 = NewType("u32", c_uint32)


class RTDE:
def __init__(self, ip: str):
if _RTDE is None or ConfigFile is None:
raise ImportError(
"Universal Robots RTDE support requires additional dependencies."
"Install it with: pip install armctl[ur]"
)

config_file = Path(__file__).parent / "config.xml"
config = ConfigFile(str(config_file))
state_names, state_types = config.get_recipe("out")
Expand Down
15 changes: 9 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["uv_build>=0.10.0,<0.11.0"]
requires = ["uv_build>=0.11.2,<0.12"]
build-backend = "uv_build"

[tool.uv.build-backend]
Expand All @@ -15,24 +15,27 @@ version = "0.4.0"
description = "Agnostic Robotic Manipulation Controller (armctl)"
authors = [{ name = "Michael Gross", email = "[email protected]" }]
readme = {file = "README.md", content-type = "text/markdown"}
license = { file = "LICENSE" }
license = "MIT"
keywords = ["robotics", "socket", "control", "automation", "ur", "universal robotics", "jaka", "dobot", "elephant robotics", "vention", "fanuc"]
license-files = ["LICENSE"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta"

]
requires-python = ">=3.6"
requires-python = ">=3.7"
dependencies = [
# "urrtde @ git+https://github.com/UniversalRobots/RTDE_Python_Client_Library.git@main"
"urrtde",
"typer>=0.9.0",
"pyserial>=3.5",
"zaber-motion>=2.13.1",
]

[project.optional-dependencies]
ur = [
"urrtde @ git+https://github.com/UniversalRobots/RTDE_Python_Client_Library.git@main"
]

[project.urls]
Homepage = "https://github.com/MGross21/armctl"
Issues = "https://github.com/MGross21/armctl/issues"
Expand Down
Loading
Loading