Metadata-Version: 2.4
Name: armw
Version: 2.1.0
Summary: ARMW: Agnostic Robot MiddleWare
Author-email: Nathan McGuire <nmcguire@whoi.edu>
Maintainer-email: Caileigh Fitzgerald <cfitzgerald@whoi.edu>, Eric Gallimore <egallimore@whoi.edu>
Project-URL: Homepage, http://acomms.whoi.edu
Project-URL: Documentation, https://ros.pages.whoi.edu/armw/
Project-URL: Repository, https://git.whoi.edu/ros/armw.git
Project-URL: Issues, https://git.whoi.edu/ros/armw/-/issues
Project-URL: Changelog, https://git.whoi.edu/ros/armw/-/blob/main/CHANGELOG.md?ref_type=heads
Keywords: Library,Python Modules,Scientific/Engineering
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: deprecated

# Agnostic Robot Middleware

[![pipeline status](https://git.whoi.edu/ros/armw/badges/master/pipeline.svg)](https://git.whoi.edu/ros/armw/-/commits/master)
[![coverage report](https://git.whoi.edu/ros/armw/badges/master/coverage.svg)](https://git.whoi.edu/ros/armw/-/commits/master)
[![Latest Release](https://git.whoi.edu/ros/armw/-/badges/release.svg)](https://git.whoi.edu/ros/armw/-/releases)

ARMW is a Python shim layer for writing robot middleware code that can run on
ROS 1, ROS 2, or ARMW's native backend (which has no external dependencies) 
with the same application-facing API.

Use ARMW when you want node code to depend on a small compatibility layer instead
of directly depending on `rospy` or `rclpy`.

## Quick Start

Install the package from PyPi:

```bash
pip install armw
```

Or locally after cloning (`-e` for editable mode):
```bash
pip install -e .
```

Select a backend explicitly when you want deterministic behavior:

```bash
export ARMW_MIDDLEWARE=native
```

On Windows PowerShell:

```powershell
$env:ARMW_MIDDLEWARE = "native"
```

Create and run a minimal node:

```python
import armw


class MinimalNode(armw.ArmwNode):
    def __init__(self):
        super().__init__("minimal_node")
        self.log_info("minimal_node started")


if __name__ == "__main__":
    armw.run_node(MinimalNode, node_name="minimal_node")
```

More complete guides are in `docs/`:

- [Quick start](docs/quickstart.md)
- [Writing nodes](docs/writing-nodes.md)
- [Running nodes](docs/running-nodes.md)
- [Using threads](docs/threads.md)
- [Native backend](docs/native-backend.md)

## Backend Selection

ARMW chooses a middleware backend at import time.

Set `ARMW_MIDDLEWARE` to force one of:

- `native`
- `ros1`
- `ros2`

If `ARMW_MIDDLEWARE` is not set, ARMW tries to detect ROS 1 first, then ROS 2.
The native backend is best for tests and local processes that do not need a ROS
runtime.
