From 2c0718e8232f5d8bcf3a97ffaf38146d3661581d Mon Sep 17 00:00:00 2001 From: Maciej Majek <46171033+maciejmajek@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:08:04 +0100 Subject: [PATCH 1/4] refactor: rai the package (#386) --- .github/workflows/poetry-test.yml | 1 + .github/workflows/pre-commit.yml | 1 + README.md | 2 +- docs/debugging_assistant.md | 2 +- poetry.lock | 15 +- pyproject.toml | 11 +- setup_shell.sh | 2 +- src/rai/LICENSE | 202 ------------------ src/rai/package.xml | 23 -- src/rai/setup.cfg | 4 - src/rai/setup.py | 36 ---- src/{rai/resource/rai => rai_core/README.md} | 0 src/rai_core/pyproject.toml | 11 + src/{rai => rai_core}/rai/__init__.py | 0 src/{rai => rai_core}/rai/agents/__init__.py | 0 src/{rai => rai_core}/rai/agents/base.py | 0 .../rai/agents/conversational_agent.py | 0 .../rai/agents/integrations/__init__.py | 0 .../rai/agents/integrations/streamlit.py | 0 .../rai/agents/state_based.py | 0 .../rai/agents/tool_runner.py | 0 .../rai/agents/voice_agent.py | 0 src/{rai => rai_core}/rai/apps/__init__.py | 0 .../rai/apps/document_loader.py | 0 .../rai/apps/high_level_api.py | 0 .../rai/apps/state_analyzer.py | 0 .../rai/apps/talk_to_docs.py | 0 .../rai/apps/task_executor.py | 0 .../rai/apps/task_planner.py | 0 src/{rai => rai_core}/rai/cli/__init__.py | 0 src/{rai => rai_core}/rai/cli/rai_cli.py | 2 +- .../resources/default_robot_constitution.txt | 0 .../rai/communication/__init__.py | 0 .../rai/communication/ari_connector.py | 0 .../rai/communication/base_connector.py | 0 .../rai/communication/hri_connector.py | 0 .../rai/communication/ros2/__init__.py | 0 .../rai/communication/ros2/api.py | 0 .../rai/communication/ros2/connectors.py | 0 .../communication/sound_device_connector.py | 0 src/{rai => rai_core}/rai/config/__init__.py | 0 src/{rai => rai_core}/rai/config/models.py | 0 .../rai/extensions/__init__.py | 0 .../rai/messages/__init__.py | 0 .../rai/messages/multimodal.py | 0 src/{rai => rai_core}/rai/messages/utils.py | 0 src/{rai => rai_core}/rai/node.py | 0 src/{rai => rai_core}/rai/ros2_apis.py | 0 src/{rai => rai_core}/rai/tools/__init__.py | 0 .../rai/tools/debugging_assistant.py | 0 .../rai/tools/ros/__init__.py | 0 src/{rai => rai_core}/rai/tools/ros/cli.py | 0 .../rai/tools/ros/deprecated.py | 0 .../rai/tools/ros/manipulation.py | 0 src/{rai => rai_core}/rai/tools/ros/native.py | 0 .../rai/tools/ros/native_actions.py | 0 .../rai/tools/ros/nav2/__init__.py | 0 .../rai/tools/ros/nav2/basic_navigator.py | 0 .../rai/tools/ros/nav2/navigator.py | 0 src/{rai => rai_core}/rai/tools/ros/tools.py | 0 src/{rai => rai_core}/rai/tools/ros/utils.py | 0 .../rai/tools/ros2/__init__.py | 0 .../rai/tools/ros2/actions.py | 0 .../rai/tools/ros2/services.py | 0 .../rai/tools/ros2/topics.py | 0 src/{rai => rai_core}/rai/tools/ros2/utils.py | 0 src/{rai => rai_core}/rai/tools/time.py | 0 src/{rai => rai_core}/rai/tools/utils.py | 0 src/{rai => rai_core}/rai/utils/__init__.py | 0 src/{rai => rai_core}/rai/utils/artifacts.py | 0 .../rai/utils/configurator.py | 0 .../rai/utils/model_initialization.py | 0 src/{rai => rai_core}/rai/utils/ros.py | 0 src/{rai => rai_core}/rai/utils/ros_async.py | 0 .../rai/utils/ros_executors.py | 0 src/{rai => rai_core}/rai/utils/ros_logs.py | 0 src/rai_interfaces/package.xml | 4 + 77 files changed, 41 insertions(+), 275 deletions(-) delete mode 100644 src/rai/LICENSE delete mode 100644 src/rai/package.xml delete mode 100644 src/rai/setup.cfg delete mode 100644 src/rai/setup.py rename src/{rai/resource/rai => rai_core/README.md} (100%) create mode 100644 src/rai_core/pyproject.toml rename src/{rai => rai_core}/rai/__init__.py (100%) rename src/{rai => rai_core}/rai/agents/__init__.py (100%) rename src/{rai => rai_core}/rai/agents/base.py (100%) rename src/{rai => rai_core}/rai/agents/conversational_agent.py (100%) rename src/{rai => rai_core}/rai/agents/integrations/__init__.py (100%) rename src/{rai => rai_core}/rai/agents/integrations/streamlit.py (100%) rename src/{rai => rai_core}/rai/agents/state_based.py (100%) rename src/{rai => rai_core}/rai/agents/tool_runner.py (100%) rename src/{rai => rai_core}/rai/agents/voice_agent.py (100%) rename src/{rai => rai_core}/rai/apps/__init__.py (100%) rename src/{rai => rai_core}/rai/apps/document_loader.py (100%) rename src/{rai => rai_core}/rai/apps/high_level_api.py (100%) rename src/{rai => rai_core}/rai/apps/state_analyzer.py (100%) rename src/{rai => rai_core}/rai/apps/talk_to_docs.py (100%) rename src/{rai => rai_core}/rai/apps/task_executor.py (100%) rename src/{rai => rai_core}/rai/apps/task_planner.py (100%) rename src/{rai => rai_core}/rai/cli/__init__.py (100%) rename src/{rai => rai_core}/rai/cli/rai_cli.py (99%) rename src/{rai => rai_core}/rai/cli/resources/default_robot_constitution.txt (100%) rename src/{rai => rai_core}/rai/communication/__init__.py (100%) rename src/{rai => rai_core}/rai/communication/ari_connector.py (100%) rename src/{rai => rai_core}/rai/communication/base_connector.py (100%) rename src/{rai => rai_core}/rai/communication/hri_connector.py (100%) rename src/{rai => rai_core}/rai/communication/ros2/__init__.py (100%) rename src/{rai => rai_core}/rai/communication/ros2/api.py (100%) rename src/{rai => rai_core}/rai/communication/ros2/connectors.py (100%) rename src/{rai => rai_core}/rai/communication/sound_device_connector.py (100%) rename src/{rai => rai_core}/rai/config/__init__.py (100%) rename src/{rai => rai_core}/rai/config/models.py (100%) rename src/{rai => rai_core}/rai/extensions/__init__.py (100%) rename src/{rai => rai_core}/rai/messages/__init__.py (100%) rename src/{rai => rai_core}/rai/messages/multimodal.py (100%) rename src/{rai => rai_core}/rai/messages/utils.py (100%) rename src/{rai => rai_core}/rai/node.py (100%) rename src/{rai => rai_core}/rai/ros2_apis.py (100%) rename src/{rai => rai_core}/rai/tools/__init__.py (100%) rename src/{rai => rai_core}/rai/tools/debugging_assistant.py (100%) rename src/{rai => rai_core}/rai/tools/ros/__init__.py (100%) rename src/{rai => rai_core}/rai/tools/ros/cli.py (100%) rename src/{rai => rai_core}/rai/tools/ros/deprecated.py (100%) rename src/{rai => rai_core}/rai/tools/ros/manipulation.py (100%) rename src/{rai => rai_core}/rai/tools/ros/native.py (100%) rename src/{rai => rai_core}/rai/tools/ros/native_actions.py (100%) rename src/{rai => rai_core}/rai/tools/ros/nav2/__init__.py (100%) rename src/{rai => rai_core}/rai/tools/ros/nav2/basic_navigator.py (100%) rename src/{rai => rai_core}/rai/tools/ros/nav2/navigator.py (100%) rename src/{rai => rai_core}/rai/tools/ros/tools.py (100%) rename src/{rai => rai_core}/rai/tools/ros/utils.py (100%) rename src/{rai => rai_core}/rai/tools/ros2/__init__.py (100%) rename src/{rai => rai_core}/rai/tools/ros2/actions.py (100%) rename src/{rai => rai_core}/rai/tools/ros2/services.py (100%) rename src/{rai => rai_core}/rai/tools/ros2/topics.py (100%) rename src/{rai => rai_core}/rai/tools/ros2/utils.py (100%) rename src/{rai => rai_core}/rai/tools/time.py (100%) rename src/{rai => rai_core}/rai/tools/utils.py (100%) rename src/{rai => rai_core}/rai/utils/__init__.py (100%) rename src/{rai => rai_core}/rai/utils/artifacts.py (100%) rename src/{rai => rai_core}/rai/utils/configurator.py (100%) rename src/{rai => rai_core}/rai/utils/model_initialization.py (100%) rename src/{rai => rai_core}/rai/utils/ros.py (100%) rename src/{rai => rai_core}/rai/utils/ros_async.py (100%) rename src/{rai => rai_core}/rai/utils/ros_executors.py (100%) rename src/{rai => rai_core}/rai/utils/ros_logs.py (100%) diff --git a/.github/workflows/poetry-test.yml b/.github/workflows/poetry-test.yml index 1f01701a9..db279f574 100644 --- a/.github/workflows/poetry-test.yml +++ b/.github/workflows/poetry-test.yml @@ -5,6 +5,7 @@ on: types: [opened, synchronize, reopened, edited, ready_for_review] branches: - development + - rc/rai-2.0.0 jobs: build-and-test-ros2: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 48e30077c..a592aadb0 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -5,6 +5,7 @@ on: branches: - main - development + - rc/rai-2.0.0 workflow_dispatch: jobs: diff --git a/README.md b/README.md index f4d3d2d39..817322155 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ rosdep install --from-paths src --ignore-src -r -y Run the configuration tool to set up your vendor and other settings: ```bash -poetry run streamlit run src/rai/rai/utils/configurator.py +poetry run streamlit run src/rai_core/rai/utils/configurator.py ``` > [!TIP] diff --git a/docs/debugging_assistant.md b/docs/debugging_assistant.md index 620dd62d2..3c8cedb8e 100644 --- a/docs/debugging_assistant.md +++ b/docs/debugging_assistant.md @@ -22,7 +22,7 @@ The ROS 2 Debugging Assistant is an interactive tool that helps developers inspe ```sh source setup_shell.sh -streamlit run src/rai/rai/tools/debugging_assistant.py +streamlit run src/rai_core/rai/tools/debugging_assistant.py ``` ## Usage Examples diff --git a/poetry.lock b/poetry.lock index 91c2abbca..70fb1cc29 100644 --- a/poetry.lock +++ b/poetry.lock @@ -5744,6 +5744,19 @@ files = [ [package.dependencies] cffi = {version = "*", markers = "implementation_name == \"pypy\""} +[[package]] +name = "rai" +version = "1.1.0" +description = "RAI is a framework for building general multi-agent systems, bringing Gen AI features to ROS enabled robots." +optional = false +python-versions = "*" +files = [] +develop = true + +[package.source] +type = "directory" +url = "src/rai_core" + [[package]] name = "ray" version = "2.40.0" @@ -8232,4 +8245,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.10, <3.13" -content-hash = "da1a7720082bf43b4efc7cd972b63f39882fc7e0d69340bbc436f18e889e55b2" +content-hash = "9a0384ef9b25aa35af0b86c38e86a54bf0bd5171bed4eff22ec26c8bb59e857b" diff --git a/pyproject.toml b/pyproject.toml index 3534c688d..d29566acb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [tool.poetry] -name = "rai" -version = "1.0.0" +name = "rai-framework" +version = "1.1.0" description = "RAI is a framework for building general multi-agent systems, bringing Gen AI features to ROS enabled robots." readme = "README.md" -authors = ["Maciej Majek ", "Bartłomiej Boczek "] +authors = ["Maciej Majek ", "Bartłomiej Boczek ", "Kajetan Rachwał "] classifiers = [ "Programming Language :: Python :: 3", "Development Status :: 4 - Beta", @@ -12,6 +12,7 @@ classifiers = [ package-mode = false [tool.poetry.dependencies] python = "^3.10, <3.13" +rai = { path = "src/rai_core", develop = true} langchain-core = "^0.3" langchain = "*" langgraph = "*" @@ -77,8 +78,8 @@ visualnav_transformer = { git = "https://github.com/RobotecAI/visualnav-transfor gdown = "^5.2.0" [build-system] -requires = ["setuptools>=42", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" [tool.isort] profile = "black" diff --git a/setup_shell.sh b/setup_shell.sh index cc67a5369..471dcb82c 100755 --- a/setup_shell.sh +++ b/setup_shell.sh @@ -29,4 +29,4 @@ case "$SHELL" in esac export PYTHONPATH -PYTHONPATH="$(dirname "$(dirname "$(poetry run which python)")")/lib/python$(poetry run python --version | awk '{print $2}' | cut -d. -f1,2)/site-packages:$PYTHONPATH" +PYTHONPATH="$(dirname "$(dirname "$(poetry run which python)")")/lib/python$(poetry run python --version | awk '{print $2}' | cut -d. -f1,2)/site-packages:$(pwd)/src/rai_core:$PYTHONPATH" diff --git a/src/rai/LICENSE b/src/rai/LICENSE deleted file mode 100644 index d0356d5ef..000000000 --- a/src/rai/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2024-present Robotec.ai - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/src/rai/package.xml b/src/rai/package.xml deleted file mode 100644 index 58cec45b7..000000000 --- a/src/rai/package.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - rai - 1.0.0 - RAI core modules - Bartłomiej Boczek - Maciej Majek - Apache-2.0 - - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - - nav2_msgs - nav2_simple_commander - tf_transformations - - - ament_python - - diff --git a/src/rai/setup.cfg b/src/rai/setup.cfg deleted file mode 100644 index c398a856f..000000000 --- a/src/rai/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script_dir=$base/lib/rai -[install] -install_scripts=$base/lib/rai diff --git a/src/rai/setup.py b/src/rai/setup.py deleted file mode 100644 index 9ed4bf5df..000000000 --- a/src/rai/setup.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2024 Robotec.AI -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from setuptools import find_packages, setup - -package_name = "rai" - -setup( - name=package_name, - version="1.0.0", - packages=find_packages(exclude=["test"]), - data_files=[ - ("share/ament_index/resource_index/packages", ["resource/" + package_name]), - ("share/" + package_name, ["package.xml"]), - ], - install_requires=["setuptools"], - zip_safe=True, - maintainer="Bartłomiej Boczek", - maintainer_email="bartlomiej.boczek@robotec.ai", - description="TODO: Package description", - license="Apache-2.0", - tests_require=["pytest"], - entry_points={}, -) diff --git a/src/rai/resource/rai b/src/rai_core/README.md similarity index 100% rename from src/rai/resource/rai rename to src/rai_core/README.md diff --git a/src/rai_core/pyproject.toml b/src/rai_core/pyproject.toml new file mode 100644 index 000000000..a5a3b65a2 --- /dev/null +++ b/src/rai_core/pyproject.toml @@ -0,0 +1,11 @@ +[tool.poetry] +name = "rai" +version = "1.1.0" +description = "RAI is a framework for building general multi-agent systems, bringing Gen AI features to ROS enabled robots." +readme = "README.md" +authors = ["Maciej Majek ", "Bartłomiej Boczek "] +classifiers = [ + "Programming Language :: Python :: 3", + "Development Status :: 4 - Beta", + "License :: OSI Approved :: Apache Software License", +] diff --git a/src/rai/rai/__init__.py b/src/rai_core/rai/__init__.py similarity index 100% rename from src/rai/rai/__init__.py rename to src/rai_core/rai/__init__.py diff --git a/src/rai/rai/agents/__init__.py b/src/rai_core/rai/agents/__init__.py similarity index 100% rename from src/rai/rai/agents/__init__.py rename to src/rai_core/rai/agents/__init__.py diff --git a/src/rai/rai/agents/base.py b/src/rai_core/rai/agents/base.py similarity index 100% rename from src/rai/rai/agents/base.py rename to src/rai_core/rai/agents/base.py diff --git a/src/rai/rai/agents/conversational_agent.py b/src/rai_core/rai/agents/conversational_agent.py similarity index 100% rename from src/rai/rai/agents/conversational_agent.py rename to src/rai_core/rai/agents/conversational_agent.py diff --git a/src/rai/rai/agents/integrations/__init__.py b/src/rai_core/rai/agents/integrations/__init__.py similarity index 100% rename from src/rai/rai/agents/integrations/__init__.py rename to src/rai_core/rai/agents/integrations/__init__.py diff --git a/src/rai/rai/agents/integrations/streamlit.py b/src/rai_core/rai/agents/integrations/streamlit.py similarity index 100% rename from src/rai/rai/agents/integrations/streamlit.py rename to src/rai_core/rai/agents/integrations/streamlit.py diff --git a/src/rai/rai/agents/state_based.py b/src/rai_core/rai/agents/state_based.py similarity index 100% rename from src/rai/rai/agents/state_based.py rename to src/rai_core/rai/agents/state_based.py diff --git a/src/rai/rai/agents/tool_runner.py b/src/rai_core/rai/agents/tool_runner.py similarity index 100% rename from src/rai/rai/agents/tool_runner.py rename to src/rai_core/rai/agents/tool_runner.py diff --git a/src/rai/rai/agents/voice_agent.py b/src/rai_core/rai/agents/voice_agent.py similarity index 100% rename from src/rai/rai/agents/voice_agent.py rename to src/rai_core/rai/agents/voice_agent.py diff --git a/src/rai/rai/apps/__init__.py b/src/rai_core/rai/apps/__init__.py similarity index 100% rename from src/rai/rai/apps/__init__.py rename to src/rai_core/rai/apps/__init__.py diff --git a/src/rai/rai/apps/document_loader.py b/src/rai_core/rai/apps/document_loader.py similarity index 100% rename from src/rai/rai/apps/document_loader.py rename to src/rai_core/rai/apps/document_loader.py diff --git a/src/rai/rai/apps/high_level_api.py b/src/rai_core/rai/apps/high_level_api.py similarity index 100% rename from src/rai/rai/apps/high_level_api.py rename to src/rai_core/rai/apps/high_level_api.py diff --git a/src/rai/rai/apps/state_analyzer.py b/src/rai_core/rai/apps/state_analyzer.py similarity index 100% rename from src/rai/rai/apps/state_analyzer.py rename to src/rai_core/rai/apps/state_analyzer.py diff --git a/src/rai/rai/apps/talk_to_docs.py b/src/rai_core/rai/apps/talk_to_docs.py similarity index 100% rename from src/rai/rai/apps/talk_to_docs.py rename to src/rai_core/rai/apps/talk_to_docs.py diff --git a/src/rai/rai/apps/task_executor.py b/src/rai_core/rai/apps/task_executor.py similarity index 100% rename from src/rai/rai/apps/task_executor.py rename to src/rai_core/rai/apps/task_executor.py diff --git a/src/rai/rai/apps/task_planner.py b/src/rai_core/rai/apps/task_planner.py similarity index 100% rename from src/rai/rai/apps/task_planner.py rename to src/rai_core/rai/apps/task_planner.py diff --git a/src/rai/rai/cli/__init__.py b/src/rai_core/rai/cli/__init__.py similarity index 100% rename from src/rai/rai/cli/__init__.py rename to src/rai_core/rai/cli/__init__.py diff --git a/src/rai/rai/cli/rai_cli.py b/src/rai_core/rai/cli/rai_cli.py similarity index 99% rename from src/rai/rai/cli/rai_cli.py rename to src/rai_core/rai/cli/rai_cli.py index 4df87cd17..70afb99cf 100644 --- a/src/rai/rai/cli/rai_cli.py +++ b/src/rai_core/rai/cli/rai_cli.py @@ -194,7 +194,7 @@ def create_rai_ws(): (package_path / "generated" / "robot_constitution.txt").touch() default_constitution_path = ( - "src/rai/rai/cli/resources/default_robot_constitution.txt" + "src/rai_core/rai/cli/resources/default_robot_constitution.txt" ) with open(default_constitution_path, "r") as file: default_constitution = file.read() diff --git a/src/rai/rai/cli/resources/default_robot_constitution.txt b/src/rai_core/rai/cli/resources/default_robot_constitution.txt similarity index 100% rename from src/rai/rai/cli/resources/default_robot_constitution.txt rename to src/rai_core/rai/cli/resources/default_robot_constitution.txt diff --git a/src/rai/rai/communication/__init__.py b/src/rai_core/rai/communication/__init__.py similarity index 100% rename from src/rai/rai/communication/__init__.py rename to src/rai_core/rai/communication/__init__.py diff --git a/src/rai/rai/communication/ari_connector.py b/src/rai_core/rai/communication/ari_connector.py similarity index 100% rename from src/rai/rai/communication/ari_connector.py rename to src/rai_core/rai/communication/ari_connector.py diff --git a/src/rai/rai/communication/base_connector.py b/src/rai_core/rai/communication/base_connector.py similarity index 100% rename from src/rai/rai/communication/base_connector.py rename to src/rai_core/rai/communication/base_connector.py diff --git a/src/rai/rai/communication/hri_connector.py b/src/rai_core/rai/communication/hri_connector.py similarity index 100% rename from src/rai/rai/communication/hri_connector.py rename to src/rai_core/rai/communication/hri_connector.py diff --git a/src/rai/rai/communication/ros2/__init__.py b/src/rai_core/rai/communication/ros2/__init__.py similarity index 100% rename from src/rai/rai/communication/ros2/__init__.py rename to src/rai_core/rai/communication/ros2/__init__.py diff --git a/src/rai/rai/communication/ros2/api.py b/src/rai_core/rai/communication/ros2/api.py similarity index 100% rename from src/rai/rai/communication/ros2/api.py rename to src/rai_core/rai/communication/ros2/api.py diff --git a/src/rai/rai/communication/ros2/connectors.py b/src/rai_core/rai/communication/ros2/connectors.py similarity index 100% rename from src/rai/rai/communication/ros2/connectors.py rename to src/rai_core/rai/communication/ros2/connectors.py diff --git a/src/rai/rai/communication/sound_device_connector.py b/src/rai_core/rai/communication/sound_device_connector.py similarity index 100% rename from src/rai/rai/communication/sound_device_connector.py rename to src/rai_core/rai/communication/sound_device_connector.py diff --git a/src/rai/rai/config/__init__.py b/src/rai_core/rai/config/__init__.py similarity index 100% rename from src/rai/rai/config/__init__.py rename to src/rai_core/rai/config/__init__.py diff --git a/src/rai/rai/config/models.py b/src/rai_core/rai/config/models.py similarity index 100% rename from src/rai/rai/config/models.py rename to src/rai_core/rai/config/models.py diff --git a/src/rai/rai/extensions/__init__.py b/src/rai_core/rai/extensions/__init__.py similarity index 100% rename from src/rai/rai/extensions/__init__.py rename to src/rai_core/rai/extensions/__init__.py diff --git a/src/rai/rai/messages/__init__.py b/src/rai_core/rai/messages/__init__.py similarity index 100% rename from src/rai/rai/messages/__init__.py rename to src/rai_core/rai/messages/__init__.py diff --git a/src/rai/rai/messages/multimodal.py b/src/rai_core/rai/messages/multimodal.py similarity index 100% rename from src/rai/rai/messages/multimodal.py rename to src/rai_core/rai/messages/multimodal.py diff --git a/src/rai/rai/messages/utils.py b/src/rai_core/rai/messages/utils.py similarity index 100% rename from src/rai/rai/messages/utils.py rename to src/rai_core/rai/messages/utils.py diff --git a/src/rai/rai/node.py b/src/rai_core/rai/node.py similarity index 100% rename from src/rai/rai/node.py rename to src/rai_core/rai/node.py diff --git a/src/rai/rai/ros2_apis.py b/src/rai_core/rai/ros2_apis.py similarity index 100% rename from src/rai/rai/ros2_apis.py rename to src/rai_core/rai/ros2_apis.py diff --git a/src/rai/rai/tools/__init__.py b/src/rai_core/rai/tools/__init__.py similarity index 100% rename from src/rai/rai/tools/__init__.py rename to src/rai_core/rai/tools/__init__.py diff --git a/src/rai/rai/tools/debugging_assistant.py b/src/rai_core/rai/tools/debugging_assistant.py similarity index 100% rename from src/rai/rai/tools/debugging_assistant.py rename to src/rai_core/rai/tools/debugging_assistant.py diff --git a/src/rai/rai/tools/ros/__init__.py b/src/rai_core/rai/tools/ros/__init__.py similarity index 100% rename from src/rai/rai/tools/ros/__init__.py rename to src/rai_core/rai/tools/ros/__init__.py diff --git a/src/rai/rai/tools/ros/cli.py b/src/rai_core/rai/tools/ros/cli.py similarity index 100% rename from src/rai/rai/tools/ros/cli.py rename to src/rai_core/rai/tools/ros/cli.py diff --git a/src/rai/rai/tools/ros/deprecated.py b/src/rai_core/rai/tools/ros/deprecated.py similarity index 100% rename from src/rai/rai/tools/ros/deprecated.py rename to src/rai_core/rai/tools/ros/deprecated.py diff --git a/src/rai/rai/tools/ros/manipulation.py b/src/rai_core/rai/tools/ros/manipulation.py similarity index 100% rename from src/rai/rai/tools/ros/manipulation.py rename to src/rai_core/rai/tools/ros/manipulation.py diff --git a/src/rai/rai/tools/ros/native.py b/src/rai_core/rai/tools/ros/native.py similarity index 100% rename from src/rai/rai/tools/ros/native.py rename to src/rai_core/rai/tools/ros/native.py diff --git a/src/rai/rai/tools/ros/native_actions.py b/src/rai_core/rai/tools/ros/native_actions.py similarity index 100% rename from src/rai/rai/tools/ros/native_actions.py rename to src/rai_core/rai/tools/ros/native_actions.py diff --git a/src/rai/rai/tools/ros/nav2/__init__.py b/src/rai_core/rai/tools/ros/nav2/__init__.py similarity index 100% rename from src/rai/rai/tools/ros/nav2/__init__.py rename to src/rai_core/rai/tools/ros/nav2/__init__.py diff --git a/src/rai/rai/tools/ros/nav2/basic_navigator.py b/src/rai_core/rai/tools/ros/nav2/basic_navigator.py similarity index 100% rename from src/rai/rai/tools/ros/nav2/basic_navigator.py rename to src/rai_core/rai/tools/ros/nav2/basic_navigator.py diff --git a/src/rai/rai/tools/ros/nav2/navigator.py b/src/rai_core/rai/tools/ros/nav2/navigator.py similarity index 100% rename from src/rai/rai/tools/ros/nav2/navigator.py rename to src/rai_core/rai/tools/ros/nav2/navigator.py diff --git a/src/rai/rai/tools/ros/tools.py b/src/rai_core/rai/tools/ros/tools.py similarity index 100% rename from src/rai/rai/tools/ros/tools.py rename to src/rai_core/rai/tools/ros/tools.py diff --git a/src/rai/rai/tools/ros/utils.py b/src/rai_core/rai/tools/ros/utils.py similarity index 100% rename from src/rai/rai/tools/ros/utils.py rename to src/rai_core/rai/tools/ros/utils.py diff --git a/src/rai/rai/tools/ros2/__init__.py b/src/rai_core/rai/tools/ros2/__init__.py similarity index 100% rename from src/rai/rai/tools/ros2/__init__.py rename to src/rai_core/rai/tools/ros2/__init__.py diff --git a/src/rai/rai/tools/ros2/actions.py b/src/rai_core/rai/tools/ros2/actions.py similarity index 100% rename from src/rai/rai/tools/ros2/actions.py rename to src/rai_core/rai/tools/ros2/actions.py diff --git a/src/rai/rai/tools/ros2/services.py b/src/rai_core/rai/tools/ros2/services.py similarity index 100% rename from src/rai/rai/tools/ros2/services.py rename to src/rai_core/rai/tools/ros2/services.py diff --git a/src/rai/rai/tools/ros2/topics.py b/src/rai_core/rai/tools/ros2/topics.py similarity index 100% rename from src/rai/rai/tools/ros2/topics.py rename to src/rai_core/rai/tools/ros2/topics.py diff --git a/src/rai/rai/tools/ros2/utils.py b/src/rai_core/rai/tools/ros2/utils.py similarity index 100% rename from src/rai/rai/tools/ros2/utils.py rename to src/rai_core/rai/tools/ros2/utils.py diff --git a/src/rai/rai/tools/time.py b/src/rai_core/rai/tools/time.py similarity index 100% rename from src/rai/rai/tools/time.py rename to src/rai_core/rai/tools/time.py diff --git a/src/rai/rai/tools/utils.py b/src/rai_core/rai/tools/utils.py similarity index 100% rename from src/rai/rai/tools/utils.py rename to src/rai_core/rai/tools/utils.py diff --git a/src/rai/rai/utils/__init__.py b/src/rai_core/rai/utils/__init__.py similarity index 100% rename from src/rai/rai/utils/__init__.py rename to src/rai_core/rai/utils/__init__.py diff --git a/src/rai/rai/utils/artifacts.py b/src/rai_core/rai/utils/artifacts.py similarity index 100% rename from src/rai/rai/utils/artifacts.py rename to src/rai_core/rai/utils/artifacts.py diff --git a/src/rai/rai/utils/configurator.py b/src/rai_core/rai/utils/configurator.py similarity index 100% rename from src/rai/rai/utils/configurator.py rename to src/rai_core/rai/utils/configurator.py diff --git a/src/rai/rai/utils/model_initialization.py b/src/rai_core/rai/utils/model_initialization.py similarity index 100% rename from src/rai/rai/utils/model_initialization.py rename to src/rai_core/rai/utils/model_initialization.py diff --git a/src/rai/rai/utils/ros.py b/src/rai_core/rai/utils/ros.py similarity index 100% rename from src/rai/rai/utils/ros.py rename to src/rai_core/rai/utils/ros.py diff --git a/src/rai/rai/utils/ros_async.py b/src/rai_core/rai/utils/ros_async.py similarity index 100% rename from src/rai/rai/utils/ros_async.py rename to src/rai_core/rai/utils/ros_async.py diff --git a/src/rai/rai/utils/ros_executors.py b/src/rai_core/rai/utils/ros_executors.py similarity index 100% rename from src/rai/rai/utils/ros_executors.py rename to src/rai_core/rai/utils/ros_executors.py diff --git a/src/rai/rai/utils/ros_logs.py b/src/rai_core/rai/utils/ros_logs.py similarity index 100% rename from src/rai/rai/utils/ros_logs.py rename to src/rai_core/rai/utils/ros_logs.py diff --git a/src/rai_interfaces/package.xml b/src/rai_interfaces/package.xml index 6627000a0..31009c3f6 100644 --- a/src/rai_interfaces/package.xml +++ b/src/rai_interfaces/package.xml @@ -15,9 +15,13 @@ ament_lint_auto ament_lint_common + rosidl_default_generators ament_cmake + nav2_msgs + nav2_simple_commander + tf_transformations rosidl_default_runtime rosidl_interface_packages From 46e7292cc93829cda3d75dd2340c0ed91dbf189e Mon Sep 17 00:00:00 2001 From: Maciej Majek <46171033+maciejmajek@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:53:58 +0100 Subject: [PATCH 2/4] refactor: rai asr package (#390) --- poetry.lock | 15 +- pyproject.toml | 1 + src/rai_asr/launch/local.launch.py | 95 ------ src/rai_asr/launch/openai.launch.py | 95 ------ src/rai_asr/package.xml | 16 - src/rai_asr/pyproject.toml | 11 + src/rai_asr/rai_asr/__init__.py | 20 ++ src/rai_asr/rai_asr/asr_clients.py | 75 ----- src/rai_asr/rai_asr/asr_node.py | 402 ------------------------- src/rai_asr/rai_asr/models/__init__.py | 3 +- src/rai_asr/resource/rai_asr | 0 src/rai_asr/setup.cfg | 4 - src/rai_asr/setup.py | 44 --- src/rai_interfaces/package.xml | 1 + 14 files changed, 49 insertions(+), 733 deletions(-) delete mode 100644 src/rai_asr/launch/local.launch.py delete mode 100644 src/rai_asr/launch/openai.launch.py delete mode 100644 src/rai_asr/package.xml create mode 100644 src/rai_asr/pyproject.toml delete mode 100644 src/rai_asr/rai_asr/asr_clients.py delete mode 100755 src/rai_asr/rai_asr/asr_node.py delete mode 100644 src/rai_asr/resource/rai_asr delete mode 100644 src/rai_asr/setup.cfg delete mode 100644 src/rai_asr/setup.py diff --git a/poetry.lock b/poetry.lock index 70fb1cc29..85f22e4af 100644 --- a/poetry.lock +++ b/poetry.lock @@ -5757,6 +5757,19 @@ develop = true type = "directory" url = "src/rai_core" +[[package]] +name = "rai-asr" +version = "1.1.0" +description = "An Automatic Speech Recognition package, leveraging transcription, voice activity detections and wake words models." +optional = false +python-versions = "*" +files = [] +develop = true + +[package.source] +type = "directory" +url = "src/rai_asr" + [[package]] name = "ray" version = "2.40.0" @@ -8245,4 +8258,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.10, <3.13" -content-hash = "9a0384ef9b25aa35af0b86c38e86a54bf0bd5171bed4eff22ec26c8bb59e857b" +content-hash = "aac005be9fae9ef44a7eb778d4b8e5cb2a2453b03db3f4170818ba5c586a296e" diff --git a/pyproject.toml b/pyproject.toml index d29566acb..fcd9bb69a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ package-mode = false [tool.poetry.dependencies] python = "^3.10, <3.13" rai = { path = "src/rai_core", develop = true} +rai-asr = { path = "src/rai_asr", develop = true} langchain-core = "^0.3" langchain = "*" langgraph = "*" diff --git a/src/rai_asr/launch/local.launch.py b/src/rai_asr/launch/local.launch.py deleted file mode 100644 index 7bfa69ca0..000000000 --- a/src/rai_asr/launch/local.launch.py +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (C) 2024 Robotec.AI -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from launch import LaunchDescription -from launch.actions import DeclareLaunchArgument -from launch.substitutions import LaunchConfiguration -from launch_ros.actions import Node - - -def generate_launch_description(): - return LaunchDescription( - [ - DeclareLaunchArgument( - "recording_device", - default_value="0", - description="Microphone device number. See available by running python -c 'import sounddevice as sd; print(sd.query_devices())'", - ), - DeclareLaunchArgument( - "language", - default_value="en", - description="Language code for the ASR model", - ), - DeclareLaunchArgument( - "model_name", - default_value="base", - description="Model name for the ASR model", - ), - DeclareLaunchArgument( - "model_vendor", - default_value="whisper", - description="Model vendor of the ASR", - ), - DeclareLaunchArgument( - "silence_grace_period", - default_value="1.0", - description="Grace period in seconds after silence to stop recording", - ), - DeclareLaunchArgument( - "use_wake_word", - default_value="False", - description="Whether to use wake word detection", - ), - DeclareLaunchArgument( - "wake_word_model", - default_value="", - description="Wake word model to use", - ), - DeclareLaunchArgument( - "wake_word_threshold", - default_value="0.5", - description="Threshold for wake word detection", - ), - DeclareLaunchArgument( - "vad_threshold", - default_value="0.5", - description="Threshold for voice activity detection", - ), - Node( - package="rai_asr", - executable="asr_node", - name="rai_asr", - output="screen", - emulate_tty=True, - parameters=[ - { - "recording_device": LaunchConfiguration("recording_device"), - "language": LaunchConfiguration("language"), - "model_name": LaunchConfiguration("model_name"), - "model_vendor": LaunchConfiguration("model_vendor"), - "silence_grace_period": LaunchConfiguration( - "silence_grace_period" - ), - "use_wake_word": LaunchConfiguration("use_wake_word"), - "wake_word_model": LaunchConfiguration("wake_word_model"), - "wake_word_threshold": LaunchConfiguration( - "wake_word_threshold" - ), - "vad_threshold": LaunchConfiguration("vad_threshold"), - } - ], - ), - ] - ) diff --git a/src/rai_asr/launch/openai.launch.py b/src/rai_asr/launch/openai.launch.py deleted file mode 100644 index d7b4524ea..000000000 --- a/src/rai_asr/launch/openai.launch.py +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (C) 2024 Robotec.AI -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from launch import LaunchDescription -from launch.actions import DeclareLaunchArgument -from launch.substitutions import LaunchConfiguration -from launch_ros.actions import Node - - -def generate_launch_description(): - return LaunchDescription( - [ - DeclareLaunchArgument( - "recording_device", - default_value="0", - description="Microphone device number. See available by running python -c 'import sounddevice as sd; print(sd.query_devices())'", - ), - DeclareLaunchArgument( - "language", - default_value="en", - description="Language code for the ASR model", - ), - DeclareLaunchArgument( - "model_name", - default_value="whisper-1", - description="Model name for the ASR model", - ), - DeclareLaunchArgument( - "model_vendor", - default_value="openai", - description="Model vendor of the ASR", - ), - DeclareLaunchArgument( - "silence_grace_period", - default_value="1.0", - description="Grace period in seconds after silence to stop recording", - ), - DeclareLaunchArgument( - "use_wake_word", - default_value="False", - description="Whether to use wake word detection", - ), - DeclareLaunchArgument( - "wake_word_model", - default_value="", - description="Wake word model to use", - ), - DeclareLaunchArgument( - "wake_word_threshold", - default_value="0.5", - description="Threshold for wake word detection", - ), - DeclareLaunchArgument( - "vad_threshold", - default_value="0.5", - description="Threshold for voice activity detection", - ), - Node( - package="rai_asr", - executable="asr_node", - name="rai_asr", - output="screen", - emulate_tty=True, - parameters=[ - { - "recording_device": LaunchConfiguration("recording_device"), - "language": LaunchConfiguration("language"), - "model_name": LaunchConfiguration("model_name"), - "model_vendor": LaunchConfiguration("model_vendor"), - "silence_grace_period": LaunchConfiguration( - "silence_grace_period" - ), - "use_wake_word": LaunchConfiguration("use_wake_word"), - "wake_word_model": LaunchConfiguration("wake_word_model"), - "wake_word_threshold": LaunchConfiguration( - "wake_word_threshold" - ), - "vad_threshold": LaunchConfiguration("vad_threshold"), - } - ], - ), - ] - ) diff --git a/src/rai_asr/package.xml b/src/rai_asr/package.xml deleted file mode 100644 index 56547ae81..000000000 --- a/src/rai_asr/package.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - rai_asr - 0.1.0 - An Automatic Speech Recognition package, leveraging Whisper for transcription and - Silero VAD for voice activity detection. This node captures audio, detects speech, and - transcribes the spoken content, publishing the transcription to a topic. - mkotynia - Apache-2.0 - - portaudio19-dev - - ament_python - - diff --git a/src/rai_asr/pyproject.toml b/src/rai_asr/pyproject.toml new file mode 100644 index 000000000..f3c9d4577 --- /dev/null +++ b/src/rai_asr/pyproject.toml @@ -0,0 +1,11 @@ +[tool.poetry] +name = "rai_asr" +version = "1.1.0" +description = "An Automatic Speech Recognition package, leveraging transcription, voice activity detections and wake words models." +readme = "README.md" +authors = ["Maciej Majek ", "Bartłomiej Boczek "] +classifiers = [ + "Programming Language :: Python :: 3", + "Development Status :: 4 - Beta", + "License :: OSI Approved :: Apache Software License", +] diff --git a/src/rai_asr/rai_asr/__init__.py b/src/rai_asr/rai_asr/__init__.py index ef74fc891..632cb1463 100644 --- a/src/rai_asr/rai_asr/__init__.py +++ b/src/rai_asr/rai_asr/__init__.py @@ -11,3 +11,23 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from .models import ( + BaseTranscriptionModel, + BaseVoiceDetectionModel, + FasterWhisper, + LocalWhisper, + OpenAIWhisper, + OpenWakeWord, + SileroVAD, +) + +__all__ = [ + "LocalWhisper", + "FasterWhisper", + "OpenAIWhisper", + "OpenWakeWord", + "SileroVAD", + "BaseTranscriptionModel", + "BaseVoiceDetectionModel", +] diff --git a/src/rai_asr/rai_asr/asr_clients.py b/src/rai_asr/rai_asr/asr_clients.py deleted file mode 100644 index e08d0afd0..000000000 --- a/src/rai_asr/rai_asr/asr_clients.py +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright (C) 2024 Robotec.AI -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import io -import os -from abc import abstractmethod -from functools import partial - -import numpy as np -import whisper -from numpy.typing import NDArray -from openai import OpenAI -from scipy.io import wavfile -from whisper.transcribe import transcribe - -# WARN: This file is going to be removed in favour of rai_asr.models - - -class ASRModel: - def __init__(self, model_name: str, sample_rate: int, language: str = "en"): - self.model_name = model_name - self.sample_rate = sample_rate - self.language = language - - @abstractmethod - def transcribe(self, data: NDArray[np.int16]) -> str: - pass - - def __call__(self, data: NDArray[np.int16]) -> str: - return self.transcribe(data) - - -class OpenAIWhisper(ASRModel): - def __init__(self, model_name: str, sample_rate: int, language: str = "en"): - super().__init__(model_name, sample_rate, language) - api_key = os.getenv("OPENAI_API_KEY") - if api_key is None: - raise ValueError("OPENAI_API_KEY environment variable is not set.") - self.api_key = api_key - self.openai_client = OpenAI() - self.model = partial( - self.openai_client.audio.transcriptions.create, - model=self.model_name, - ) - - def transcribe(self, data: NDArray[np.int16]) -> str: - with io.BytesIO() as temp_wav_buffer: - wavfile.write(temp_wav_buffer, self.sample_rate, data) - temp_wav_buffer.seek(0) - temp_wav_buffer.name = "temp.wav" - response = self.model(file=temp_wav_buffer, language=self.language) - transcription = response.text - return transcription - - -class LocalWhisper(ASRModel): - def __init__(self, model_name: str, sample_rate: int, language: str = "en"): - super().__init__(model_name, sample_rate, language) - self.whisper = whisper.load_model(self.model_name) - - def transcribe(self, data: NDArray[np.int16]) -> str: - result = transcribe(self.whisper, data.astype(np.float32) / 32768.0) - transcription = result["text"] - return transcription diff --git a/src/rai_asr/rai_asr/asr_node.py b/src/rai_asr/rai_asr/asr_node.py deleted file mode 100755 index 7dac9e268..000000000 --- a/src/rai_asr/rai_asr/asr_node.py +++ /dev/null @@ -1,402 +0,0 @@ -# Copyright (C) 2024 Robotec.AI -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import os -import time -from typing import Literal, Optional, cast - -import numpy as np -import rclpy -import sounddevice as sd -import torch -from numpy.typing import NDArray -from openwakeword.model import Model as OWWModel -from openwakeword.utils import download_models -from rcl_interfaces.msg import ParameterDescriptor, ParameterType -from rclpy.callback_groups import ReentrantCallbackGroup -from rclpy.executors import SingleThreadedExecutor -from rclpy.node import Node -from rclpy.qos import DurabilityPolicy, HistoryPolicy, QoSProfile, ReliabilityPolicy -from scipy.signal import resample -from std_msgs.msg import String - -VAD_SAMPLING_RATE = 16000 # default value used by silero vad -DEFAULT_BLOCKSIZE = 1280 - - -class ASRNode(Node): - def __init__(self): - super().__init__("rai_asr") # type: ignore - self._declare_parameters() - self._initialize_parameters() - self._setup_node_components() - self._setup_publishers_and_subscribers() - - self.asr_model = self._initialize_asr_model() - self.vad_model = self._initialize_vad_model() - self.oww_model = self._initialize_open_wake_word() - - self.initialize_sounddevice_stream() - - self.is_recording = False - self.audio_buffer = [] - self.silence_start_time: Optional[float] = None - self.last_transcription_time = 0 - self.hmi_lock = False - self.tts_lock = False - - self.current_chunk: Optional[NDArray[np.int16]] = None - - self.transcription_recording_timeout = 1 - self.get_logger().info("ASR Node has been initialized") # type: ignore - - def _declare_parameters(self): - self.declare_parameter( - "use_wake_word", - False, - descriptor=ParameterDescriptor( - type=ParameterType.PARAMETER_BOOL, - description=("Whether to use wake word for starting conversation"), - ), - ) - self.declare_parameter( - "wake_word_model", - "", - descriptor=ParameterDescriptor( - type=ParameterType.PARAMETER_STRING, - description=("Wake word model onnx file"), - ), - ) - self.declare_parameter( - "wake_word_threshold", - 0.1, - descriptor=ParameterDescriptor( - type=ParameterType.PARAMETER_DOUBLE, - description=("Wake word threshold"), - ), - ) - self.declare_parameter( - "vad_threshold", - 0.5, - descriptor=ParameterDescriptor( - type=ParameterType.PARAMETER_DOUBLE, - description=("VAD threshold"), - ), - ) - self.declare_parameter( - "recording_device", - 0, - descriptor=ParameterDescriptor( - type=ParameterType.PARAMETER_INTEGER, - description=( - "Recording device number. See available by running" - "python -c 'import sounddevice as sd; print(sd.query_devices())'" - ), - ), - ) - self.declare_parameter( - "model_vendor", - "whisper", # openai, whisper - ParameterDescriptor( - type=ParameterType.PARAMETER_STRING, - description="Vendor of the ASR model", - ), - ) - self.declare_parameter( - "language", - "en", - ParameterDescriptor( - type=ParameterType.PARAMETER_STRING, - description="Language code for the ASR model", - ), - ) - self.declare_parameter( - "model_name", - "base", - ParameterDescriptor( - type=ParameterType.PARAMETER_STRING, - description="Model type for the ASR model", - ), - ) - self.declare_parameter( - "silence_grace_period", - 1.0, - ParameterDescriptor( - type=ParameterType.PARAMETER_DOUBLE, - description="Grace period in seconds after silence to stop recording", - ), - ) - - def _initialize_open_wake_word(self) -> Optional[OWWModel]: - if self.use_wake_word: - download_models() - oww_model = OWWModel( - wakeword_models=[ - self.wake_word_model, - ], - inference_framework="onnx", - ) - self.get_logger().info("Wake word model has been initialized") # type: ignore - return oww_model - return None - - def _initialize_vad_model(self): - model, _ = torch.hub.load( - repo_or_dir="snakers4/silero-vad", - model="silero_vad", - ) - return model - - def _setup_node_components(self): - self.callback_group = ReentrantCallbackGroup() - - def _initialize_parameters(self): - self.silence_grace_period = cast( - float, - self.get_parameter("silence_grace_period") - .get_parameter_value() - .double_value, - ) - self.vad_threshold = cast( - float, - self.get_parameter("vad_threshold").get_parameter_value().double_value, - ) # type: ignore - self.model_name = ( - self.get_parameter("model_name").get_parameter_value().string_value - ) # type: ignore - self.model_vendor = ( - self.get_parameter("model_vendor").get_parameter_value().string_value - ) # type: ignore - self.language = ( - self.get_parameter("language").get_parameter_value().string_value - ) # type: ignore - - self.use_wake_word = cast( - bool, - self.get_parameter("use_wake_word").get_parameter_value().bool_value, - ) - self.wake_word_model = cast( - str, - self.get_parameter("wake_word_model").get_parameter_value().string_value, - ) - self.wake_word_threshold = cast( - float, - self.get_parameter("wake_word_threshold") - .get_parameter_value() - .double_value, - ) - self.recording_device_number = cast( - int, - self.get_parameter("recording_device").get_parameter_value().integer_value, - ) - - if self.use_wake_word: - if not os.path.exists(self.wake_word_model): - raise FileNotFoundError(f"Model file {self.wake_word_model} not found") - - self.get_logger().info("Parameters have been initialized") # type: ignore - - def _setup_publishers_and_subscribers(self): - reliable_qos = QoSProfile( - reliability=ReliabilityPolicy.RELIABLE, - durability=DurabilityPolicy.TRANSIENT_LOCAL, - history=HistoryPolicy.KEEP_ALL, - ) - self.transcription_publisher = self.create_publisher( - String, "/from_human", qos_profile=reliable_qos - ) - self.status_publisher = self.create_publisher(String, "/asr_status", 10) - self.tts_status_subscriber = self.create_subscription( - String, - "/tts_status", - self.tts_status_callback, - 10, - callback_group=self.callback_group, - ) - self.hmi_status_subscriber = self.create_subscription( - String, - "/hmi_status", - self.hmi_status_callback, - 10, - callback_group=self.callback_group, - ) - - def _initialize_asr_model(self): - if self.model_vendor == "openai": - from rai_asr.asr_clients import OpenAIWhisper - - self.model = OpenAIWhisper( - self.model_name, VAD_SAMPLING_RATE, self.language - ) - elif self.model_vendor == "whisper": - from rai_asr.asr_clients import LocalWhisper - - self.model = LocalWhisper(self.model_name, VAD_SAMPLING_RATE, self.language) - else: - raise ValueError(f"Unknown model vendor: {self.model_vendor}") - - def tts_status_callback(self, msg: String): - if msg.data == "processing": - self.tts_lock = True - elif msg.data == "waiting": - self.tts_lock = False - - def hmi_status_callback(self, msg: String): - if msg.data == "processing": - self.hmi_lock = True - elif msg.data == "waiting": - self.hmi_lock = False - - def should_listen(self, audio_data: NDArray[np.int16]) -> bool: - def int2float(sound: NDArray[np.int16]): - abs_max = np.abs(sound).max() - sound = sound.astype("float32") - if abs_max > 0: - sound *= 1 / 32768 - sound = sound.squeeze() - return sound - - vad_confidence = self.vad_model( - torch.tensor(int2float(audio_data[-512:])), VAD_SAMPLING_RATE - ).item() - - if self.oww_model: - if self.is_recording: - self.get_logger().debug(f"VAD confidence: {vad_confidence}") # type: ignore - return vad_confidence > self.vad_threshold - else: - predictions = self.oww_model.predict(audio_data) - for key, value in predictions.items(): - if value > self.wake_word_threshold: - self.get_logger().debug(f"Detected wake word: {key}") # type: ignore - self.oww_model.reset() - return True - else: - return vad_confidence > self.vad_threshold - - return False - - def sd_callback(self, indata, frames, _, status): - if status: - self.get_logger().warning(f"Stream status: {status}") # type: ignore - indata = indata.flatten() - sample_time_length = len(indata) / self.device_sample_rate - if self.device_sample_rate != VAD_SAMPLING_RATE: - indata = resample(indata, int(sample_time_length * VAD_SAMPLING_RATE)) - - asr_lock = ( - time.time() - < self.last_transcription_time + self.transcription_recording_timeout - ) - if asr_lock or self.hmi_lock or self.tts_lock: - return - - if not self.is_recording: # keep last 5 indata of audio ~ 400ms - self.audio_buffer.append(indata) - if len(self.audio_buffer) > 5: - self.audio_buffer.pop(0) - - if self.should_listen(indata): - self.silence_start_time = time.time() - if not self.is_recording: - self.start_recording() - self.audio_buffer.append(indata) - elif self.is_recording: - self.audio_buffer.append(indata) - if not isinstance(self.silence_start_time, float): - raise ValueError( - "Silence start time is not set, this should not happen" - ) - if time.time() - self.silence_start_time > self.silence_grace_period: - self.stop_recording_and_transcribe() - - def initialize_sounddevice_stream(self): - sd.default.latency = ("low", "low") - self.device_sample_rate = sd.query_devices( - device=self.recording_device_number, kind="input" - )[ - "default_samplerate" - ] # type: ignore - self.window_size_samples = int( - DEFAULT_BLOCKSIZE * self.device_sample_rate / VAD_SAMPLING_RATE - ) - self.stream = sd.InputStream( - samplerate=self.device_sample_rate, - channels=1, - device=self.recording_device_number, - dtype="int16", - blocksize=self.window_size_samples, - callback=self.sd_callback, - ) - self.stream.start() - - def reset_buffer(self): - self.audio_buffer.clear() - - def start_recording(self): - self.get_logger().info("Recording...") # type: ignore - self.publish_status("recording") - self.is_recording = True - - def stop_recording_and_transcribe(self): - self.get_logger().info("Stopped recording. Transcribing...") # type: ignore - self.is_recording = False - self.publish_status("transcribing") - self.transcribe_audio() - self.publish_status("waiting") - self.get_logger().info("Done transcribing.") # type: ignore - - def transcribe_audio(self): - combined_audio = np.concatenate(self.audio_buffer) - self.reset_buffer() # consume the buffer, so we don't transcribe the same audio twice - - transcription = self.model(data=combined_audio) - - if transcription.lower() in ["you", ""]: - self.get_logger().info(f"Dropping transcription: '{transcription}'") - self.publish_status("dropping") - else: - self.get_logger().info(f"Transcription: {transcription}") - self.publish_transcription(transcription) - - self.last_transcription_time = time.time() - - def publish_transcription(self, transcription: str): - msg = String() - msg.data = transcription - self.transcription_publisher.publish(msg) - - def publish_status( - self, status: Literal["recording", "transcribing", "dropping", "waiting"] - ): - msg = String() - msg.data = status - self.status_publisher.publish(msg) - - -def main(args=None): - rclpy.init(args=args) - node = ASRNode() - executor = SingleThreadedExecutor() - executor.add_node(node) - - try: - executor.spin() - except KeyboardInterrupt: - pass - finally: - executor.shutdown() - node.destroy_node() - rclpy.shutdown() diff --git a/src/rai_asr/rai_asr/models/__init__.py b/src/rai_asr/rai_asr/models/__init__.py index 1d1a7e9de..5451196bb 100644 --- a/src/rai_asr/rai_asr/models/__init__.py +++ b/src/rai_asr/rai_asr/models/__init__.py @@ -13,7 +13,7 @@ # limitations under the License. from rai_asr.models.base import BaseTranscriptionModel, BaseVoiceDetectionModel -from rai_asr.models.local_whisper import LocalWhisper +from rai_asr.models.local_whisper import FasterWhisper, LocalWhisper from rai_asr.models.open_ai_whisper import OpenAIWhisper from rai_asr.models.open_wake_word import OpenWakeWord from rai_asr.models.silero_vad import SileroVAD @@ -25,4 +25,5 @@ "BaseTranscriptionModel", "LocalWhisper", "OpenAIWhisper", + "FasterWhisper", ] diff --git a/src/rai_asr/resource/rai_asr b/src/rai_asr/resource/rai_asr deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/rai_asr/setup.cfg b/src/rai_asr/setup.cfg deleted file mode 100644 index 8499f73be..000000000 --- a/src/rai_asr/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script_dir=$base/lib/rai_asr -[install] -install_scripts=$base/lib/rai_asr diff --git a/src/rai_asr/setup.py b/src/rai_asr/setup.py deleted file mode 100644 index c85aa620a..000000000 --- a/src/rai_asr/setup.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2024 Robotec.AI -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import os -from glob import glob - -from setuptools import find_packages, setup - -package_name = "rai_asr" - -setup( - name=package_name, - version="0.0.0", - packages=find_packages(exclude=["test"]), - data_files=[ - ("share/ament_index/resource_index/packages", ["resource/" + package_name]), - ("share/" + package_name, ["package.xml"]), - (os.path.join("share", package_name, "launch"), glob("launch/*.launch.py")), - ], - install_requires=["setuptools"], - zip_safe=True, - maintainer="mkotynia", - maintainer_email="magdalena.kotynia@robotec.ai", - description="An Automatic Speech Recognition package, leveraging Whisper for transcription and \ - Silero VAD for voice activity detection. This node captures audio, detects speech, and \ - transcribes the spoken content, publishing the transcription to a topic. ", - license="Apache-2.0", - tests_require=["pytest"], - entry_points={ - "console_scripts": ["asr_node = rai_asr.asr_node:main"], - }, -) diff --git a/src/rai_interfaces/package.xml b/src/rai_interfaces/package.xml index 31009c3f6..e0d052615 100644 --- a/src/rai_interfaces/package.xml +++ b/src/rai_interfaces/package.xml @@ -23,6 +23,7 @@ nav2_simple_commander tf_transformations rosidl_default_runtime + portaudio19-dev rosidl_interface_packages ament_cmake From 57194488aabc7aa202d391cdaaf33a06eeef48b9 Mon Sep 17 00:00:00 2001 From: Maciej Majek Date: Mon, 27 Jan 2025 19:57:10 +0100 Subject: [PATCH 3/4] ci: run ci on draft prs --- .github/workflows/poetry-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/poetry-test.yml b/.github/workflows/poetry-test.yml index db279f574..dd47ccf93 100644 --- a/.github/workflows/poetry-test.yml +++ b/.github/workflows/poetry-test.yml @@ -9,7 +9,7 @@ on: jobs: build-and-test-ros2: - if: github.event.pull_request.draft == false + # if: github.event.pull_request.draft == false runs-on: - self-hosted From 2c808a0e75f8541fe6f2865e1351ef47f79f820f Mon Sep 17 00:00:00 2001 From: Maciej Majek <46171033+maciejmajek@users.noreply.github.com> Date: Mon, 27 Jan 2025 20:22:50 +0100 Subject: [PATCH 4/4] refactor: ros2 package structures (#391) --- .pre-commit-config.yaml | 10 +++++----- .../ros2}/rai_bringup/launch/hri.launch.py | 0 .../ros2}/rai_bringup/launch/openset.launch.py | 0 .../rai_bringup/launch/sim_whoami_demo.launch.py | 0 .../ros2}/rai_bringup/launch/voice.launch.py | 0 .../ros2}/rai_bringup/package.xml | 0 .../ros2}/rai_bringup/resource/rai_bringup | 0 src/{ => rai_extensions/ros2}/rai_bringup/setup.py | 0 .../ros2}/rai_interfaces/CMakeLists.txt | 0 .../ros2/rai_interfaces}/LICENSE | 0 .../ros2}/rai_interfaces/action/Task.action | 0 .../ros2}/rai_interfaces/action/TaskFeedback.action | 0 .../ros2}/rai_interfaces/msg/RAIDetectionArray.msg | 0 .../ros2}/rai_interfaces/package.xml | 0 .../ros2}/rai_interfaces/srv/ManipulatorMoveTo.srv | 0 .../ros2}/rai_interfaces/srv/RAIGroundedSam.srv | 0 .../ros2}/rai_interfaces/srv/RAIGroundingDino.srv | 0 .../ros2}/rai_interfaces/srv/StringList.srv | 0 .../rai_interfaces/srv/VectorStoreRetrieval.srv | 0 .../ros2}/rai_interfaces/srv/WhatISee.srv | 0 src/rai_extensions/{ => ros2}/rai_nomad/LICENSE | 0 src/rai_extensions/{ => ros2}/rai_nomad/README.md | 0 src/rai_extensions/{ => ros2}/rai_nomad/package.xml | 0 .../{ => ros2}/rai_nomad/rai_nomad/__init__.py | 0 .../{ => ros2}/rai_nomad/rai_nomad/nomad.py | 0 .../{ => ros2}/rai_nomad/resource/nomad_params.yaml | 0 .../{ => ros2}/rai_nomad/resource/rai_nomad | 0 src/rai_extensions/{ => ros2}/rai_nomad/setup.cfg | 0 src/rai_extensions/{ => ros2}/rai_nomad/setup.py | 0 .../{ => ros2}/rai_open_set_vision/.gitignore | 0 .../{ => ros2}/rai_open_set_vision/README.md | 0 .../rai_open_set_vision/images/sample.jpg | Bin .../launch/example_communication_launch.xml | 0 .../rai_open_set_vision/launch/gdino_launch.xml | 0 .../rai_open_set_vision/launch/gsam_launch.xml | 0 .../{ => ros2}/rai_open_set_vision/package.xml | 0 .../rai_open_set_vision/rai_open_set_vision/NOTICE | 0 .../rai_open_set_vision/__init__.py | 0 .../rai_open_set_vision/configs/__init__.py | 0 .../rai_open_set_vision/configs/gdino_config.py | 0 .../rai_open_set_vision/configs/seg_config.yml | 0 .../rai_open_set_vision/examples/__init__.py | 0 .../rai_open_set_vision/examples/talker.py | 0 .../rai_open_set_vision/services/__init__.py | 0 .../rai_open_set_vision/services/grounded_sam.py | 0 .../rai_open_set_vision/services/grounding_dino.py | 0 .../rai_open_set_vision/tools/__init__.py | 0 .../rai_open_set_vision/tools/gdino_tools.py | 0 .../rai_open_set_vision/tools/segmentation_tools.py | 0 .../rai_open_set_vision/vision_markup/__init__.py | 0 .../rai_open_set_vision/vision_markup/boxer.py | 0 .../rai_open_set_vision/vision_markup/segmenter.py | 0 .../resource/rai_open_set_vision | 0 .../{ => ros2}/rai_open_set_vision/setup.cfg | 0 .../{ => ros2}/rai_open_set_vision/setup.py | 0 .../ros2}/rai_state_logs/CMakeLists.txt | 0 .../ros2/rai_state_logs}/LICENSE | 0 .../ros2}/rai_state_logs/README.md | 0 .../rai_state_logs/launch/rai_state_logs.launch.py | 0 .../ros2}/rai_state_logs/package.xml | 0 .../rai_state_logs/src/rai_state_logs_node.cpp | 0 .../rai_state_logs/src/test_rai_state_logs_node.cpp | 0 .../ros2}/rai_whatisee/CMakeLists.txt | 0 .../ros2/rai_whatisee}/LICENSE | 0 .../ros2}/rai_whatisee/package.xml | 0 .../ros2}/rai_whatisee/src/rai_whatisee_node.cpp | 0 .../ros2/rai_whoami}/LICENSE | 0 .../ros2}/rai_whoami/launch/rai_whoami.launch.py | 0 .../ros2}/rai_whoami/package.xml | 0 .../ros2}/rai_whoami/rai_whoami/__init__.py | 0 .../ros2}/rai_whoami/rai_whoami/rai_whoami_node.py | 0 .../resource/default_robot_constitution.txt | 0 .../ros2}/rai_whoami/resource/rai_whoami | 0 src/{ => rai_extensions/ros2}/rai_whoami/setup.cfg | 0 src/{ => rai_extensions/ros2}/rai_whoami/setup.py | 0 75 files changed, 5 insertions(+), 5 deletions(-) rename src/{ => rai_extensions/ros2}/rai_bringup/launch/hri.launch.py (100%) rename src/{ => rai_extensions/ros2}/rai_bringup/launch/openset.launch.py (100%) rename src/{ => rai_extensions/ros2}/rai_bringup/launch/sim_whoami_demo.launch.py (100%) rename src/{ => rai_extensions/ros2}/rai_bringup/launch/voice.launch.py (100%) rename src/{ => rai_extensions/ros2}/rai_bringup/package.xml (100%) rename src/{ => rai_extensions/ros2}/rai_bringup/resource/rai_bringup (100%) rename src/{ => rai_extensions/ros2}/rai_bringup/setup.py (100%) rename src/{ => rai_extensions/ros2}/rai_interfaces/CMakeLists.txt (100%) rename src/{perception/rai_whatisee => rai_extensions/ros2/rai_interfaces}/LICENSE (100%) rename src/{ => rai_extensions/ros2}/rai_interfaces/action/Task.action (100%) rename src/{ => rai_extensions/ros2}/rai_interfaces/action/TaskFeedback.action (100%) rename src/{ => rai_extensions/ros2}/rai_interfaces/msg/RAIDetectionArray.msg (100%) rename src/{ => rai_extensions/ros2}/rai_interfaces/package.xml (100%) rename src/{ => rai_extensions/ros2}/rai_interfaces/srv/ManipulatorMoveTo.srv (100%) rename src/{ => rai_extensions/ros2}/rai_interfaces/srv/RAIGroundedSam.srv (100%) rename src/{ => rai_extensions/ros2}/rai_interfaces/srv/RAIGroundingDino.srv (100%) rename src/{ => rai_extensions/ros2}/rai_interfaces/srv/StringList.srv (100%) rename src/{ => rai_extensions/ros2}/rai_interfaces/srv/VectorStoreRetrieval.srv (100%) rename src/{ => rai_extensions/ros2}/rai_interfaces/srv/WhatISee.srv (100%) rename src/rai_extensions/{ => ros2}/rai_nomad/LICENSE (100%) rename src/rai_extensions/{ => ros2}/rai_nomad/README.md (100%) rename src/rai_extensions/{ => ros2}/rai_nomad/package.xml (100%) rename src/rai_extensions/{ => ros2}/rai_nomad/rai_nomad/__init__.py (100%) rename src/rai_extensions/{ => ros2}/rai_nomad/rai_nomad/nomad.py (100%) rename src/rai_extensions/{ => ros2}/rai_nomad/resource/nomad_params.yaml (100%) rename src/rai_extensions/{ => ros2}/rai_nomad/resource/rai_nomad (100%) rename src/rai_extensions/{ => ros2}/rai_nomad/setup.cfg (100%) rename src/rai_extensions/{ => ros2}/rai_nomad/setup.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/.gitignore (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/README.md (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/images/sample.jpg (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/launch/example_communication_launch.xml (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/launch/gdino_launch.xml (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/launch/gsam_launch.xml (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/package.xml (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/NOTICE (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/__init__.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/configs/__init__.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/configs/gdino_config.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/configs/seg_config.yml (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/examples/__init__.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/examples/talker.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/services/__init__.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/services/grounded_sam.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/services/grounding_dino.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/tools/__init__.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/tools/gdino_tools.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/tools/segmentation_tools.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/vision_markup/__init__.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/vision_markup/boxer.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/rai_open_set_vision/vision_markup/segmenter.py (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/resource/rai_open_set_vision (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/setup.cfg (100%) rename src/rai_extensions/{ => ros2}/rai_open_set_vision/setup.py (100%) rename src/{state_tools => rai_extensions/ros2}/rai_state_logs/CMakeLists.txt (100%) rename src/{rai_interfaces => rai_extensions/ros2/rai_state_logs}/LICENSE (100%) rename src/{state_tools => rai_extensions/ros2}/rai_state_logs/README.md (100%) rename src/{state_tools => rai_extensions/ros2}/rai_state_logs/launch/rai_state_logs.launch.py (100%) rename src/{state_tools => rai_extensions/ros2}/rai_state_logs/package.xml (100%) rename src/{state_tools => rai_extensions/ros2}/rai_state_logs/src/rai_state_logs_node.cpp (100%) rename src/{state_tools => rai_extensions/ros2}/rai_state_logs/src/test_rai_state_logs_node.cpp (100%) rename src/{perception => rai_extensions/ros2}/rai_whatisee/CMakeLists.txt (100%) rename src/{rai_whoami => rai_extensions/ros2/rai_whatisee}/LICENSE (100%) rename src/{perception => rai_extensions/ros2}/rai_whatisee/package.xml (100%) rename src/{perception => rai_extensions/ros2}/rai_whatisee/src/rai_whatisee_node.cpp (100%) rename src/{state_tools/rai_state_logs => rai_extensions/ros2/rai_whoami}/LICENSE (100%) rename src/{ => rai_extensions/ros2}/rai_whoami/launch/rai_whoami.launch.py (100%) rename src/{ => rai_extensions/ros2}/rai_whoami/package.xml (100%) rename src/{ => rai_extensions/ros2}/rai_whoami/rai_whoami/__init__.py (100%) rename src/{ => rai_extensions/ros2}/rai_whoami/rai_whoami/rai_whoami_node.py (100%) rename src/{ => rai_extensions/ros2}/rai_whoami/resource/default_robot_constitution.txt (100%) rename src/{ => rai_extensions/ros2}/rai_whoami/resource/rai_whoami (100%) rename src/{ => rai_extensions/ros2}/rai_whoami/setup.cfg (100%) rename src/{ => rai_extensions/ros2}/rai_whoami/setup.py (100%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2caf3cb76..cafdfa6eb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,11 +29,11 @@ repos: - id: autoflake args: ["--remove-all-unused-imports", "--in-place"] - - repo: https://github.com/pycqa/isort - rev: 5.13.2 - hooks: - - id: isort - args: ["--profile", "black", "--filter-files"] + # - repo: https://github.com/pycqa/isort + # rev: 5.13.2 + # hooks: + # - id: isort + # args: ["--profile", "black", "--filter-files"] - repo: https://github.com/psf/black rev: 24.4.2 diff --git a/src/rai_bringup/launch/hri.launch.py b/src/rai_extensions/ros2/rai_bringup/launch/hri.launch.py similarity index 100% rename from src/rai_bringup/launch/hri.launch.py rename to src/rai_extensions/ros2/rai_bringup/launch/hri.launch.py diff --git a/src/rai_bringup/launch/openset.launch.py b/src/rai_extensions/ros2/rai_bringup/launch/openset.launch.py similarity index 100% rename from src/rai_bringup/launch/openset.launch.py rename to src/rai_extensions/ros2/rai_bringup/launch/openset.launch.py diff --git a/src/rai_bringup/launch/sim_whoami_demo.launch.py b/src/rai_extensions/ros2/rai_bringup/launch/sim_whoami_demo.launch.py similarity index 100% rename from src/rai_bringup/launch/sim_whoami_demo.launch.py rename to src/rai_extensions/ros2/rai_bringup/launch/sim_whoami_demo.launch.py diff --git a/src/rai_bringup/launch/voice.launch.py b/src/rai_extensions/ros2/rai_bringup/launch/voice.launch.py similarity index 100% rename from src/rai_bringup/launch/voice.launch.py rename to src/rai_extensions/ros2/rai_bringup/launch/voice.launch.py diff --git a/src/rai_bringup/package.xml b/src/rai_extensions/ros2/rai_bringup/package.xml similarity index 100% rename from src/rai_bringup/package.xml rename to src/rai_extensions/ros2/rai_bringup/package.xml diff --git a/src/rai_bringup/resource/rai_bringup b/src/rai_extensions/ros2/rai_bringup/resource/rai_bringup similarity index 100% rename from src/rai_bringup/resource/rai_bringup rename to src/rai_extensions/ros2/rai_bringup/resource/rai_bringup diff --git a/src/rai_bringup/setup.py b/src/rai_extensions/ros2/rai_bringup/setup.py similarity index 100% rename from src/rai_bringup/setup.py rename to src/rai_extensions/ros2/rai_bringup/setup.py diff --git a/src/rai_interfaces/CMakeLists.txt b/src/rai_extensions/ros2/rai_interfaces/CMakeLists.txt similarity index 100% rename from src/rai_interfaces/CMakeLists.txt rename to src/rai_extensions/ros2/rai_interfaces/CMakeLists.txt diff --git a/src/perception/rai_whatisee/LICENSE b/src/rai_extensions/ros2/rai_interfaces/LICENSE similarity index 100% rename from src/perception/rai_whatisee/LICENSE rename to src/rai_extensions/ros2/rai_interfaces/LICENSE diff --git a/src/rai_interfaces/action/Task.action b/src/rai_extensions/ros2/rai_interfaces/action/Task.action similarity index 100% rename from src/rai_interfaces/action/Task.action rename to src/rai_extensions/ros2/rai_interfaces/action/Task.action diff --git a/src/rai_interfaces/action/TaskFeedback.action b/src/rai_extensions/ros2/rai_interfaces/action/TaskFeedback.action similarity index 100% rename from src/rai_interfaces/action/TaskFeedback.action rename to src/rai_extensions/ros2/rai_interfaces/action/TaskFeedback.action diff --git a/src/rai_interfaces/msg/RAIDetectionArray.msg b/src/rai_extensions/ros2/rai_interfaces/msg/RAIDetectionArray.msg similarity index 100% rename from src/rai_interfaces/msg/RAIDetectionArray.msg rename to src/rai_extensions/ros2/rai_interfaces/msg/RAIDetectionArray.msg diff --git a/src/rai_interfaces/package.xml b/src/rai_extensions/ros2/rai_interfaces/package.xml similarity index 100% rename from src/rai_interfaces/package.xml rename to src/rai_extensions/ros2/rai_interfaces/package.xml diff --git a/src/rai_interfaces/srv/ManipulatorMoveTo.srv b/src/rai_extensions/ros2/rai_interfaces/srv/ManipulatorMoveTo.srv similarity index 100% rename from src/rai_interfaces/srv/ManipulatorMoveTo.srv rename to src/rai_extensions/ros2/rai_interfaces/srv/ManipulatorMoveTo.srv diff --git a/src/rai_interfaces/srv/RAIGroundedSam.srv b/src/rai_extensions/ros2/rai_interfaces/srv/RAIGroundedSam.srv similarity index 100% rename from src/rai_interfaces/srv/RAIGroundedSam.srv rename to src/rai_extensions/ros2/rai_interfaces/srv/RAIGroundedSam.srv diff --git a/src/rai_interfaces/srv/RAIGroundingDino.srv b/src/rai_extensions/ros2/rai_interfaces/srv/RAIGroundingDino.srv similarity index 100% rename from src/rai_interfaces/srv/RAIGroundingDino.srv rename to src/rai_extensions/ros2/rai_interfaces/srv/RAIGroundingDino.srv diff --git a/src/rai_interfaces/srv/StringList.srv b/src/rai_extensions/ros2/rai_interfaces/srv/StringList.srv similarity index 100% rename from src/rai_interfaces/srv/StringList.srv rename to src/rai_extensions/ros2/rai_interfaces/srv/StringList.srv diff --git a/src/rai_interfaces/srv/VectorStoreRetrieval.srv b/src/rai_extensions/ros2/rai_interfaces/srv/VectorStoreRetrieval.srv similarity index 100% rename from src/rai_interfaces/srv/VectorStoreRetrieval.srv rename to src/rai_extensions/ros2/rai_interfaces/srv/VectorStoreRetrieval.srv diff --git a/src/rai_interfaces/srv/WhatISee.srv b/src/rai_extensions/ros2/rai_interfaces/srv/WhatISee.srv similarity index 100% rename from src/rai_interfaces/srv/WhatISee.srv rename to src/rai_extensions/ros2/rai_interfaces/srv/WhatISee.srv diff --git a/src/rai_extensions/rai_nomad/LICENSE b/src/rai_extensions/ros2/rai_nomad/LICENSE similarity index 100% rename from src/rai_extensions/rai_nomad/LICENSE rename to src/rai_extensions/ros2/rai_nomad/LICENSE diff --git a/src/rai_extensions/rai_nomad/README.md b/src/rai_extensions/ros2/rai_nomad/README.md similarity index 100% rename from src/rai_extensions/rai_nomad/README.md rename to src/rai_extensions/ros2/rai_nomad/README.md diff --git a/src/rai_extensions/rai_nomad/package.xml b/src/rai_extensions/ros2/rai_nomad/package.xml similarity index 100% rename from src/rai_extensions/rai_nomad/package.xml rename to src/rai_extensions/ros2/rai_nomad/package.xml diff --git a/src/rai_extensions/rai_nomad/rai_nomad/__init__.py b/src/rai_extensions/ros2/rai_nomad/rai_nomad/__init__.py similarity index 100% rename from src/rai_extensions/rai_nomad/rai_nomad/__init__.py rename to src/rai_extensions/ros2/rai_nomad/rai_nomad/__init__.py diff --git a/src/rai_extensions/rai_nomad/rai_nomad/nomad.py b/src/rai_extensions/ros2/rai_nomad/rai_nomad/nomad.py similarity index 100% rename from src/rai_extensions/rai_nomad/rai_nomad/nomad.py rename to src/rai_extensions/ros2/rai_nomad/rai_nomad/nomad.py diff --git a/src/rai_extensions/rai_nomad/resource/nomad_params.yaml b/src/rai_extensions/ros2/rai_nomad/resource/nomad_params.yaml similarity index 100% rename from src/rai_extensions/rai_nomad/resource/nomad_params.yaml rename to src/rai_extensions/ros2/rai_nomad/resource/nomad_params.yaml diff --git a/src/rai_extensions/rai_nomad/resource/rai_nomad b/src/rai_extensions/ros2/rai_nomad/resource/rai_nomad similarity index 100% rename from src/rai_extensions/rai_nomad/resource/rai_nomad rename to src/rai_extensions/ros2/rai_nomad/resource/rai_nomad diff --git a/src/rai_extensions/rai_nomad/setup.cfg b/src/rai_extensions/ros2/rai_nomad/setup.cfg similarity index 100% rename from src/rai_extensions/rai_nomad/setup.cfg rename to src/rai_extensions/ros2/rai_nomad/setup.cfg diff --git a/src/rai_extensions/rai_nomad/setup.py b/src/rai_extensions/ros2/rai_nomad/setup.py similarity index 100% rename from src/rai_extensions/rai_nomad/setup.py rename to src/rai_extensions/ros2/rai_nomad/setup.py diff --git a/src/rai_extensions/rai_open_set_vision/.gitignore b/src/rai_extensions/ros2/rai_open_set_vision/.gitignore similarity index 100% rename from src/rai_extensions/rai_open_set_vision/.gitignore rename to src/rai_extensions/ros2/rai_open_set_vision/.gitignore diff --git a/src/rai_extensions/rai_open_set_vision/README.md b/src/rai_extensions/ros2/rai_open_set_vision/README.md similarity index 100% rename from src/rai_extensions/rai_open_set_vision/README.md rename to src/rai_extensions/ros2/rai_open_set_vision/README.md diff --git a/src/rai_extensions/rai_open_set_vision/images/sample.jpg b/src/rai_extensions/ros2/rai_open_set_vision/images/sample.jpg similarity index 100% rename from src/rai_extensions/rai_open_set_vision/images/sample.jpg rename to src/rai_extensions/ros2/rai_open_set_vision/images/sample.jpg diff --git a/src/rai_extensions/rai_open_set_vision/launch/example_communication_launch.xml b/src/rai_extensions/ros2/rai_open_set_vision/launch/example_communication_launch.xml similarity index 100% rename from src/rai_extensions/rai_open_set_vision/launch/example_communication_launch.xml rename to src/rai_extensions/ros2/rai_open_set_vision/launch/example_communication_launch.xml diff --git a/src/rai_extensions/rai_open_set_vision/launch/gdino_launch.xml b/src/rai_extensions/ros2/rai_open_set_vision/launch/gdino_launch.xml similarity index 100% rename from src/rai_extensions/rai_open_set_vision/launch/gdino_launch.xml rename to src/rai_extensions/ros2/rai_open_set_vision/launch/gdino_launch.xml diff --git a/src/rai_extensions/rai_open_set_vision/launch/gsam_launch.xml b/src/rai_extensions/ros2/rai_open_set_vision/launch/gsam_launch.xml similarity index 100% rename from src/rai_extensions/rai_open_set_vision/launch/gsam_launch.xml rename to src/rai_extensions/ros2/rai_open_set_vision/launch/gsam_launch.xml diff --git a/src/rai_extensions/rai_open_set_vision/package.xml b/src/rai_extensions/ros2/rai_open_set_vision/package.xml similarity index 100% rename from src/rai_extensions/rai_open_set_vision/package.xml rename to src/rai_extensions/ros2/rai_open_set_vision/package.xml diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/NOTICE b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/NOTICE similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/NOTICE rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/NOTICE diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/__init__.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/__init__.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/__init__.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/__init__.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/configs/__init__.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/configs/__init__.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/configs/__init__.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/configs/__init__.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/configs/gdino_config.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/configs/gdino_config.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/configs/gdino_config.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/configs/gdino_config.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/configs/seg_config.yml b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/configs/seg_config.yml similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/configs/seg_config.yml rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/configs/seg_config.yml diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/examples/__init__.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/examples/__init__.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/examples/__init__.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/examples/__init__.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/examples/talker.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/examples/talker.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/examples/talker.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/examples/talker.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/services/__init__.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/services/__init__.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/services/__init__.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/services/__init__.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/services/grounded_sam.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/services/grounded_sam.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/services/grounded_sam.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/services/grounded_sam.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/services/grounding_dino.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/services/grounding_dino.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/services/grounding_dino.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/services/grounding_dino.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/tools/__init__.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/tools/__init__.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/tools/__init__.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/tools/__init__.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/tools/gdino_tools.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/tools/gdino_tools.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/tools/gdino_tools.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/tools/gdino_tools.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/tools/segmentation_tools.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/tools/segmentation_tools.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/tools/segmentation_tools.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/tools/segmentation_tools.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/vision_markup/__init__.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/vision_markup/__init__.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/vision_markup/__init__.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/vision_markup/__init__.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/vision_markup/boxer.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/vision_markup/boxer.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/vision_markup/boxer.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/vision_markup/boxer.py diff --git a/src/rai_extensions/rai_open_set_vision/rai_open_set_vision/vision_markup/segmenter.py b/src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/vision_markup/segmenter.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/rai_open_set_vision/vision_markup/segmenter.py rename to src/rai_extensions/ros2/rai_open_set_vision/rai_open_set_vision/vision_markup/segmenter.py diff --git a/src/rai_extensions/rai_open_set_vision/resource/rai_open_set_vision b/src/rai_extensions/ros2/rai_open_set_vision/resource/rai_open_set_vision similarity index 100% rename from src/rai_extensions/rai_open_set_vision/resource/rai_open_set_vision rename to src/rai_extensions/ros2/rai_open_set_vision/resource/rai_open_set_vision diff --git a/src/rai_extensions/rai_open_set_vision/setup.cfg b/src/rai_extensions/ros2/rai_open_set_vision/setup.cfg similarity index 100% rename from src/rai_extensions/rai_open_set_vision/setup.cfg rename to src/rai_extensions/ros2/rai_open_set_vision/setup.cfg diff --git a/src/rai_extensions/rai_open_set_vision/setup.py b/src/rai_extensions/ros2/rai_open_set_vision/setup.py similarity index 100% rename from src/rai_extensions/rai_open_set_vision/setup.py rename to src/rai_extensions/ros2/rai_open_set_vision/setup.py diff --git a/src/state_tools/rai_state_logs/CMakeLists.txt b/src/rai_extensions/ros2/rai_state_logs/CMakeLists.txt similarity index 100% rename from src/state_tools/rai_state_logs/CMakeLists.txt rename to src/rai_extensions/ros2/rai_state_logs/CMakeLists.txt diff --git a/src/rai_interfaces/LICENSE b/src/rai_extensions/ros2/rai_state_logs/LICENSE similarity index 100% rename from src/rai_interfaces/LICENSE rename to src/rai_extensions/ros2/rai_state_logs/LICENSE diff --git a/src/state_tools/rai_state_logs/README.md b/src/rai_extensions/ros2/rai_state_logs/README.md similarity index 100% rename from src/state_tools/rai_state_logs/README.md rename to src/rai_extensions/ros2/rai_state_logs/README.md diff --git a/src/state_tools/rai_state_logs/launch/rai_state_logs.launch.py b/src/rai_extensions/ros2/rai_state_logs/launch/rai_state_logs.launch.py similarity index 100% rename from src/state_tools/rai_state_logs/launch/rai_state_logs.launch.py rename to src/rai_extensions/ros2/rai_state_logs/launch/rai_state_logs.launch.py diff --git a/src/state_tools/rai_state_logs/package.xml b/src/rai_extensions/ros2/rai_state_logs/package.xml similarity index 100% rename from src/state_tools/rai_state_logs/package.xml rename to src/rai_extensions/ros2/rai_state_logs/package.xml diff --git a/src/state_tools/rai_state_logs/src/rai_state_logs_node.cpp b/src/rai_extensions/ros2/rai_state_logs/src/rai_state_logs_node.cpp similarity index 100% rename from src/state_tools/rai_state_logs/src/rai_state_logs_node.cpp rename to src/rai_extensions/ros2/rai_state_logs/src/rai_state_logs_node.cpp diff --git a/src/state_tools/rai_state_logs/src/test_rai_state_logs_node.cpp b/src/rai_extensions/ros2/rai_state_logs/src/test_rai_state_logs_node.cpp similarity index 100% rename from src/state_tools/rai_state_logs/src/test_rai_state_logs_node.cpp rename to src/rai_extensions/ros2/rai_state_logs/src/test_rai_state_logs_node.cpp diff --git a/src/perception/rai_whatisee/CMakeLists.txt b/src/rai_extensions/ros2/rai_whatisee/CMakeLists.txt similarity index 100% rename from src/perception/rai_whatisee/CMakeLists.txt rename to src/rai_extensions/ros2/rai_whatisee/CMakeLists.txt diff --git a/src/rai_whoami/LICENSE b/src/rai_extensions/ros2/rai_whatisee/LICENSE similarity index 100% rename from src/rai_whoami/LICENSE rename to src/rai_extensions/ros2/rai_whatisee/LICENSE diff --git a/src/perception/rai_whatisee/package.xml b/src/rai_extensions/ros2/rai_whatisee/package.xml similarity index 100% rename from src/perception/rai_whatisee/package.xml rename to src/rai_extensions/ros2/rai_whatisee/package.xml diff --git a/src/perception/rai_whatisee/src/rai_whatisee_node.cpp b/src/rai_extensions/ros2/rai_whatisee/src/rai_whatisee_node.cpp similarity index 100% rename from src/perception/rai_whatisee/src/rai_whatisee_node.cpp rename to src/rai_extensions/ros2/rai_whatisee/src/rai_whatisee_node.cpp diff --git a/src/state_tools/rai_state_logs/LICENSE b/src/rai_extensions/ros2/rai_whoami/LICENSE similarity index 100% rename from src/state_tools/rai_state_logs/LICENSE rename to src/rai_extensions/ros2/rai_whoami/LICENSE diff --git a/src/rai_whoami/launch/rai_whoami.launch.py b/src/rai_extensions/ros2/rai_whoami/launch/rai_whoami.launch.py similarity index 100% rename from src/rai_whoami/launch/rai_whoami.launch.py rename to src/rai_extensions/ros2/rai_whoami/launch/rai_whoami.launch.py diff --git a/src/rai_whoami/package.xml b/src/rai_extensions/ros2/rai_whoami/package.xml similarity index 100% rename from src/rai_whoami/package.xml rename to src/rai_extensions/ros2/rai_whoami/package.xml diff --git a/src/rai_whoami/rai_whoami/__init__.py b/src/rai_extensions/ros2/rai_whoami/rai_whoami/__init__.py similarity index 100% rename from src/rai_whoami/rai_whoami/__init__.py rename to src/rai_extensions/ros2/rai_whoami/rai_whoami/__init__.py diff --git a/src/rai_whoami/rai_whoami/rai_whoami_node.py b/src/rai_extensions/ros2/rai_whoami/rai_whoami/rai_whoami_node.py similarity index 100% rename from src/rai_whoami/rai_whoami/rai_whoami_node.py rename to src/rai_extensions/ros2/rai_whoami/rai_whoami/rai_whoami_node.py diff --git a/src/rai_whoami/resource/default_robot_constitution.txt b/src/rai_extensions/ros2/rai_whoami/resource/default_robot_constitution.txt similarity index 100% rename from src/rai_whoami/resource/default_robot_constitution.txt rename to src/rai_extensions/ros2/rai_whoami/resource/default_robot_constitution.txt diff --git a/src/rai_whoami/resource/rai_whoami b/src/rai_extensions/ros2/rai_whoami/resource/rai_whoami similarity index 100% rename from src/rai_whoami/resource/rai_whoami rename to src/rai_extensions/ros2/rai_whoami/resource/rai_whoami diff --git a/src/rai_whoami/setup.cfg b/src/rai_extensions/ros2/rai_whoami/setup.cfg similarity index 100% rename from src/rai_whoami/setup.cfg rename to src/rai_extensions/ros2/rai_whoami/setup.cfg diff --git a/src/rai_whoami/setup.py b/src/rai_extensions/ros2/rai_whoami/setup.py similarity index 100% rename from src/rai_whoami/setup.py rename to src/rai_extensions/ros2/rai_whoami/setup.py