Kaynağa Gözat

Cherry-pick changes from 2409.2 back to development (#836)

* Bump versions of robotic gems and templates (#831)
* Update repo.json
* Remove Python ROS 2 Smoke test (not working; not testing)

Signed-off-by: Jan Hanca <[email protected]>
Signed-off-by: Michał Pełka <[email protected]>
Co-authored-by: Michał Pełka <[email protected]>
Jan Hanca 4 ay önce
ebeveyn
işleme
633e6e4db0

+ 0 - 1
Gems/ROS2/Code/CMakeLists.txt

@@ -256,4 +256,3 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
     endif()
     endif()
 endif()
 endif()
 
 
-add_subdirectory(PythonTests)

+ 0 - 22
Gems/ROS2/Code/PythonTests/CMakeLists.txt

@@ -1,22 +0,0 @@
-# Copyright (c) Contributors to the Open 3D Engine Project.
-# For complete copyright and license terms please see the LICENSE at the root of this distribution.
-#
-# SPDX-License-Identifier: Apache-2.0 OR MIT
-
-if (PAL_TRAIT_BUILD_TESTS_SUPPORTED)
-    if (PAL_TRAIT_TEST_PYTEST_SUPPORTED)
-        # PAL_TRAIT_BUILD macros are used by platform detection.
-        ly_add_pytest(
-                NAME Gem::${gem_name}.PythonTests
-                TEST_SUITE smoke
-                TEST_SERIAL
-                PATH ${CMAKE_CURRENT_LIST_DIR}/SmokeTests_Periodic.py
-                RUNTIME_DEPENDENCIES
-                    Legacy::Editor
-                    AZ::AssetProcessor
-                    ${gem_name}.Editor
-                COMPONENT
-                    SmokeTests
-        )
-    endif ()
-endif ()

+ 0 - 19
Gems/ROS2/Code/PythonTests/SmokeTests_Periodic.py

@@ -1,19 +0,0 @@
-#
-# Copyright (c) Contributors to the Open 3D Engine Project.
-# For complete copyright and license terms please see the LICENSE at the root of this distribution.
-#
-# SPDX-License-Identifier: Apache-2.0 OR MIT
-#
-
-import pytest
-from ly_test_tools.o3de.editor_test import EditorTestSuite, EditorSingleTest
-
-
[email protected]_periodic  # Marks the test suite as being part of a Periodic test suite
[email protected]("launcher_platform", ['linux_editor'])  # This test works on Linux editor
[email protected]("project", ["AutomatedTesting"])  # Use the AutomatedTesting project
-class TestAutomation(EditorTestSuite):
-    # Declaring a class that extends from EditorSingleTest declares a single test.
-    class SmokeTests_EnterGameModeWorks(EditorSingleTest):
-        # This runs a Single Test in a single Editor. For further work check EditorSingleTest siblings
-        from .tests import SmokeTests_EnterGameModeWorks as test_module

+ 0 - 6
Gems/ROS2/Code/PythonTests/__init__.py

@@ -1,6 +0,0 @@
-"""
-Copyright (c) Contributors to the Open 3D Engine Project.
-For complete copyright and license terms please see the LICENSE at the root of this distribution.
-
-SPDX-License-Identifier: Apache-2.0 OR MIT
-"""

+ 0 - 114
Gems/ROS2/Code/PythonTests/tests/SmokeTests_EnterGameModeWorks.py

@@ -1,114 +0,0 @@
-#
-# Copyright (c) Contributors to the Open 3D Engine Project.
-# For complete copyright and license terms please see the LICENSE at the root of this distribution.
-#
-# SPDX-License-Identifier: Apache-2.0 OR MIT
-#
-
-# Test Case Title : Check that entering into game mode works
-
-# List of results that we want to check, this is not 100% necessary but its a good
-# practice to make it easier to debug tests.
-# Here we define a tuple of tests
-
-# Paths to ROS rclpy are added directly as pytest is not accessing PYTHONPATH environment variable
-import sys
-
-sys.path.append('/opt/ros/humble/lib/python3.10/site-packages')
-sys.path.append('/opt/ros/humble/local/lib/python3.10/dist-packages')
-
-
-class Tests:
-    enter_game_mode = ("Entered game mode", "Failed to enter game mode")
-    topics_published = ("Topics were published during game mode", "Failed to publish topics during game mode")
-    topics_not_published_outside_of_game_mode = (
-        "All simulation topics closed", "Failed to close publishers after simulation")
-
-
-def check_result(result, msg):
-    from editor_python_test_tools.utils import Report
-    if not result:
-        Report.result(msg, False)
-        raise Exception(msg + " : FAILED")
-
-
-def check_topics():
-    import rclpy
-    from rclpy.node import Node
-
-    def get_topic_list():
-        node_dummy = Node("_ros2cli_dummy_to_show_topic_list")
-        result = node_dummy.get_topic_names_and_types()
-        node_dummy.destroy_node()
-        return result
-
-    topics = []
-    rclpy.init()
-    topic_list = get_topic_list()
-
-    for info in topic_list:
-        topics.append(info[0])
-    rclpy.shutdown()
-    return topics
-
-
-def SmokeTest_EnterGameModeWorks():
-    # Description: This test checks that entering into game mode works by opening an empty level
-    # and entering into the game mode. The is in game mode state should be changed after doing it
-    # Next it checks if there are some additional ROS topics published during the game mode
-
-    # Import report and test helper utilities
-    from editor_python_test_tools.utils import Report
-    from editor_python_test_tools.utils import TestHelper as helper
-    # All exposed python bindings are in azlmbr
-    import azlmbr.legacy.general as general
-
-    # Required for automated tests
-    helper.init_idle()
-
-    # Open the level called "DefaultLevel".
-    # We use a DefaultLevel level for a smoke test.
-    # ROS2 System Component should publish topics listed below regardless of level
-    # - /tf
-    # - /tf_static
-    # - /clock
-    helper.open_level(level="DefaultLevel", directory='')
-
-    topics_before_game_mode = check_topics()
-
-    # Using the exposed Python API from editor in CryEditPy.py we can enter into game mode this way
-    general.enter_game_mode()
-
-    # The script drives the execution of the test, to return the flow back to the editor,
-    # we will tick it one time
-    general.idle_wait_frames(1)
-
-    # Now we can use the Report.result() to report the state of a result
-    # if the second argument is false, it will mark this test as failed, however it will keep going.
-    Report.result(Tests.enter_game_mode, general.is_in_game_mode())
-
-    topics_in_game_mode = check_topics()
-
-    Report.result(Tests.topics_published, len(topics_in_game_mode) > len(topics_before_game_mode))
-
-    # Instead of using Report.result(), you can also use:
-    # assert is_in_game_mode, "Didn't enter into game mode"
-    # However this would stop the test at this point and not report anything when it succeeds
-
-    # The test will end at this point, is good practice to exit game mode or reset any changed stated
-    # *DO NOT* close the editor, the editor will close automatically and report the error code
-    general.exit_game_mode()
-
-    # this line is needed to update the simulation state
-    general.idle_wait_frames(1)
-
-    topics_after_game_mode = check_topics()
-    Report.result(Tests.topics_not_published_outside_of_game_mode,
-                  len(topics_after_game_mode) == len(topics_before_game_mode))
-
-
-if __name__ == "__main__":
-    # This utility starts up the test and sets up the state for knowing what test is currently being run
-    from editor_python_test_tools.utils import Report
-
-    Report.start_test(SmokeTest_EnterGameModeWorks)

+ 1 - 1
Gems/ROS2/gem.json

@@ -23,7 +23,7 @@
         "o3de>=4.2.0"
         "o3de>=4.2.0"
     ],
     ],
     "icon_path": "preview.png",
     "icon_path": "preview.png",
-    "requirements": "Requires ROS 2 installation (supported distributions: Humble and Jazzy). Source your workspace before building the Gem",
+    "requirements": "Requires ROS 2 installation (supported distributions: Humble, Jazzy). Source your workspace before building the Gem",
     "documentation_url": "https://docs.o3de.org/docs/user-guide/gems/reference/robotics/ros2/",
     "documentation_url": "https://docs.o3de.org/docs/user-guide/gems/reference/robotics/ros2/",
     "dependencies": [
     "dependencies": [
         "Atom_RPI",
         "Atom_RPI",

+ 1 - 1
Gems/RosRobotSample/Assets/ROSbot.prefab

@@ -2091,4 +2091,4 @@
             }
             }
         }
         }
     }
     }
-}
+}

+ 2 - 2
Templates/Ros2FleetRobotTemplate/template.json

@@ -1,6 +1,6 @@
 {
 {
     "template_name": "Ros2FleetRobotTemplate",
     "template_name": "Ros2FleetRobotTemplate",
-    "version": "2.0.2",
+    "version": "2.0.3",
     "origin": "Open 3D Engine Extras",
     "origin": "Open 3D Engine Extras",
     "origin_url": "https://github.com/o3de/o3de-extras",
     "origin_url": "https://github.com/o3de/o3de-extras",
     "repo_uri": "https://raw.githubusercontent.com/o3de/o3de-extras/development",
     "repo_uri": "https://raw.githubusercontent.com/o3de/o3de-extras/development",
@@ -493,5 +493,5 @@
             "dir": "Examples/ros2_ws/src/o3de_fleet_nav/test"
             "dir": "Examples/ros2_ws/src/o3de_fleet_nav/test"
         }
         }
     ],
     ],
-    "download_source_uri": "https://github.com/o3de/o3de-extras/releases/download/2.0/ros2fleetrobottemplate-2.0.2-template.zip"
+    "download_source_uri": "https://github.com/o3de/o3de-extras/releases/download/2.0/ros2fleetrobottemplate-2.0.3-template.zip"
 }
 }

+ 2 - 2
Templates/Ros2RoboticManipulationTemplate/template.json

@@ -1,6 +1,6 @@
 {
 {
     "template_name": "Ros2RoboticManipulationTemplate",
     "template_name": "Ros2RoboticManipulationTemplate",
-    "version": "2.0.1",
+    "version": "2.0.2",
     "origin": "https://github.com/o3de/o3de-extras",
     "origin": "https://github.com/o3de/o3de-extras",
     "license": "https://github.com/o3de/o3de-extras/tree/development/Templates/Ros2RoboticManipulationTemplate/Template/LICENSE.txt",
     "license": "https://github.com/o3de/o3de-extras/tree/development/Templates/Ros2RoboticManipulationTemplate/Template/LICENSE.txt",
     "display_name": "ROS2 Robotic Manipulation",
     "display_name": "ROS2 Robotic Manipulation",
@@ -834,5 +834,5 @@
         }
         }
     ],
     ],
     "repo_uri": "https://raw.githubusercontent.com/o3de/o3de-extras/development",
     "repo_uri": "https://raw.githubusercontent.com/o3de/o3de-extras/development",
-    "download_source_uri": "https://github.com/o3de/o3de-extras/releases/download/2.0/ros2roboticmanipulationtemplate-2.0.1-template.zip"
+    "download_source_uri": "https://github.com/o3de/o3de-extras/releases/download/2.0/ros2roboticmanipulationtemplate-2.0.2-template.zip"
 }
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1235 - 224
repo.json


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor