Metadata-Version: 2.4
Name: mote_link
Version: 0.0.2
Requires-Dist: zeroconf>=0.136
Requires-Dist: rerun-sdk>=0.21
Requires-Dist: survey>=5.4
Requires-Dist: pyglet>=2.0
Summary: Communicating with Mote
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
```

## Example

```python
import asyncio

from mote_link.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=1.0, right_velocity_rad=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.

