Metadata-Version: 2.4
Name: mote_link
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Embedded Systems
Requires-Dist: zeroconf>=0.136
Requires-Dist: survey>=5.4
Requires-Dist: rerun-sdk>=0.21 ; extra == 'demo'
Requires-Dist: pyglet>=2.0 ; extra == 'demo'
Provides-Extra: demo
License-File: LICENSE
Summary: Communicating with Mote
Keywords: robotics,embedded,protocol
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://empriselab.github.io/mote/
Project-URL: Repository, https://github.com/empriselab/mote

# mote_link

Python client for talking to [Mote](https://empriselab.github.io/mote/) robots over the network.

`mote_link` handles discovery (via mDNS), connection, and message serialization / deserialization.

## Installation

```bash
pip install mote_link
```

Add the `demo` extra (`pip install mote_link[demo]`) to also install `rerun-sdk` and
`pyglet`, needed only by the bundled `rerun-demo` example.

## Example

```python
import asyncio

from mote_link import MoteClient, SetDriveBaseVelocity, DriveBaseState


async def main():
    async with MoteClient() as mote:
        # Opens an interactive prompt if the robot's IP or UID isn't known.
        await mote.connect()

        # Drive both wheels forward.
        await mote.send(SetDriveBaseVelocity(left_velocity_rad_per_s=1.0, right_velocity_rad_per_s=1.0))

        # Read messages from the robot.
        message = await mote.recv()
        if isinstance(message, DriveBaseState):
            print(f"left: {message.left}, right: {message.right}")


asyncio.run(main())
```

## Documentation

See the [Mote documentation](https://empriselab.github.io/mote/) for hardware setup, configuration,
and the full API reference.

