{"id":28512727,"url":"https://github.com/velodex/rtix","last_synced_at":"2025-06-25T14:33:41.808Z","repository":{"id":283139340,"uuid":"949700420","full_name":"Velodex/rtix","owner":"Velodex","description":"Realtime Interprocess Communication and Orchestration for Robotics \u0026 AI","archived":false,"fork":false,"pushed_at":"2025-05-13T03:53:05.000Z","size":235,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T01:01:49.561Z","etag":null,"topics":["artificial-intelligence","control","embodied-ai","execution","ipc","motion-planning","orchestration","perception","realtime","robotics","ros","ros2","runtime","shared-memory"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Velodex.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-17T01:57:04.000Z","updated_at":"2025-05-13T03:53:08.000Z","dependencies_parsed_at":"2025-04-27T20:37:05.053Z","dependency_job_id":null,"html_url":"https://github.com/Velodex/rtix","commit_stats":null,"previous_names":["velodex/rtix"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Velodex/rtix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Velodex%2Frtix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Velodex%2Frtix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Velodex%2Frtix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Velodex%2Frtix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Velodex","download_url":"https://codeload.github.com/Velodex/rtix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Velodex%2Frtix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261892117,"owners_count":23225860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","control","embodied-ai","execution","ipc","motion-planning","orchestration","perception","realtime","robotics","ros","ros2","runtime","shared-memory"],"created_at":"2025-06-09T01:00:41.869Z","updated_at":"2025-06-25T14:33:41.800Z","avatar_url":"https://github.com/Velodex.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RTIX: Runtime Interprocess Execution\n\nRTIX is a fast and lightweight IPC and orchestration layer for robotics and embodied AI applications.\n\n## Why RTIX?\n\nExisting frameworks like ROS-2, while powerful and feature-rich, are large and often result in application source code that is difficult to onboard, develop, and maintain.  RTIX takes a minimalist approach to avoid the large dependency headache so developers can own their stack end-to-end.\n\nOur core design principles with RTIX are:\n- **Minimal dependencies**: There are only a few core dependencies.\n  - Nng is a lightweight IPC in both C++ and Python.\n  - Protobuf is the industry standard for message serialization and deserialization.\n  - YAML is used for configuration of the data plane.\n  - Spdlog is used for C++ logging.\n  - Cpptrace is used for C++ backtrace.\n- **Low latency IPC**: We use shared memory to make communication as fast as possible and mitigate the non-determinism that presents in networking based approaches.\n- **Simple**: Our lightweight design makes installation, utilization, and versioning straightforward.  This improves maintainability.\n\n## Architecture\n\nRTIX provides an architecture for running multiple processes (e.g. perception, planning, and control) on a Robot PC.  Processes can be written in C++ and Python.  They share critical data with each other through a fast shared memory IPC.  They respond to actions/report status to/from an orchestrator.  Because all messages are Protobuf types, the orchestrator can provide a client service using gRPC and share the native data directly with the client as requested.  This streamlines a high-performance multi-process robot controller service running on a single PC.\n\n![image](./diagram.png)\n\n\n## Basic Usage\n\nThe data plane configuration is specified in a `channel-map.yaml` file.\n\n```yaml\n# A channel is a shared memory pipeline that contains data for a specific\n# message type.  A node is an object that can publish (write) or subscribe\n# (read) to a set of channels.  Only one node that publish to a channel, but\n# many nodes can subscribe to a channel.\nnode_a:\n  publishers:\n    - channel_id: ping\n  subscribers:\n    - channel_id: pong\n      timeout_ms: 1000\nnode_b:\n  publishers:\n    - channel_id: pong\n  subscribers:\n    - channel_id: ping\n      timeout_ms: 1000\n```\n\nThe following shows basic usage in Python.  C++ follows a similar pattern.\n\n```python\nimport yaml\nfrom rtix.ipc.node import Node\nfrom rtix.ipc.channel_map import ChannelMap\n\n# Initialize the channel map from yaml.  This is where connections are managed.\nwith open(\"channel-map.yaml\") as file:\n    yaml_dict = yaml.safe_load(file)\n    channel_map = ChannelMap.LoadYaml(yaml_dict)\n\n# A node contains multiple publishers and subscribers.  It is typically used as\n# the IPC manager for a single process.\nnode = Node(config=channel_map.nodes[\"node_a\"])\n\n# Messages are Protobuf types.  You can use built-in Protobuf messages or\n# create your own.  This is a placeholder for a real message type.\nmy_message = Message()\n\n# The publisher send command is sync/blocking.  Returns true if\n# the message was sent to the shared memory successfully.\nnode.publisher(\"ping\").send(my_message)\n\n# The subscriber recv command is by default sync/blocking for the\n# length of the timeout.  If block=False then it will return\n# immediately.  Returns true if data was pulled from the shared\n# memory, false if not.\nnode.subscriber(\"pong\").recv(my_message, block=True)\n```\n\nThe snippet above is for reference only as it only shows one of the nodes (`node_a`).  In practice, messages will be published and received in different processes or threads.  For real examples, see below.\n\n\n## Installation\nMethod 3 is recommended for development and extensive use.\n\n### Method 1: Pypi (Python only)\nThe simpliest way to try out RTIX is to install from pypi.\n```bash\npython3 -m pip install rtix\n```\nNote that the pip installation uses pre-generated Protobuf messages.  If you use a different version of Protobuf, you should install from source to regenerate the messages.\n\n### Method 2: Source (C++ and Python)\nWe recommend using the Development with Docker method below.  Proceed if you are comfortable managing your dependency environment.\n\n1. Clone the package.\n2. Install the core package dependencies found in the [Dockerfile](./Dockerfile).  The Dockerfile shows dependency installation for Ubuntu using apt.  For Mac and Windows platforms, you will need to install packages using dependency management for those platforms.\n3. Install the Python requirements.txt\n```bash\npython3 -m pip install -r requirements.txt\n```\n4. Create and build a CMake project.  Protobuf files are generated during the CMake configuration step.\n```bash\nmkdir build\ncd build\ncmake ..\nmake -j\nmake test\n```\n5. Install the python package\n```bash\npython3 -m pip install .\n```\n\n### Method 3: [Recommended] Development with Docker (C++ and Python)\nWhile it is not required, we strongly recommend using Docker to manage multiple processes.  Docker is a containerized dependency management system.  We provide a Dockerfile with the necessary dependencies for RTIX development.\n\n1. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/).\n2. Clone the package.\n3. Build the Docker container.  This sets up a containerized environment for development.\n```bash\ndocker build -f Dockerfile -t rtix-dev .\n```\n4. Run the Docker container.\n```bash\ndocker run --rm -it -v .:/rtix rtix-dev\n```\n5. In the container, setup a CMake project, build, install and test.  Protobuf files are generated during the CMake configuration step.\n```bash\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake -j\nmake install\nmake test\n```\n6. To import the C++ package into another project, add to your CMakeLists.txt\n```bash\nfind_package(rtix CONFIG REQUIRED)\ninclude_directories(${RTIX_INCLUDE_DIRS})\n\n# Link the libraries after add_executable or add_library\ntarget_link_libraries(my_target ${RTIX_LIBRARIES})\n```\n7. If you wish to generate a coverage report, regenerate and build using `-DTEST_COVERAGE=ON`.  Note that this turns off optimizations, so to use in an application, you'll want to delete the `build` folder and rebuild without the coverage flag on.\n```bash\ncmake -DTEST_COVERAGE=ON ..\nmake -j \u0026\u0026 make test\n\n# Commands for both XML and HTML are provided\nmake coverage-xml\nmake coverage-html\n```\n8. Voila!  You're ready to develop, test, and run any of the examples.\n\n## Performance\nTODO\n\n## Examples\n1. [Python Simple Publish and Subscribe](./examples/python_pub_sub/README.md)\n2. [Python Ping Pong with 2 Nodes](./examples/python_ping_pong/README.md)\n3. [C++ CMake Import Example](./examples/cmake_import/README.md)\n\n## License\nLicensed permissively under Apache-2.0.\n\n## Contributing\nSee the [Contributing Guide](./CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelodex%2Frtix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvelodex%2Frtix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelodex%2Frtix/lists"}