Metadata-Version: 2.4
Name: scikit-robot
Version: 0.2.29
Summary: A Flexible Framework for Robot Control in Python
Home-page: https://github.com/iory/scikit-robot
Author: iory
Author-email: ab.ioryz@gmail.com
License: MIT
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
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 :: Implementation :: CPython
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cached-property; python_version >= "3.0"
Requires-Dist: cached-property<=1.5.2; python_version < "3.0"
Requires-Dist: filelock
Requires-Dist: future
Requires-Dist: gdown
Requires-Dist: lxml
Requires-Dist: networkx>=2.2.0; python_version < "3.8"
Requires-Dist: networkx>=2.5; python_version >= "3.8"
Requires-Dist: numpy>=1.16.0; python_version < "3.8"
Requires-Dist: numpy>=1.21.0; python_version >= "3.8"
Requires-Dist: ordered_set
Requires-Dist: packaging
Requires-Dist: pillow
Requires-Dist: pycollada<0.9; python_version < "3.2"
Requires-Dist: pycollada<=0.9,>=0.8; python_version >= "3.2" and python_version < "3.9"
Requires-Dist: pycollada>=0.8; python_version >= "3.9"
Requires-Dist: pyglet<2.0
Requires-Dist: pysdfgen>=0.2.0
Requires-Dist: repoze.lru; python_version < "3.2"
Requires-Dist: rtree
Requires-Dist: scikit-learn; python_version < "3.8"
Requires-Dist: scikit-learn>=0.24.0; python_version >= "3.8"
Requires-Dist: scikit-robot-pyrender>=0.1.47
Requires-Dist: scipy; python_version >= "3.0" and python_version < "3.8"
Requires-Dist: scipy<=1.2.3; python_version < "3.0"
Requires-Dist: scipy>=1.6.3; python_version >= "3.8"
Requires-Dist: six
Requires-Dist: trimesh!=3.23.0,>=3.9.0
Provides-Extra: opt
Requires-Dist: cvxopt; extra == "opt"
Requires-Dist: quadprog; extra == "opt"
Provides-Extra: docs
Requires-Dist: sphinx>=1.8.2; extra == "docs"
Requires-Dist: sphinx_rtd_theme; extra == "docs"
Provides-Extra: all
Requires-Dist: pybullet>=2.1.9; extra == "all"
Requires-Dist: fast-simplification; extra == "all"
Requires-Dist: sphinx>=1.8.2; extra == "all"
Requires-Dist: sphinx_rtd_theme; extra == "all"
Requires-Dist: cvxopt; extra == "all"
Requires-Dist: quadprog; extra == "all"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

# scikit-robot: A Flexible Framework for Robot visualization and programming in Python

![PyPI](https://img.shields.io/pypi/v/scikit-robot.svg)
![Python Versions](https://img.shields.io/pypi/pyversions/scikit-robot.svg)
[![Build Status](https://github.com/iory/scikit-robot/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/iory/scikit-robot/actions)


<h4>
    <a href="https://scikit-robot.readthedocs.io/en/latest/">Documentation</a> |
    <a href="https://scikit-robot.readthedocs.io/en/latest/install/index.html">Installation</a> |
    <a href="https://scikit-robot.readthedocs.io/en/latest/examples/index.html">Quick Start</a> |
    <a href="https://scikit-robot.readthedocs.io/en/latest/reference/index.html">Python API</a> |
    <a href="https://scikit-robot.readthedocs.io/en/latest/development/index.html">Contribute</a>
</h4>

Scikit-Robot is a lightweight pure-Python library for robotic kinematics,
motion planning, visualization and control.

## Installation
You may need to install some dependencies by apt-get install:
```bash
sudo apt-get update
sudo apt-get install libspatialindex-dev freeglut3-dev libsuitesparse-dev libblas-dev liblapack-dev
```

Then,
```bash
pip install scikit-robot
```

If you would like to use `Pybullet Interface`, `open3d` and `fast-simplification` for mesh simplification,

```bash
pip install scikit-robot[all]
```

## Command Line Tools

Scikit-robot provides a unified command-line interface through the `skr` command, which consolidates all robot-related tools into a single entry point.

### Using the skr Command

You can use the `skr` command with various subcommands:

```bash
# View all available commands
skr --help

# Visualize URDF models
skr visualize-urdf ~/.skrobot/pr2_description/pr2.urdf --viewer trimesh

# Convert URDF mesh files
skr convert-urdf-mesh robot.urdf --output converted_robot.urdf

# Change URDF root link
skr change-urdf-root robot.urdf new_root_link output.urdf

# Calculate URDF hash
skr urdf-hash robot.urdf

# Modularize URDF files
skr modularize-urdf robot.urdf --output modular_robot.urdf

# Visualize mesh files
skr visualize-mesh mesh_file.stl

# Convert wheel collision models
skr convert-wheel-collision robot.urdf --output converted.urdf
```

### Legacy Commands (still supported)

For backward compatibility, the original commands are still available:

```bash
# These commands work the same as their skr equivalents
visualize-urdf ~/.skrobot/pr2_description/pr2.urdf --viewer trimesh
convert-urdf-mesh robot.urdf --output converted_robot.urdf
```

### Visualize URDF

To visualize a URDF model and inspect your robot's configuration:

```bash
skr visualize-urdf ~/.skrobot/pr2_description/pr2.urdf --viewer trimesh
```

If you experience performance issues with the default viewer, try pyrender for smoother visualization:

```bash
skr visualize-urdf ~/.skrobot/pr2_description/pr2.urdf --viewer pyrender
```

Running these commands should open a viewer displaying your robot's 3D model. Below is a sample image of what you should expect.

![Viewer Example](docs/image/viewer.jpg)

## Create Your Own Robot Model (URDF)

If you want to build your own robot from scratch, you can refer to the [How to Create URDF from CAD Software](https://scikit-robot.readthedocs.io/en/latest/reference/how_to_create_urdf_from_cad.html) documentation.

![Create URDF from Solidworks](docs/image/urdf-from-solidworks.png)


## Features

- [x] Loading robot model from URDF ([examples/robot_models.py](examples/robot_models.py))
- [x] Forward and inverse kinematics ([examples/trimesh_scene_viewer.py](examples/trimesh_scene_viewer.py) [examples/pr2_inverse_kinematics.py](examples/pr2_inverse_kinematics.py))
- [x] Collision detection
- [x] Interactive viewer ([examples/trimesh_scene_viewer.py](examples/trimesh_scene_viewer.py))
- [x] Pybullet and ROS command interface ([examples/pybullet_robot_interface.py](examples/pybullet_robot_interface.py))
- [x] Forward and inverse dynamics
- [x] Path planning ([examples/collision_free_trajectory.py](examples/collision_free_trajectory.py))
