# InOrbit Python Edge SDK
| OS | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 |
|:-------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| Linux | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_LinuxPython38QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_LinuxPython38QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_LinuxPython39QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_LinuxPython39QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_LinuxPython310QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_LinuxPython310QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_LinuxPython311QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_LinuxPython311QualityRunner?branch=%3Cdefault%3E&mode=builds) |
| Mac | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_MacPython38QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_MacPython38QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_MacPython39QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_MacPython39QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_MacPython310QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_MacPython310QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_MacPython311QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_MacPython311QualityRunner?branch=%3Cdefault%3E&mode=builds) |
| Windows | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_WindowsPython38QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_WindowsPython38QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_WindowsPython39QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_WindowsPython39QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_WindowsPython310QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_WindowsPython310QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_WindowsPython311QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_WindowsPython311QualityRunner?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.
Raw data
{
"_id": null,
"home_page": "https://github.com/inorbit-ai/edge-sdk-python",
"name": "inorbit-edge",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "inorbit_edge",
"author": "InOrbit",
"author_email": "support@inorbit.ai",
"download_url": "https://files.pythonhosted.org/packages/45/71/8a275192bf0418b93fa5887b3b60ed3a932aa4fe5346ea343ab2fb016268/inorbit_edge-1.13.0.tar.gz",
"platform": null,
"description": "# InOrbit Python Edge SDK\n\n| OS | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 |\n|:-------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|\n| Linux | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_LinuxPython38QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_LinuxPython38QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_LinuxPython39QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_LinuxPython39QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_LinuxPython310QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_LinuxPython310QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_LinuxPython311QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_LinuxPython311QualityRunner?branch=%3Cdefault%3E&mode=builds) |\n| Mac | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_MacPython38QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_MacPython38QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_MacPython39QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_MacPython39QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_MacPython310QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_MacPython310QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_MacPython311QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_MacPython311QualityRunner?branch=%3Cdefault%3E&mode=builds) |\n| Windows | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_WindowsPython38QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_WindowsPython38QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_WindowsPython39QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_WindowsPython39QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_WindowsPython310QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_WindowsPython310QualityRunner?branch=%3Cdefault%3E&mode=builds) | [![TeamCity](https://inorbit.teamcity.com/app/rest/builds/buildType:id:DeveloperPortal_EdgeSdkPython_WindowsPython311QualityRunner/statusIcon.svg)](https://inorbit.teamcity.com/buildConfiguration/DeveloperPortal_EdgeSdkPython_WindowsPython311QualityRunner?branch=%3Cdefault%3E&mode=builds) |\n\nThe `InOrbit Edge SDK` allows Python programs to communicate with `InOrbit`\nplatform on behalf of robots - providing robot data and handling robot actions.\nIts goal is to ease the integration between `InOrbit` and any other software\nthat handles robot data.\n\n---\n\n## Features\n\n- Robot session handling through a `RobotSessionPool`.\n- Publish key-values.\n- Publish robot poses.\n- Publish robot odometry.\n- Publish robot path.\n- Publish robot laser.\n- Execute callbacks on Custom Action execution.\n- Execute scripts (or any program) in response to Custom Action execution.\n\n## Quick Start\n\n```python\nfrom inorbit_edge.robot import RobotSessionFactory, RobotSessionPool\n\n\ndef my_command_handler(robot_id, command_name, args, options):\n \"\"\"Callback for processing custom command calls.\n\n Args:\n robot_id (str): InOrbit robot ID\n command_name (str): InOrbit command e.g. 'customCommand'\n args (list): Command arguments\n options (dict): object that includes\n - `result_function` can be called to report command execution\n result with the following signature: `result_function(return_code)`\n - `progress_function` can be used to report command output with\n the following signature: `progress_function(output, error)`\n - `metadata` is reserved for the future and will contain additional\n information about the received command request.\n \"\"\"\n if command_name == \"customCommand\":\n print(f\"Received '{command_name}' for robot '{robot_id}'!. {args}\")\n # Return '0' for success\n options[\"result_function\"](\"0\")\n\n\nrobot_session_factory = RobotSessionFactory(\n api_key=\"<YOUR_API_KEY>\"\n)\n\n# Register commands handlers. Note that all handlers are invoked.\nrobot_session_factory.register_command_callback(my_command_handler)\nrobot_session_factory.register_commands_path(\"./user_scripts\", r\".*\\.sh\")\n\nrobot_session_pool = RobotSessionPool(robot_session_factory)\n\nrobot_session = robot_session_pool.get_session(\n robot_id=\"my_robot_id_123\", robot_name=\"Python SDK Quick Start Robot\"\n)\n\nrobot_session.publish_pose(x=0.0, y=0.0, yaw=0.0)\n```\n\n## Installation\n\n**Stable Release:** `pip install inorbit-edge`<br>\n**Development Head:\n** `pip install git+https://github.com/inorbit-ai/edge-sdk-python.git`\n\n## Documentation\n\nFor full package documentation please\nvisit [InOrbit Developer Portal](https://developer.inorbit.ai/docs?hsLang=en#edge-sdk).\n\n## Development\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for information related to developing\nthe code.\n\n## The Three Commands You Need To Know\n\n1. `pip install -e .[dev]`\n\n This will install your package in editable mode with all the required\n development dependencies (i.e. `tox`).\n\n2. `make build`\n\n This will run `tox` which will run all your tests in Python 3.8 - 3.11 as\n well as linting your code.\n\n3. `make clean`\n\n This will clean up various Python and build generated files so that you can\n ensure that you are working in a clean environment.\n",
"bugtrack_url": null,
"license": null,
"summary": "InOrbit Python Edge SDK",
"version": "1.13.0",
"project_urls": {
"Homepage": "https://github.com/inorbit-ai/edge-sdk-python"
},
"split_keywords": [
"inorbit_edge"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "45718a275192bf0418b93fa5887b3b60ed3a932aa4fe5346ea343ab2fb016268",
"md5": "6b1915945a7457580ad755b9d2247d5e",
"sha256": "691267873620643a6758c04f37850659dc49364c2ab9797719f1d762f446b652"
},
"downloads": -1,
"filename": "inorbit_edge-1.13.0.tar.gz",
"has_sig": false,
"md5_digest": "6b1915945a7457580ad755b9d2247d5e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 37984,
"upload_time": "2024-03-21T12:42:28",
"upload_time_iso_8601": "2024-03-21T12:42:28.991002Z",
"url": "https://files.pythonhosted.org/packages/45/71/8a275192bf0418b93fa5887b3b60ed3a932aa4fe5346ea343ab2fb016268/inorbit_edge-1.13.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-21 12:42:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "inorbit-ai",
"github_project": "edge-sdk-python",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [
{
"name": "opencv-python",
"specs": [
[
"==",
"4.7.0.68"
]
]
},
{
"name": "black",
"specs": [
[
">=",
"19.10b0"
]
]
},
{
"name": "coverage",
"specs": [
[
">=",
"5.1"
]
]
},
{
"name": "flake8",
"specs": [
[
">=",
"3.8.3"
]
]
},
{
"name": "pytest",
"specs": [
[
">=",
"5.4.3"
]
]
},
{
"name": "pytest-mock",
"specs": [
[
">=",
"3.10.0"
]
]
},
{
"name": "pytest-raises",
"specs": [
[
">=",
"0.11"
]
]
},
{
"name": "pyyaml",
"specs": [
[
">=",
"6.0"
]
]
},
{
"name": "requests_mock",
"specs": [
[
">=",
"1.9.3"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.31.0"
]
]
},
{
"name": "paho_mqtt",
"specs": [
[
"==",
"1.6.1"
]
]
},
{
"name": "Pillow",
"specs": [
[
"==",
"10.2.0"
]
]
},
{
"name": "PySocks",
"specs": [
[
"==",
"1.7.1"
]
]
},
{
"name": "protobuf",
"specs": [
[
"==",
"3.19.3"
]
]
},
{
"name": "certifi",
"specs": [
[
">=",
"2024.2.2"
]
]
},
{
"name": "deprecated",
"specs": [
[
"==",
"1.2.13"
]
]
}
],
"tox": true,
"lcname": "inorbit-edge"
}