Skip to main content

Communicating with Mote

Project description

mote_link

Python client for talking to Mote robots over the network.

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

Installation

pip install mote_link

Example

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 for hardware setup, configuration, and the full API reference.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mote_link-0.0.1.tar.gz (177.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mote_link-0.0.1-cp38-abi3-win_amd64.whl (241.5 kB view details)

Uploaded CPython 3.8+Windows x86-64

mote_link-0.0.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (405.8 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

mote_link-0.0.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (384.7 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

mote_link-0.0.1-cp38-abi3-macosx_11_0_arm64.whl (347.6 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

mote_link-0.0.1-cp38-abi3-macosx_10_12_x86_64.whl (352.5 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page