Metadata-Version: 2.1
Name: inorbit-edge
Version: 1.17.0
Summary: InOrbit Edge SDK for Python
Home-page: https://github.com/inorbit-ai/edge-sdk-python
Download-URL: https://github.com/inorbit-ai/edge-sdk-python/archive/refs/tags/v1.13.0.zip
Author: InOrbit, Inc.
Author-email: support@inorbit.ai
Maintainer: Leandro Pineda
Maintainer-email: leandro@inorbit.ai
License: MIT
Project-URL: CI/CD, https://inorbit.teamcity.com/project/Engineering_Development_DeveloperPortal_EdgeSdkPython
Project-URL: Tracker, https://inorbit.youtrack.cloud/issues/ESP/?q=State:%20-Resolved%20
Project-URL: Contributing, https://github.com/inorbit-ai/edge-sdk-python/blob/v1.17.0/CONTRIBUTING.md
Project-URL: Code of Conduct, https://github.com/inorbit-ai/edge-sdk-python/blob/v1.17.0/CODE_OF_CONDUCT.md
Project-URL: Changelog, https://github.com/inorbit-ai/edge-sdk-python/blob/v1.17.0/CHANGELOG.md
Project-URL: Issue Tracker, https://github.com/inorbit-ai/edge-sdk-python/issues
Project-URL: License, https://github.com/inorbit-ai/edge-sdk-python/blob/n1.17.0/LICENSE
Project-URL: About, https://www.inorbit.ai/company
Project-URL: Contact, https://www.inorbit.ai/contact
Project-URL: Blog, https://www.inorbit.ai/blog
Project-URL: Twitter, https://twitter.com/InOrbitAI
Project-URL: LinkedIn, https://www.linkedin.com/company/inorbitai
Project-URL: GitHub, https://github.com/inorbit-ai
Project-URL: Website, https://www.inorbit.ai/
Project-URL: Source, https://github.com/inorbit-ai/edge-sdk-python
Keywords: inorbit,robops,robotics
Platform: Linux
Platform: Mac OS-X
Platform: Windows
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8, <3.13
Description-Content-Type: text/markdown
Provides-Extra: video
License-File: LICENSE

# InOrbit Python Edge SDK

|                     OS                      |                                                                                                                                                                  Python 3.8                                                                                                                                                                   |                                                                                                                                                                  Python 3.9                                                                                                                                                                   |                                                                                                                                                                   Python 3.10                                                                                                                                                                   |                                                                                                                                                                   Python 3.11                                                                                                                                                                   | Python 3.12                                                                                                                                                                                                                                                                                                                                     |
|:-------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|                    Linux                    |   [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_LinuxPython38QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_LinuxPython38QualityCheck?branch=%3Cdefault%3E&mode=builds)   |   [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_LinuxPython39QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_LinuxPython39QualityCheck?branch=%3Cdefault%3E&mode=builds)   |   [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_LinuxPython310QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_LinuxPython310QualityCheck?branch=%3Cdefault%3E&mode=builds)   |   [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_LinuxPython311QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_LinuxPython311QualityCheck?branch=%3Cdefault%3E&mode=builds)   | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_LinuxPython312QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_LinuxPython312QualityCheck?branch=%3Cdefault%3E&mode=builds)     |
|                     Mac                     |     [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_MacPython38QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_MacPython38QualityCheck?branch=%3Cdefault%3E&mode=builds)     |     [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_MacPython39QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_MacPython39QualityCheck?branch=%3Cdefault%3E&mode=builds)     |     [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_MacPython310QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_MacPython310QualityCheck?branch=%3Cdefault%3E&mode=builds)     |     [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_MacPython311QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_MacPython311QualityCheck?branch=%3Cdefault%3E&mode=builds)     | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_MacPython312QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_MacPython312QualityCheck?branch=%3Cdefault%3E&mode=builds)         |
|                   Windows                   | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_WindowsPython38QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_WindowsPython38QualityCheck?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_WindowsPython39QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_WindowsPython39QualityCheck?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_WindowsPython310QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_WindowsPython310QualityCheck?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_WindowsPython311QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_WindowsPython311QualityCheck?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_WindowsPython312QualityCheck/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_WindowsPython312QualityCheck?branch=%3Cdefault%3E&mode=builds) |
| [Qodana](https://www.jetbrains.com/qodana/) |                                                                                                                                                                      --                                                                                                                                                                       |                                                                                                                                                                      --                                                                                                                                                                       |     [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:Engineering_Development_DeveloperPortal_EdgeSdkPython_QodanaLinuxQualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/Engineering_Development_DeveloperPortal_EdgeSdkPython_QodanaLinuxQualityRunner?branch=%3Cdefault%3E&mode=builds)     |                                                                                                                                                                       --                                                                                                                                                                        |                                                                                                                                                                                                                                                                                                                                                 |

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

```python
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`<br>
**Development Head:
** `pip install git+https://github.com/inorbit-ai/edge-sdk-python.git`

## Documentation

For full package documentation please
visit [InOrbit Developer Portal](https://developer.inorbit.ai/docs?hsLang=en#edge-sdk).

## Development

See [CONTRIBUTING.md](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.
