Skip to main content

InOrbit Edge SDK for Python

Project description

InOrbit Python Edge SDK

OS Python 3.8 Python 3.9 Python 3.10 Python 3.11 Python 3.12
Linux TeamCity TeamCity TeamCity TeamCity TeamCity
Mac TeamCity TeamCity TeamCity TeamCity TeamCity
Windows TeamCity TeamCity TeamCity TeamCity TeamCity
Qodana -- -- TeamCity --

The InOrbit Edge SDK allows Python programs to communicate with InOrbit platform on behalf of robots - providing robot data and handling robot actions. Its goal is to ease the integration between InOrbit and any other software that handles robot data.


Features

  • Robot session handling through a RobotSessionPool.
  • Publish key-values.
  • Publish robot poses.
  • Publish robot odometry.
  • Publish robot path.
  • Publish robot laser.
  • Execute callbacks on Custom Action execution.
  • Execute scripts (or any program) in response to Custom Action execution.

Quick Start

from inorbit_edge.robot import RobotSessionFactory, RobotSessionPool


def my_command_handler(robot_id, command_name, args, options):
    """Callback for processing custom command calls.

    Args:
        robot_id (str): InOrbit robot ID
        command_name (str): InOrbit command e.g. 'customCommand'
        args (list): Command arguments
        options (dict): object that includes
            - `result_function` can be called to report command execution
            result with the following signature: `result_function(return_code)`
            - `progress_function` can be used to report command output with
            the following signature: `progress_function(output, error)`
            - `metadata` is reserved for the future and will contain additional
            information about the received command request.
    """
    if command_name == "customCommand":
        print(f"Received '{command_name}' for robot '{robot_id}'!. {args}")
        # Return '0' for success
        options["result_function"]("0")


robot_session_factory = RobotSessionFactory(
    api_key="<YOUR_API_KEY>"
)

# Register commands handlers. Note that all handlers are invoked.
robot_session_factory.register_command_callback(my_command_handler)
robot_session_factory.register_commands_path("./user_scripts", r".*\.sh")

robot_session_pool = RobotSessionPool(robot_session_factory)

robot_session = robot_session_pool.get_session(
    robot_id="my_robot_id_123", robot_name="Python SDK Quick Start Robot"
)

robot_session.publish_pose(x=0.0, y=0.0, yaw=0.0)

Installation

Stable Release: pip install inorbit-edge
**Development Head: ** pip install git+https://github.com/inorbit-ai/edge-sdk-python.git

Documentation

For full package documentation please visit InOrbit Developer Portal.

Development

See CONTRIBUTING.md for information related to developing the code.

The Three Commands You Need To Know

  1. pip install -e .[dev]

    This will install your package in editable mode with all the required development dependencies (i.e. tox).

  2. make build

    This will run tox which will run all your tests in Python 3.8 - 3.11 as well as linting your code.

  3. make clean

    This will clean up various Python and build generated files so that you can ensure that you are working in a clean environment.

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

inorbit-edge-1.16.2.tar.gz (39.8 kB view details)

Uploaded Source

Built Distribution

inorbit_edge-1.16.2-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

Details for the file inorbit-edge-1.16.2.tar.gz.

File metadata

  • Download URL: inorbit-edge-1.16.2.tar.gz
  • Upload date:
  • Size: 39.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for inorbit-edge-1.16.2.tar.gz
Algorithm Hash digest
SHA256 b98d1f05ca5ffef9249a33043021932ec01ae89ece6beb4ea1ec34a5ea9c3962
MD5 7c07a6608fe99e1d8c8b8b866332732e
BLAKE2b-256 28ca2c891929fbfb579d3fb0fb3218913da4859713ca5759cec877489e4fa1de

See more details on using hashes here.

File details

Details for the file inorbit_edge-1.16.2-py3-none-any.whl.

File metadata

File hashes

Hashes for inorbit_edge-1.16.2-py3-none-any.whl
Algorithm Hash digest
SHA256 db0fa58199ba719fb077528ace3b08dd2030f469c1e8e92058116e1896847cb4
MD5 1840c5516f8cfe9eb570c031207fe13a
BLAKE2b-256 1e985cbc76f695639628a200cb32ce7bcf74a5038b579b7878a40fc1e6405c62

See more details on using hashes here.

Supported by

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