-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from rpiRobotics/sphinx
Add readthedocs and sphinx documentation
- Loading branch information
Showing
17 changed files
with
998 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: 2 | ||
|
||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.10" | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,44 @@ | ||
# abb_robot_client | ||
|
||
Python package to access ABB robots using Robot Web Services and EGM. | ||
[![Python](https://img.shields.io/badge/python-3.6+-blue.svg)](https://github.com/rpiRobotics/abb_robot_client) | ||
![PyPI](https://img.shields.io/pypi/v/abb-robot-client) | ||
|
||
Python package providing clients for ABB robots using RWS (Robot Web Services) and Externally Guided Motion (EGM). | ||
This package currently supports IRC5 controllers running RobotWare 6.xx. It does not support RobotWare 7+. | ||
|
||
This package is typically used with [abb-motion-program-exec](https://pypi.org/project/abb-motion-program-exec/), | ||
which provides a higher level interface to generate motion programs. `abb-motion-program-exec` includes the ability | ||
to initialize EGM operations, using this package to communicate with EGM. | ||
|
||
`abb_robot_client` includes three modules: `rws`, `rws_aio`, and `egm`. `rws` provides a synhronous client for Robot | ||
Web Services (RWS) using HTTP REST, and the ability to create subscriptions using websockets. `rws_aio` provides | ||
identical functionality to `rws`, but uses asyncio, with each method being `async`. `egm` provides an Externally | ||
Guided Motion (EGM) client. | ||
|
||
Documentation can be found at: https://abb_robot_client.readthedocs.org | ||
|
||
## Installation | ||
|
||
`abb-robot-client` is avaliable on PyPi. Use the `[aio]` option to include support for asyncio: | ||
|
||
``` | ||
pip install abb-robot-client[aio] | ||
``` | ||
|
||
## Examples | ||
|
||
See the `examples/` directory for examples using the modules. | ||
|
||
## License | ||
|
||
Apache 2.0 | ||
|
||
## Acknowledgment | ||
|
||
This work was supported in part by Subaward No. ARM-TEC-21-02-F19 from the Advanced Robotics for Manufacturing ("ARM") Institute under Agreement Number W911NF-17-3-0004 sponsored by the Office of the Secretary of Defense. ARM Project Management was provided by Christopher Adams. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of either ARM or the Office of the Secretary of Defense of the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes, notwithstanding any copyright notation herein. | ||
|
||
This work was supported in part by the New York State Empire State Development Division of Science, Technology and Innovation (NYSTAR) under contract C160142. | ||
|
||
![](docs/figures/arm_logo.jpg) ![](docs/figures/nys_logo.jpg) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
EGM (Externally Guided Motion) | ||
============================== | ||
|
||
abb_robot_client.egm | ||
-------------------- | ||
|
||
.. automodule:: abb_robot_client.egm | ||
:members: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
RWS (Robot Web Services) | ||
======================== | ||
|
||
abb_robot_client.rws | ||
-------------------- | ||
|
||
.. automodule:: abb_robot_client.rws | ||
:members: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
RWS (Robot Web Services) AsyncIO | ||
================================ | ||
|
||
abb_robot_client.rws_aio | ||
------------------------ | ||
|
||
The `rws_aio` module implements asyncio methods. To use, the `abb_robot_client[aio]` option must be installed with pip. | ||
|
||
.. automodule:: abb_robot_client.rws_aio | ||
:members: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
API Reference | ||
================ | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
api/rws | ||
api/rws_aio | ||
api/egm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'abb_robot_client' | ||
copyright = '2022, Wason Technology, LLC' | ||
author = 'John Wason' | ||
|
||
import abb_robot_client | ||
|
||
# The short X.Y version. | ||
# version = abb_robot_client.__version__ | ||
# The full version, including alpha/beta/rc tags. | ||
# release = abb_robot_client.__version__ | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"sphinx_autodoc_typehints", | ||
"recommonmark" | ||
] | ||
|
||
source_suffix = [".rst", ".md"] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = [] | ||
|
||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = "sphinx_rtd_theme" | ||
html_static_path = ['_static'] | ||
|
||
# https://www.lieret.net/2021/05/20/include-readme-sphinx/ | ||
import pathlib | ||
|
||
# The readme that already exists | ||
readme_path = pathlib.Path(__file__).parent.resolve().parent / "README.md" | ||
# We copy a modified version here | ||
readme_target = pathlib.Path(__file__).parent / "readme.md" | ||
|
||
with readme_target.open("w") as outf: | ||
# Change the title to "Readme" | ||
outf.write( | ||
"\n".join( | ||
[ | ||
"Readme", | ||
"======", | ||
] | ||
) | ||
) | ||
lines = [] | ||
for line in readme_path.read_text().split("\n"): | ||
if line.startswith("# "): | ||
# Skip title, because we now use "Readme" | ||
# Could also simply exclude first line for the same effect | ||
continue | ||
line = line.replace("docs/figures/", "figures/") | ||
lines.append(line) | ||
outf.write("\n".join(lines)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. abb_robot_client documentation master file, created by | ||
sphinx-quickstart on Tue Dec 27 02:14:13 2022. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to abb_robot_client's documentation! | ||
============================================ | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
readme | ||
abb_robot_client/api_reference | ||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0..\ | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=docs | ||
set BUILDDIR=build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
sphinx_autodoc_typehints | ||
recommonmark | ||
setuptools | ||
requests | ||
numpy | ||
protobuf | ||
websocket-client | ||
httpx | ||
websockets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.