Metadata-Version: 2.4
Name: compas_robots
Version: 1.0.1
Summary: Basic infrastructure for working with robots in COMPAS.
Author-email: Gonzalo Casas <casas@arch.ethz.ch>, Chen Kasirer <ckasirer@ethz.ch>, Victor Leung <yck011522@gmail.com>
License: MIT License
        
        Copyright (c) 2023-2026 COMPAS Association
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/compas-dev/compas_robots
Project-URL: Documentation, https://compas.dev/compas_robots
Project-URL: Repository, https://github.com/compas-dev/compas_robots
Project-URL: Changelog, https://github.com/compas-dev/compas_robots/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/compas-dev/compas_robots/issues
Project-URL: Forum, https://forum.compas-framework.org/
Keywords: robots,urdf,kinematics,compas,robotics
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
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 :: Python :: Implementation :: CPython
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.md
Requires-Dist: compas<3.0,>=2.4.3
Provides-Extra: dev
Requires-Dist: attrs>=17.4; extra == "dev"
Requires-Dist: black>=22.12.0; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: bump-my-version; extra == "dev"
Requires-Dist: compas_invocations2[mkdocs]; extra == "dev"
Requires-Dist: fake-bpy-module; extra == "dev"
Requires-Dist: invoke>=0.14; extra == "dev"
Requires-Dist: pytest>=3.2; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: wheel; extra == "dev"
Dynamic: license-file

# COMPAS Robots

[![Made with COMPAS](https://compas.dev/badge.svg)](https://compas.dev)
 [![PyPI](https://img.shields.io/pypi/v/compas_robots)](https://pypi.org/project/compas_robots/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Robot models and visualization for the [COMPAS framework](https://compas.dev).

## Features

- Load and build robot models from URDF files or programmatically
- Visualize robots in **Rhino**, **Grasshopper**, **Blender**, and the **COMPAS Viewer**
- Forward kinematics and configuration management
- Load geometry from local files or directly from GitHub repositories
- Attach tools and meshes to robot links

## Installation

```bash
pip install compas_robots
```

## Quick start

```python
import math
from compas_robots import RobotModel
from compas_viewer import Viewer

model = RobotModel.ur5e(load_geometry=True)

config = model.zero_configuration()
config["shoulder_lift_joint"] = -math.pi / 2
config["elbow_joint"]         =  math.pi / 2
config["wrist_1_joint"]       = -math.pi / 2
config["wrist_2_joint"]       = -math.pi / 2

viewer = Viewer()
scene_object = viewer.scene.add(model)
scene_object.update(config)
viewer.show()
```

## Loading robot models

From a URDF file:

```python
from compas_robots import RobotModel

model = RobotModel.from_urdf_file("ur5e.urdf")
```

From a GitHub repository:

```python
from compas_robots import RobotModel
from compas_robots.resources import GithubPackageMeshLoader

github = GithubPackageMeshLoader("ros-industrial/abb", "abb_irb6600_support", "kinetic-devel")
model = RobotModel.from_urdf_file(github.load_urdf("irb6640.urdf"))
model.load_geometry(github)
```

## Documentation

Full documentation, tutorials, and examples at [compas.dev/compas_robots](https://compas.dev/compas_robots).

## Contributing

### Setup

```bash
git clone https://github.com/compas-dev/compas_robots
cd compas_robots
pip install -e ".[dev]"
```

### Code style

```bash
invoke lint      # check style
invoke format    # auto-format
```

### Tests

```bash
invoke test
```

### Docs

```bash
invoke docs
```

### Releases

Releases follow [semver](https://semver.org/spec/v2.0.0.html):

```bash
invoke release minor
```

## License

MIT. See [LICENSE](LICENSE).
