Przeglądaj źródła

[RFC 96] Redo `ROS2` Gem (system components; cmake) (#897)

* Regenerate ROS2 Gem
* Update the dependencies in ROS2Controllers, ROS2RobotImporter and ROS2Sensors
* Clean up tests in ROS2 Gem

Signed-off-by: Jan Hanca <[email protected]>
Jan Hanca 2 miesięcy temu
rodzic
commit
cc44125f2e
94 zmienionych plików z 607 dodań i 978 usunięć
  1. 0 3
      Gems/ROS2/Assets/Models/Sensors/Camera/AO.png
  2. 0 3
      Gems/ROS2/Assets/Models/Sensors/Camera/Body_Diffuse.png
  3. 0 3
      Gems/ROS2/Assets/Models/Sensors/Camera/CameraOrbbeck.fbx
  4. 0 47
      Gems/ROS2/Assets/Models/Sensors/Camera/CameraOrbbeck.fbx.assetinfo
  5. 0 3
      Gems/ROS2/Assets/Models/Sensors/LidarOS2/LidarOS2.fbx
  6. 0 47
      Gems/ROS2/Assets/Models/Sensors/LidarOS2/LidarOS2.fbx.assetinfo
  7. 0 23
      Gems/ROS2/Assets/Models/Sensors/LidarOS2/LidarOS2_OS2Material.material
  8. 0 3
      Gems/ROS2/Assets/Models/Sensors/LidarOS2/textures/AO_green.png
  9. 0 3
      Gems/ROS2/Assets/Models/Sensors/LidarOS2/textures/AO_grey.png
  10. 0 3
      Gems/ROS2/Assets/Models/Sensors/LidarOS2/textures/Diffuse.png
  11. 0 3
      Gems/ROS2/Assets/Models/Sensors/LidarOS2/textures/Metallic.png
  12. 0 3
      Gems/ROS2/Assets/Models/Sensors/LidarOS2/textures/Roughness.png
  13. 0 3
      Gems/ROS2/Assets/Models/Sensors/LidarOS2/textures/Smoothness.png
  14. 0 163
      Gems/ROS2/Assets/Prefabs/Sensors/CameraOrbbeck.prefab
  15. 0 271
      Gems/ROS2/Assets/Prefabs/Sensors/LidarOS2.prefab
  16. 0 7
      Gems/ROS2/Assets/Sdf/empty.sdf
  17. 2 14
      Gems/ROS2/CMakeLists.txt
  18. 160 93
      Gems/ROS2/Code/CMakeLists.txt
  19. 1 1
      Gems/ROS2/Code/FindROS2.cmake
  20. 3 3
      Gems/ROS2/Code/Include/ROS2/Clock/RealTimeSource.h
  21. 8 7
      Gems/ROS2/Code/Include/ROS2/Communication/PublisherConfiguration.h
  22. 2 1
      Gems/ROS2/Code/Include/ROS2/Communication/QoS.h
  23. 5 4
      Gems/ROS2/Code/Include/ROS2/Communication/TopicConfiguration.h
  24. 2 1
      Gems/ROS2/Code/Include/ROS2/Frame/NamespaceConfiguration.h
  25. 2 1
      Gems/ROS2/Code/Include/ROS2/Frame/ROS2FrameComponent.h
  26. 2 1
      Gems/ROS2/Code/Include/ROS2/Frame/ROS2FrameConfiguration.h
  27. 2 1
      Gems/ROS2/Code/Include/ROS2/Frame/ROS2FrameEditorComponent.h
  28. 3 1
      Gems/ROS2/Code/Include/ROS2/ROS2Bus.h
  29. 46 0
      Gems/ROS2/Code/Include/ROS2/ROS2TypeIds.h
  30. 2 1
      Gems/ROS2/Code/Include/ROS2/Sensor/Events/EventSourceAdapter.h
  31. 2 1
      Gems/ROS2/Code/Include/ROS2/Sensor/Events/PhysicsBasedSource.h
  32. 4 2
      Gems/ROS2/Code/Include/ROS2/Sensor/Events/TickBasedSource.h
  33. 3 2
      Gems/ROS2/Code/Include/ROS2/Spawner/SpawnerBus.h
  34. 3 3
      Gems/ROS2/Code/Include/ROS2/Spawner/SpawnerBusHandler.h
  35. 3 1
      Gems/ROS2/Code/Platform/Android/PAL_android.cmake
  36. 3 0
      Gems/ROS2/Code/Platform/Android/ros2_api_files.cmake
  37. 8 0
      Gems/ROS2/Code/Platform/Android/ros2_private_files.cmake
  38. 8 0
      Gems/ROS2/Code/Platform/Android/ros2_shared_files.cmake
  39. 0 11
      Gems/ROS2/Code/Platform/Common/Clang/ros2_static_editor_clang.cmake
  40. 0 11
      Gems/ROS2/Code/Platform/Common/GCC/ros2_static_editor_gcc.cmake
  41. 3 1
      Gems/ROS2/Code/Platform/Linux/PAL_linux.cmake
  42. 3 0
      Gems/ROS2/Code/Platform/Linux/ros2_api_files.cmake
  43. 3 0
      Gems/ROS2/Code/Platform/Linux/ros2_editor_api_files.cmake
  44. 8 0
      Gems/ROS2/Code/Platform/Linux/ros2_private_files.cmake
  45. 8 0
      Gems/ROS2/Code/Platform/Linux/ros2_shared_files.cmake
  46. 3 1
      Gems/ROS2/Code/Platform/Mac/PAL_mac.cmake
  47. 3 0
      Gems/ROS2/Code/Platform/Mac/ros2_api_files.cmake
  48. 3 0
      Gems/ROS2/Code/Platform/Mac/ros2_editor_api_files.cmake
  49. 8 0
      Gems/ROS2/Code/Platform/Mac/ros2_private_files.cmake
  50. 8 0
      Gems/ROS2/Code/Platform/Mac/ros2_shared_files.cmake
  51. 3 1
      Gems/ROS2/Code/Platform/Windows/PAL_windows.cmake
  52. 3 0
      Gems/ROS2/Code/Platform/Windows/ros2_api_files.cmake
  53. 3 0
      Gems/ROS2/Code/Platform/Windows/ros2_editor_api_files.cmake
  54. 8 0
      Gems/ROS2/Code/Platform/Windows/ros2_private_files.cmake
  55. 8 0
      Gems/ROS2/Code/Platform/Windows/ros2_shared_files.cmake
  56. 3 1
      Gems/ROS2/Code/Platform/iOS/PAL_ios.cmake
  57. 3 0
      Gems/ROS2/Code/Platform/iOS/ros2_api_files.cmake
  58. 8 0
      Gems/ROS2/Code/Platform/iOS/ros2_private_files.cmake
  59. 8 0
      Gems/ROS2/Code/Platform/iOS/ros2_shared_files.cmake
  60. 7 1
      Gems/ROS2/Code/Source/Clients/ROS2Module.cpp
  61. 3 0
      Gems/ROS2/Code/Source/Clients/ROS2SystemComponent.cpp
  62. 9 8
      Gems/ROS2/Code/Source/Clients/ROS2SystemComponent.h
  63. 8 6
      Gems/ROS2/Code/Source/Frame/ROS2FrameComponent.cpp
  64. 45 0
      Gems/ROS2/Code/Source/ROS2ModuleInterface.cpp
  65. 11 26
      Gems/ROS2/Code/Source/ROS2ModuleInterface.h
  66. 8 4
      Gems/ROS2/Code/Source/Tools/ROS2EditorModule.cpp
  67. 6 1
      Gems/ROS2/Code/Source/Tools/ROS2EditorSystemComponent.cpp
  68. 7 3
      Gems/ROS2/Code/Source/Tools/ROS2EditorSystemComponent.h
  69. 1 1
      Gems/ROS2/Code/Tests/Frame/ROS2FrameComponentTest.cpp
  70. 0 11
      Gems/ROS2/Code/Tests/ROS2EditorTest.cpp
  71. 0 11
      Gems/ROS2/Code/Tests/ROS2Test.cpp
  72. 0 3
      Gems/ROS2/Code/frame_test_files.cmake
  73. 30 0
      Gems/ROS2/Code/ros2_api_files.cmake
  74. 2 5
      Gems/ROS2/Code/ros2_editor_api_files.cmake
  75. 2 4
      Gems/ROS2/Code/ros2_editor_private_files.cmake
  76. 1 1
      Gems/ROS2/Code/ros2_editor_shared_files.cmake
  77. 1 1
      Gems/ROS2/Code/ros2_editor_tests_files.cmake
  78. 0 42
      Gems/ROS2/Code/ros2_files.cmake
  79. 0 29
      Gems/ROS2/Code/ros2_header_files.cmake
  80. 26 0
      Gems/ROS2/Code/ros2_private_files.cmake
  81. 27 0
      Gems/ROS2/Code/ros2_shared_api_files.cmake
  82. 0 1
      Gems/ROS2/Code/ros2_shared_files.cmake
  83. 19 0
      Gems/ROS2/Code/ros2_target_depends.cmake
  84. 0 1
      Gems/ROS2/Code/ros2_tests_files.cmake
  85. 0 3
      Gems/ROS2/Registry/assetprocessor_settings.setreg
  86. 0 41
      Gems/ROS2/Registry/sceneassetimporter.setreg
  87. 8 15
      Gems/ROS2/gem.json
  88. 0 2
      Gems/ROS2/requirements.txt
  89. 5 1
      Gems/ROS2Controllers/Code/CMakeLists.txt
  90. 2 1
      Gems/ROS2Controllers/gem.json
  91. 3 2
      Gems/ROS2RobotImporter/Code/CMakeLists.txt
  92. 0 0
      Gems/ROS2RobotImporter/Registry/sdfassetbuilder_settings.setreg
  93. 3 1
      Gems/ROS2Sensors/Code/CMakeLists.txt
  94. 2 1
      Gems/ROS2Sensors/gem.json

+ 0 - 3
Gems/ROS2/Assets/Models/Sensors/Camera/AO.png

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a02e1525050efa303a1e2f4f0873a27565a8e9c86601f6bd6dba59ae05110645
-size 1488731

+ 0 - 3
Gems/ROS2/Assets/Models/Sensors/Camera/Body_Diffuse.png

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9988892afcb8f4a2fc35b2059ce9364cdb8eb1f795be1da753ffad36bf7b7392
-size 62867

+ 0 - 3
Gems/ROS2/Assets/Models/Sensors/Camera/CameraOrbbeck.fbx

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a409d15dff6905764f833d9c1776d91d47aa106cea0f36def24d3997e3f670b7
-size 86204

+ 0 - 47
Gems/ROS2/Assets/Models/Sensors/Camera/CameraOrbbeck.fbx.assetinfo

@@ -1,47 +0,0 @@
-{
-    "values": [
-        {
-            "$type": "{5B03C8E6-8CEE-4DA0-A7FA-CD88689DD45B} MeshGroup",
-            "id": "{4EC8CA5C-ED77-539D-A0D5-FDE774D3AE48}",
-            "name": "CameraOrbbeck",
-            "NodeSelectionList": {
-                "selectedNodes": [
-                    "RootNode.Collider"
-                ],
-                "unselectedNodes": [
-                    {},
-                    "RootNode",
-                    "RootNode.Orbbeck"
-                ]
-            },
-            "MaterialSlots": [
-                "DefaultMaterial"
-            ],
-            "PhysicsMaterials": [
-                "<Default Physics Material>"
-            ]
-        },
-        {
-            "$type": "{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup",
-            "name": "CameraOrbbeck",
-            "nodeSelectionList": {
-                "selectedNodes": [
-                    {},
-                    "RootNode",
-                    "RootNode.Orbbeck"
-                ],
-                "unselectedNodes": [
-                    "RootNode.Collider"
-                ]
-            },
-            "rules": {
-                "rules": [
-                    {
-                        "$type": "MaterialRule"
-                    }
-                ]
-            },
-            "id": "{DD50FDF8-5780-543A-AA6E-E5D30DFE7E72}"
-        }
-    ]
-}

+ 0 - 3
Gems/ROS2/Assets/Models/Sensors/LidarOS2/LidarOS2.fbx

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d1a630c97a3b192f56b42e87650edfb1f10a4967cb2c7211d7ac00eb487d1b0f
-size 237180

+ 0 - 47
Gems/ROS2/Assets/Models/Sensors/LidarOS2/LidarOS2.fbx.assetinfo

@@ -1,47 +0,0 @@
-{
-    "values": [
-        {
-            "$type": "{5B03C8E6-8CEE-4DA0-A7FA-CD88689DD45B} MeshGroup",
-            "id": "{8B671FF3-450D-5007-AC79-F2E406301A08}",
-            "name": "LidarOS2",
-            "NodeSelectionList": {
-                "selectedNodes": [
-                    "RootNode.Collider"
-                ],
-                "unselectedNodes": [
-                    {},
-                    "RootNode",
-                    "RootNode.OS2"
-                ]
-            },
-            "MaterialSlots": [
-                "DefaultMaterial"
-            ],
-            "PhysicsMaterials": [
-                "<Default Physics Material>"
-            ]
-        },
-        {
-            "$type": "{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup",
-            "name": "LidarOS2",
-            "nodeSelectionList": {
-                "selectedNodes": [
-                    {},
-                    "RootNode",
-                    "RootNode.OS2"
-                ],
-                "unselectedNodes": [
-                    "RootNode.Collider"
-                ]
-            },
-            "rules": {
-                "rules": [
-                    {
-                        "$type": "MaterialRule"
-                    }
-                ]
-            },
-            "id": "{830ADBFF-66E2-505D-BEE1-EFBD789FDF62}"
-        }
-    ]
-}

+ 0 - 23
Gems/ROS2/Assets/Models/Sensors/LidarOS2/LidarOS2_OS2Material.material

@@ -1,23 +0,0 @@
-{
-    "materialType": "@gemroot:Atom_Feature_Common@/Assets/Materials/Types/StandardPBR.materialtype",
-    "materialTypeVersion": 5,
-    "propertyValues": {
-        "baseColor.color": [
-            0.800000011920929,
-            0.800000011920929,
-            0.800000011920929,
-            1.0
-        ],
-        "baseColor.textureMap": "textures/Diffuse.png",
-        "emissive.color": [
-            0.0,
-            0.0,
-            0.0,
-            1.0
-        ],
-        "metallic.textureMap": "textures/Metallic.png",
-        "occlusion.diffuseTextureMap": "textures/AO_grey.png",
-        "opacity.factor": 1.0,
-        "roughness.textureMap": "textures/Roughness.png"
-    }
-}

+ 0 - 3
Gems/ROS2/Assets/Models/Sensors/LidarOS2/textures/AO_green.png

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f312eb2eac4a1d5cf7f3ebbdccc5f9e7095b810a912f715926c39b7d18864e91
-size 901336

+ 0 - 3
Gems/ROS2/Assets/Models/Sensors/LidarOS2/textures/AO_grey.png

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:da65cd46f8e182ce09bde559243ebe05f000f99c2ef3088266ac27cc2ed56f81
-size 915623

+ 0 - 3
Gems/ROS2/Assets/Models/Sensors/LidarOS2/textures/Diffuse.png

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a111f317cd4903a72c6f9b899b53737c008d68c9fff0b2389f40f40b880a43e0
-size 133579

+ 0 - 3
Gems/ROS2/Assets/Models/Sensors/LidarOS2/textures/Metallic.png

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:aac819c415821e7d8a96bbfeda3d8ea05ce379159ba97b941589808afefa7bde
-size 123338

+ 0 - 3
Gems/ROS2/Assets/Models/Sensors/LidarOS2/textures/Roughness.png

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:76c6ff5762bd2a50feab6cfc170bc9245264335d5894319d07b50a31c088a785
-size 123950

+ 0 - 3
Gems/ROS2/Assets/Models/Sensors/LidarOS2/textures/Smoothness.png

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:702ab6984e68abcfc434e90f3475badc9bbeeb8ef7edadd986ec84db985951a1
-size 123513

+ 0 - 163
Gems/ROS2/Assets/Prefabs/Sensors/CameraOrbbeck.prefab

@@ -1,163 +0,0 @@
-{
-    "ContainerEntity": {
-        "Id": "ContainerEntity",
-        "Name": "CameraOrbbeck",
-        "Components": {
-            "Component_[11102275644839424768]": {
-                "$type": "EditorDisabledCompositionComponent",
-                "Id": 11102275644839424768
-            },
-            "Component_[13196476423961983989]": {
-                "$type": "EditorVisibilityComponent",
-                "Id": 13196476423961983989
-            },
-            "Component_[13762686544738860494]": {
-                "$type": "EditorPendingCompositionComponent",
-                "Id": 13762686544738860494
-            },
-            "Component_[14647808383678281689]": {
-                "$type": "EditorPrefabComponent",
-                "Id": 14647808383678281689
-            },
-            "Component_[16541569782343084053]": {
-                "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
-                "Id": 16541569782343084053,
-                "Parent Entity": ""
-            },
-            "Component_[362243497987326595]": {
-                "$type": "EditorEntitySortComponent",
-                "Id": 362243497987326595,
-                "Child Entity Order": [
-                    "Entity_[505721939488]"
-                ]
-            },
-            "Component_[6195463370225568393]": {
-                "$type": "EditorLockComponent",
-                "Id": 6195463370225568393
-            },
-            "Component_[7051867183047048361]": {
-                "$type": "EditorEntityIconComponent",
-                "Id": 7051867183047048361
-            },
-            "Component_[8693333803190442857]": {
-                "$type": "EditorOnlyEntityComponent",
-                "Id": 8693333803190442857
-            },
-            "Component_[921489768285039708]": {
-                "$type": "EditorInspectorComponent",
-                "Id": 921489768285039708
-            }
-        }
-    },
-    "Entities": {
-        "Entity_[505721939488]": {
-            "Id": "Entity_[505721939488]",
-            "Name": "shape",
-            "Components": {
-                "Component_[12057597801334645923]": {
-                    "$type": "EditorStaticRigidBodyComponent",
-                    "Id": 12057597801334645923
-                },
-                "Component_[12232650884412772636]": {
-                    "$type": "EditorDisabledCompositionComponent",
-                    "Id": 12232650884412772636
-                },
-                "Component_[13423704711553959863]": {
-                    "$type": "EditorLockComponent",
-                    "Id": 13423704711553959863
-                },
-                "Component_[14616296837285217185]": {
-                    "$type": "EditorVisibilityComponent",
-                    "Id": 14616296837285217185
-                },
-                "Component_[14985514809153430690]": {
-                    "$type": "EditorMeshColliderComponent",
-                    "Id": 14985514809153430690,
-                    "ColliderConfiguration": {
-                        "MaterialSlots": {
-                            "Slots": [
-                                {
-                                    "Name": "DefaultMaterial"
-                                }
-                            ]
-                        }
-                    },
-                    "ShapeConfiguration": {
-                        "PhysicsAsset": {
-                            "Asset": {
-                                "assetId": {
-                                    "guid": "{0E27CF27-5752-5557-B77A-4B29A5870E0E}",
-                                    "subId": 3865077323
-                                },
-                                "assetHint": "models/sensors/camera/cameraorbbeck.fbx.pxmesh"
-                            },
-                            "Configuration": {
-                                "PhysicsAsset": {
-                                    "assetId": {
-                                        "guid": "{0E27CF27-5752-5557-B77A-4B29A5870E0E}",
-                                        "subId": 3865077323
-                                    },
-                                    "loadBehavior": "QueueLoad",
-                                    "assetHint": "models/sensors/camera/cameraorbbeck.fbx.pxmesh"
-                                }
-                            }
-                        }
-                    }
-                },
-                "Component_[15329441649387498950]": {
-                    "$type": "AZ::Render::EditorMeshComponent",
-                    "Id": 15329441649387498950,
-                    "Controller": {
-                        "Configuration": {
-                            "ModelAsset": {
-                                "assetId": {
-                                    "guid": "{0E27CF27-5752-5557-B77A-4B29A5870E0E}",
-                                    "subId": 272993556
-                                },
-                                "assetHint": "models/sensors/camera/cameraorbbeck.azmodel"
-                            }
-                        }
-                    }
-                },
-                "Component_[16525421850445080131]": {
-                    "$type": "EditorPendingCompositionComponent",
-                    "Id": 16525421850445080131
-                },
-                "Component_[1664914396196781949]": {
-                    "$type": "EditorEntityIconComponent",
-                    "Id": 1664914396196781949
-                },
-                "Component_[18099860883597356778]": {
-                    "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
-                    "Id": 18099860883597356778,
-                    "Parent Entity": "ContainerEntity"
-                },
-                "Component_[18322469032445804849]": {
-                    "$type": "EditorOnlyEntityComponent",
-                    "Id": 18322469032445804849
-                },
-                "Component_[2491808840491479985]": {
-                    "$type": "EditorInspectorComponent",
-                    "Id": 2491808840491479985,
-                    "ComponentOrderEntryArray": [
-                        {
-                            "ComponentId": 18099860883597356778
-                        },
-                        {
-                            "ComponentId": 15329441649387498950,
-                            "SortIndex": 1
-                        },
-                        {
-                            "ComponentId": 14985514809153430690,
-                            "SortIndex": 2
-                        }
-                    ]
-                },
-                "Component_[6578496273892635118]": {
-                    "$type": "EditorEntitySortComponent",
-                    "Id": 6578496273892635118
-                }
-            }
-        }
-    }
-}

+ 0 - 271
Gems/ROS2/Assets/Prefabs/Sensors/LidarOS2.prefab

@@ -1,271 +0,0 @@
-{
-    "ContainerEntity": {
-        "Id": "ContainerEntity",
-        "Name": "LidarOS2",
-        "Components": {
-            "Component_[11054240545439632695]": {
-                "$type": "EditorPendingCompositionComponent",
-                "Id": 11054240545439632695
-            },
-            "Component_[12267693294305582384]": {
-                "$type": "EditorPrefabComponent",
-                "Id": 12267693294305582384
-            },
-            "Component_[13753717631378233523]": {
-                "$type": "EditorInspectorComponent",
-                "Id": 13753717631378233523
-            },
-            "Component_[14137377640240728084]": {
-                "$type": "EditorOnlyEntityComponent",
-                "Id": 14137377640240728084
-            },
-            "Component_[17530435867448426523]": {
-                "$type": "EditorLockComponent",
-                "Id": 17530435867448426523
-            },
-            "Component_[18045801361193694910]": {
-                "$type": "EditorEntityIconComponent",
-                "Id": 18045801361193694910
-            },
-            "Component_[3246013088748543125]": {
-                "$type": "EditorEntitySortComponent",
-                "Id": 3246013088748543125,
-                "Child Entity Order": [
-                    "Entity_[417184227077]"
-                ]
-            },
-            "Component_[5389828146587111030]": {
-                "$type": "EditorDisabledCompositionComponent",
-                "Id": 5389828146587111030
-            },
-            "Component_[5989395931141545750]": {
-                "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
-                "Id": 5989395931141545750,
-                "Parent Entity": ""
-            },
-            "Component_[6982904761689756877]": {
-                "$type": "EditorVisibilityComponent",
-                "Id": 6982904761689756877
-            }
-        }
-    },
-    "Entities": {
-        "Entity_[1273969985848]": {
-            "Id": "Entity_[1273969985848]",
-            "Name": "Sensor",
-            "Components": {
-                "Component_[1058300359310703890]": {
-                    "$type": "ROS2FrameEditorComponent",
-                    "Id": 1058300359310703890,
-                    "ROS2FrameConfiguration": {
-                        "Namespace Configuration": {
-                            "Namespace Strategy": 1
-                        },
-                        "Frame Name": "lidar"
-                    }
-                },
-                "Component_[1067011392942644324]": {
-                    "$type": "EditorEntityIconComponent",
-                    "Id": 1067011392942644324
-                },
-                "Component_[10842630456390194262]": {
-                    "$type": "GenericComponentWrapper",
-                    "Id": 10842630456390194262,
-                    "m_template": {
-                        "$type": "ROS2LidarSensorComponent",
-                        "SensorConfiguration": {
-                            "Publishers": {
-                                "sensor_msgs::msg::PointCloud2": {
-                                    "Type": "sensor_msgs::msg::PointCloud2",
-                                    "Topic": "pc"
-                                }
-                            }
-                        }
-                    }
-                },
-                "Component_[13013301136498148727]": {
-                    "$type": "EditorPendingCompositionComponent",
-                    "Id": 13013301136498148727
-                },
-                "Component_[13444160964623421011]": {
-                    "$type": "EditorLockComponent",
-                    "Id": 13444160964623421011
-                },
-                "Component_[14110476541514862518]": {
-                    "$type": "EditorOnlyEntityComponent",
-                    "Id": 14110476541514862518
-                },
-                "Component_[17124975368240161289]": {
-                    "$type": "EditorVisibilityComponent",
-                    "Id": 17124975368240161289
-                },
-                "Component_[1863593986687460136]": {
-                    "$type": "EditorDisabledCompositionComponent",
-                    "Id": 1863593986687460136
-                },
-                "Component_[3070834537283917104]": {
-                    "$type": "EditorInspectorComponent",
-                    "Id": 3070834537283917104
-                },
-                "Component_[7054215981025466544]": {
-                    "$type": "EditorEntitySortComponent",
-                    "Id": 7054215981025466544
-                },
-                "Component_[8854312938977545065]": {
-                    "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
-                    "Id": 8854312938977545065,
-                    "Parent Entity": "Entity_[417184227077]",
-                    "Transform Data": {
-                        "Translate": [
-                            0.0,
-                            0.0,
-                            0.06961321830749512
-                        ]
-                    }
-                }
-            }
-        },
-        "Entity_[417184227077]": {
-            "Id": "Entity_[417184227077]",
-            "Name": "LidarOS2",
-            "Components": {
-                "Component_[10387713135725007135]": {
-                    "$type": "AZ::Render::EditorMeshComponent",
-                    "Id": 10387713135725007135,
-                    "Controller": {
-                        "Configuration": {
-                            "ModelAsset": {
-                                "assetId": {
-                                    "guid": "{99D850A3-8E59-5E78-93FE-AE8DB228684D}",
-                                    "subId": 268955557
-                                },
-                                "assetHint": "models/sensors/lidaros2/lidaros2.azmodel"
-                            }
-                        }
-                    }
-                },
-                "Component_[11659553095730431803]": {
-                    "$type": "EditorPendingCompositionComponent",
-                    "Id": 11659553095730431803
-                },
-                "Component_[13177781661023720894]": {
-                    "$type": "EditorOnlyEntityComponent",
-                    "Id": 13177781661023720894
-                },
-                "Component_[14535670656735835043]": {
-                    "$type": "EditorMeshColliderComponent",
-                    "Id": 14535670656735835043,
-                    "ColliderConfiguration": {
-                        "CollisionGroupId": {
-                            "GroupId": "{DED3A46E-3588-4BB8-BADF-E3114DBA95A6}"
-                        },
-                        "MaterialSlots": {
-                            "Slots": [
-                                {
-                                    "Name": "DefaultMaterial"
-                                }
-                            ]
-                        }
-                    },
-                    "ShapeConfiguration": {
-                        "PhysicsAsset": {
-                            "Asset": {
-                                "assetId": {
-                                    "guid": "{99D850A3-8E59-5E78-93FE-AE8DB228684D}",
-                                    "subId": 2574200790
-                                },
-                                "assetHint": "models/sensors/lidaros2/lidaros2.fbx.pxmesh"
-                            },
-                            "Configuration": {
-                                "PhysicsAsset": {
-                                    "assetId": {
-                                        "guid": "{99D850A3-8E59-5E78-93FE-AE8DB228684D}",
-                                        "subId": 2574200790
-                                    },
-                                    "loadBehavior": "QueueLoad",
-                                    "assetHint": "models/sensors/lidaros2/lidaros2.fbx.pxmesh"
-                                }
-                            }
-                        }
-                    }
-                },
-                "Component_[17075071070477116796]": {
-                    "$type": "EditorDisabledCompositionComponent",
-                    "Id": 17075071070477116796
-                },
-                "Component_[226256536131696604]": {
-                    "$type": "EditorStaticRigidBodyComponent",
-                    "Id": 226256536131696604
-                },
-                "Component_[3201525403568523459]": {
-                    "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
-                    "Id": 3201525403568523459,
-                    "Parent Entity": "ContainerEntity"
-                },
-                "Component_[5004394864880282263]": {
-                    "$type": "EditorEntityIconComponent",
-                    "Id": 5004394864880282263
-                },
-                "Component_[5142969012241927438]": {
-                    "$type": "EditorInspectorComponent",
-                    "Id": 5142969012241927438,
-                    "ComponentOrderEntryArray": [
-                        {
-                            "ComponentId": 3201525403568523459
-                        },
-                        {
-                            "ComponentId": 10387713135725007135,
-                            "SortIndex": 1
-                        },
-                        {
-                            "ComponentId": 18284489930066132216,
-                            "SortIndex": 2
-                        },
-                        {
-                            "ComponentId": 98811077871648366,
-                            "SortIndex": 3
-                        }
-                    ]
-                },
-                "Component_[6216877561479815861]": {
-                    "$type": "EditorMaterialComponent",
-                    "Id": 6216877561479815861,
-                    "Controller": {
-                        "Configuration": {
-                            "materials": [
-                                {
-                                    "Key": {
-                                        "materialSlotStableId": 3498918361
-                                    },
-                                    "Value": {
-                                        "MaterialAsset": {
-                                            "assetId": {
-                                                "guid": "{305BAE93-C067-5CA7-8C6F-6D9737E15C1B}"
-                                            },
-                                            "assetHint": "models/sensors/lidaros2/lidaros2_os2material.azmaterial"
-                                        }
-                                    }
-                                }
-                            ]
-                        }
-                    }
-                },
-                "Component_[6868930103042649999]": {
-                    "$type": "EditorLockComponent",
-                    "Id": 6868930103042649999
-                },
-                "Component_[8621809176728013021]": {
-                    "$type": "EditorVisibilityComponent",
-                    "Id": 8621809176728013021
-                },
-                "Component_[8808389010192194694]": {
-                    "$type": "EditorEntitySortComponent",
-                    "Id": 8808389010192194694,
-                    "Child Entity Order": [
-                        "Entity_[1273969985848]"
-                    ]
-                }
-            }
-        }
-    }
-}

+ 0 - 7
Gems/ROS2/Assets/Sdf/empty.sdf

@@ -1,7 +0,0 @@
-<?xml version='1.0'?>
-<sdf version="1.4">
-  <model name="empty_model">
-    <link name="empty_link">
-    </link>
-  </model>
-</sdf>

+ 2 - 14
Gems/ROS2/CMakeLists.txt

@@ -3,24 +3,12 @@
 #
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 
-# Query the gem name from the gem.json file if possible
-# otherwise fallback to using ${Name}
-o3de_find_ancestor_gem_root(gempath gem_name "${CMAKE_CURRENT_SOURCE_DIR}")
-if (NOT gem_name)
-    set(gem_name "ROS2")
-endif()
-
-# Add pip requirements required for ros2 packages.
-update_pip_requirements(${CMAKE_CURRENT_LIST_DIR}/requirements.txt ROS2)
+o3de_gem_setup("ROS2")
 
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/Code")
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE)
 
-set(gem_path ${CMAKE_CURRENT_LIST_DIR})
-set(gem_json ${gem_path}/gem.json)
-o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
-
-ly_add_external_target_path(${CMAKE_CURRENT_LIST_DIR}/3rdParty)
+ly_add_external_target_path(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty)
 
 # Include ROS2 target function here so that every Project with this Gem can make use of it
 # Currently only affects the Gem itself but this likely will change in the future

+ 160 - 93
Gems/ROS2/Code/CMakeLists.txt

@@ -3,10 +3,21 @@
 #
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 
-# Only allow this gem to be configured on platforms that are currently supported
-include(${CMAKE_CURRENT_SOURCE_DIR}/Platform/${PAL_PLATFORM_NAME}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
-if(NOT PAL_TRAIT_BUILD_ROS2_GEM_SUPPORTED)
-    message(FATAL_ERROR "The ROS2 Gem is not currently supported on ${PAL_PLATFORM_NAME}")
+# Currently we are in the Code folder: ${CMAKE_CURRENT_LIST_DIR}
+# Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}
+# Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform
+#       in which case it will see if that platform is present here or in the restricted folder.
+#       i.e. It could here in our gem : Gems/ROS2/Code/Platform/<platorm_name>  or
+#            <restricted_folder>/<platform_name>/Gems/ROS2/Code
+o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
+
+# Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the
+# traits for this platform. Traits for a platform are defines for things like whether or not something in this gem
+# is supported by this platform.
+include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
+
+# Check to see if building the Gem Modules are supported for the current platform
+if(NOT PAL_TRAIT_ROS2_SUPPORTED)
     return()
 endif()
 
@@ -41,110 +52,163 @@ add_custom_target(
     COMMAND ${CMAKE_COMMAND} -DROS_DISTRO=${ROS_DISTRO} -P ${CMAKE_CURRENT_SOURCE_DIR}/checkROS2Distribution.cmake
 )
 
-# Add the ROS2.Static target
-# Note: We include the common files and the platform specific files which are set in ros2_common_files.cmake
-# and in ${pal_dir}/ros2_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
+# Add the static target with the API Interface and the code
+# TODO: This target should be removed after API is fully implemented with buses
 ly_add_target(
     NAME ${gem_name}.Static STATIC
     NAMESPACE Gem
     FILES_CMAKE
-        ros2_header_files.cmake
-        ros2_files.cmake
+        ros2_api_files.cmake
+        ros2_shared_api_files.cmake
     INCLUDE_DIRECTORIES
         PUBLIC
             Include
         PRIVATE
             Source
-            Source/VehicleDynamics
     BUILD_DEPENDENCIES
         PUBLIC
             AZ::AzCore
-            AZ::AzFramework
-            Gem::Atom_RPI.Public
-            Gem::Atom_Feature_Common.Public
-            Gem::Atom_Component_DebugCamera.Static
-            Gem::Atom_AtomBridge.Static
-            Gem::StartingPointInput
-            Gem::PhysX5.Static
-            Gem::LmbrCentral.API
-            Gem::LevelGeoreferencing.API
+            AZ::AzToolsFramework
+            Gem::${gem_name}.Private.Object
 )
 
-target_depends_on_ros2_packages(${gem_name}.Static rclcpp builtin_interfaces std_msgs sensor_msgs nav_msgs tf2_ros ackermann_msgs gazebo_msgs vision_msgs control_msgs)
-
+# The ${gem_name}.API target declares the common interface that users of this gem should depend on in their targets
 ly_add_target(
-    NAME ${gem_name}.API HEADERONLY
+    NAME ${gem_name}.API INTERFACE
     NAMESPACE Gem
     FILES_CMAKE
-        ros2_header_files.cmake
+        ros2_api_files.cmake
+        ${pal_dir}/ros2_api_files.cmake
     INCLUDE_DIRECTORIES
         INTERFACE
             Include
+    BUILD_DEPENDENCIES
+        INTERFACE
+            AZ::AzCore
 )
 
-# Here add ROS2 target, it depends on the ROS2.Static
+target_interface_depends_on_ros2_packages(${gem_name}.API rclcpp builtin_interfaces geometry_msgs)
+
+# The ${gem_name}.Private.Object target is an internal target
+# It should not be used outside of this Gems CMakeLists.txt
+ly_add_target(
+    NAME ${gem_name}.Private.Object STATIC
+    NAMESPACE Gem
+    FILES_CMAKE
+        ros2_private_files.cmake
+        ${pal_dir}/ros2_private_files.cmake
+    TARGET_PROPERTIES
+        O3DE_PRIVATE_TARGET TRUE
+    INCLUDE_DIRECTORIES
+        PRIVATE
+            Include
+            Source
+    BUILD_DEPENDENCIES
+        PUBLIC
+            AZ::AzCore
+            AZ::AzFramework
+            Gem::Atom_AtomBridge.Static # FollowingCameraComponent
+            Gem::LevelGeoreferencing.API # ROS2SpawnerComponent
+)
+
+target_depends_on_ros2_packages(${gem_name}.Private.Object rclcpp builtin_interfaces std_msgs sensor_msgs nav_msgs tf2_ros ackermann_msgs gazebo_msgs vision_msgs control_msgs)
+
+# Here add ${gem_name} target, it depends on the Private Object library and Public API interface
 ly_add_target(
     NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
     NAMESPACE Gem
     FILES_CMAKE
         ros2_shared_files.cmake
+        ${pal_dir}/ros2_shared_files.cmake
     INCLUDE_DIRECTORIES
         PUBLIC
             Include
         PRIVATE
             Source
     BUILD_DEPENDENCIES
-        PRIVATE
+        PUBLIC
+            Gem::${gem_name}.API
             Gem::${gem_name}.Static
-            Gem::Atom_Feature_Common.Public
+        PRIVATE
+            Gem::${gem_name}.Private.Object
 )
 
-# By default, we will specify that the above target ROS2 would be used by
-# Client, Server and Unified type targets when this gem is enabled.  If you don't want it
-# active in Clients, Servers or Unified by default, delete one or more of the following lines:
+# Include the gem name into the Client Module source file
+# for use with the AZ_DECLARE_MODULE_CLASS macro
+# This is to allow renaming of the gem to also cause
+# the CreateModuleClass_Gem_<gem-name> function which
+# is used to bootstrap the gem in monolithic builds to link to the new gem name
+ly_add_source_properties(
+SOURCES
+    Source/Clients/ROS2Module.cpp
+PROPERTY COMPILE_DEFINITIONS
+    VALUES
+        O3DE_GEM_NAME=${gem_name}
+        O3DE_GEM_VERSION=${gem_version})
+
+# By default, we will specify that the above target ${gem_name} would be used by
+# Client and Server type targets when this gem is enabled.  If you don't want it
+# active in Clients or Servers by default, delete one of both of the following lines:
 ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
 ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
 ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})
 
-# If we are on a host platform, we want to add the host tools targets like the ${gem_name}.Editor target which
-# will also depend on ${gem_name}.Static
+# For the Client and Server variants of ${gem_name} Gem, an alias to the ${gem_name}.API target will be made
+ly_create_alias(NAME ${gem_name}.Clients.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
+ly_create_alias(NAME ${gem_name}.Servers.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
+ly_create_alias(NAME ${gem_name}.Unified.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
+
+# Add in CMake dependencies for each gem dependency listed in this gem's gem.json file
+# for the Clients, Servers, Unified gem variants
+o3de_add_variant_dependencies_for_gem_dependencies(GEM_NAME ${gem_name} VARIANTS Clients Servers Unified)
+
+# If we are on a host platform, we want to add the host tools targets like the ${gem_name}.Editor MODULE target
 if(PAL_TRAIT_BUILD_HOST_TOOLS)
+    # The ${gem_name}.Editor.API target can be used by other gems that want to interact with the ${gem_name}.Editor module
     ly_add_target(
-        NAME ${gem_name}.Editor.Static STATIC
+        NAME ${gem_name}.Editor.API INTERFACE
+        NAMESPACE Gem
+        FILES_CMAKE
+            ros2_editor_api_files.cmake
+            ${pal_dir}/ros2_editor_api_files.cmake
+        INCLUDE_DIRECTORIES
+            INTERFACE
+                Include
+        BUILD_DEPENDENCIES
+            INTERFACE
+                AZ::AzToolsFramework
+    )
+
+    # The ${gem_name}.Editor.Private.Object target is an internal target
+    # which is only to be used by this gems CMakeLists.txt and any subdirectories
+    # Other gems should not use this target
+    ly_add_target(
+        NAME ${gem_name}.Editor.Private.Object STATIC
         NAMESPACE Gem
-        AUTOMOC
-        AUTORCC
         FILES_CMAKE
-            ros2_editor_files.cmake
-        PLATFORM_INCLUDE_FILES
-            ${CMAKE_CURRENT_LIST_DIR}/Platform/Common/${PAL_TRAIT_COMPILER_ID}/ros2_static_editor_${PAL_TRAIT_COMPILER_ID_LOWERCASE}.cmake
+            ros2_editor_private_files.cmake
+        TARGET_PROPERTIES
+            O3DE_PRIVATE_TARGET TRUE
         INCLUDE_DIRECTORIES
             PRIVATE
-                Source
-            PUBLIC
                 Include
+                Source
         COMPILE_DEFINITIONS
             PRIVATE
                 ROS2_EDITOR
         BUILD_DEPENDENCIES
             PUBLIC
                 AZ::AzToolsFramework
-                Gem::CommonFeaturesAtom.Editor.Static
-                Gem::LmbrCentral.API
-                Gem::PhysX5.Editor.Static
-                Gem::${gem_name}.Static
+                ${gem_name}.Private.Object
+                ${gem_name}.Static
     )
 
     ly_add_target(
         NAME ${gem_name}.Editor GEM_MODULE
         NAMESPACE Gem
+        AUTOMOC
         FILES_CMAKE
             ros2_editor_shared_files.cmake
-        PLATFORM_INCLUDE_FILES
-            ${CMAKE_CURRENT_LIST_DIR}/Platform/Common/${PAL_TRAIT_COMPILER_ID}/ros2_static_editor_${PAL_TRAIT_COMPILER_ID_LOWERCASE}.cmake
-        COMPILE_DEFINITIONS
-            PRIVATE
-                ROS2_EDITOR
         INCLUDE_DIRECTORIES
             PRIVATE
                 Source
@@ -152,15 +216,37 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
                 Include
         BUILD_DEPENDENCIES
             PUBLIC
-                Gem::${gem_name}.Editor.Static
-                Gem::Atom_Feature_Common.Public
+                Gem::${gem_name}.Editor.API
+            PRIVATE
+                Gem::${gem_name}.Editor.Private.Object
     )
 
-    # By default, we will specify that the above target ROS2 would be used by
-    # Tool and Builder type targets when this gem is enabled. If you don't want it
-    # active in Tools or Builders by default, delete one or both of the following lines:
+    # Include the gem name into the Editor Module source file
+    # for use with the AZ_DECLARE_MODULE_CLASS macro
+    # This is to allow renaming of the gem to also cause
+    # the CreateModuleClass_Gem_<gem-name> function which
+    # is used to bootstrap the gem in monolithic builds to link to the new gem name
+    ly_add_source_properties(
+    SOURCES
+        Source/Tools/ROS2EditorModule.cpp
+    PROPERTY COMPILE_DEFINITIONS
+        VALUES
+            O3DE_GEM_NAME=${gem_name}
+            O3DE_GEM_VERSION=${gem_version})
+
+    # By default, we will specify that the above target ${gem_name} would be used by
+    # Tool and Builder type targets when this gem is enabled.  If you don't want it
+    # active in Tools or Builders by default, delete one of both of the following lines:
     ly_create_alias(NAME ${gem_name}.Tools    NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
     ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
+
+    # For the Tools and Builders variants of ${gem_name} Gem, an alias to the ${gem_name}.Editor API target will be made
+    ly_create_alias(NAME ${gem_name}.Tools.API NAMESPACE Gem TARGETS Gem::${gem_name}.Editor.API)
+    ly_create_alias(NAME ${gem_name}.Builders.API NAMESPACE Gem TARGETS Gem::${gem_name}.Editor.API)
+
+    # Add in CMake dependencies for each gem dependency listed in this gem's gem.json file
+    # for the Tools and Builders gem variants
+    o3de_add_variant_dependencies_for_gem_dependencies(GEM_NAME ${gem_name} VARIANTS Tools Builders)
 endif()
 
 ################################################################################
@@ -168,8 +254,9 @@ endif()
 ################################################################################
 # See if globally, tests are supported
 if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
-    if(PAL_TRAIT_TEST_GOOGLE_TEST_SUPPORTED)
-        # We support ROS2.Tests on this platform, add ROS2.Tests target which depends on ROS2.Static
+    # We globally support tests, see if we support tests on this platform for ${gem_name}.Tests
+    if(PAL_TRAIT_ROS2_TEST_SUPPORTED)
+        # We support ${gem_name}.Tests on this platform, add dependency on the Private Object target
         ly_add_target(
             NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
             NAMESPACE Gem
@@ -179,74 +266,54 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
                 PRIVATE
                     Tests
                     Source
+                    Include
             BUILD_DEPENDENCIES
                 PRIVATE
                     AZ::AzTest
-                    Gem::${gem_name}.Static
+                    AZ::AzFramework
+                    Gem::${gem_name}.Private.Object
         )
 
-        # Add ROS2.Tests to googletest
+        # Add ${gem_name}.Tests to googletest
         ly_add_googletest(
             NAME Gem::${gem_name}.Tests
         )
-        
-        # integration test for URDF importer
-        ly_add_target(
-            NAME ROS2.Frame.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
-                NAMESPACE Gem
-            FILES_CMAKE
-                frame_test_files.cmake
-            INCLUDE_DIRECTORIES
-                PRIVATE
-                    Source
-                    Tests
-            BUILD_DEPENDENCIES
-                PRIVATE
-                    AZ::AzTestShared
-                    AZ::AzToolsFramework
-                    Legacy::CryCommon
-                    Legacy::EditorCommon
-                    Legacy::Editor.Headers
-                    AZ::AzManipulatorTestFramework.Static
-                    Gem::ROS2.Static
-                RUNTIME_DEPENDENCIES
-                    Gem::PhysX5.Editor
-        )
-
-        ly_add_googletest(
-                NAME Gem::ROS2.Frame.Tests
-        )
-
     endif()
 
     # If we are a host platform we want to add tools test like editor tests here
     if(PAL_TRAIT_BUILD_HOST_TOOLS)
-        if(PAL_TRAIT_TEST_GOOGLE_TEST_SUPPORTED)
-            # We support ROS2.Editor.Tests on this platform, add ROS2.Editor.Tests target which depends on ROS2.Editor
+        # We are a host platform, see if Editor tests are supported on this platform
+        if(PAL_TRAIT_ROS2_EDITOR_TEST_SUPPORTED)
+            # We support ${gem_name}.Editor.Tests on this platform, add ${gem_name}.Editor.Tests target which depends on
+            # private ${gem_name}.Editor.Private.Object target
             ly_add_target(
                 NAME ${gem_name}.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
                 NAMESPACE Gem
                 FILES_CMAKE
                     ros2_editor_tests_files.cmake
-                PLATFORM_INCLUDE_FILES
-                    ${CMAKE_CURRENT_LIST_DIR}/Platform/Common/${PAL_TRAIT_COMPILER_ID}/ros2_static_editor_${PAL_TRAIT_COMPILER_ID_LOWERCASE}.cmake
                 INCLUDE_DIRECTORIES
                     PRIVATE
                         Tests
                         Source
+                        Include
                 BUILD_DEPENDENCIES
                     PRIVATE
                         AZ::AzTest
                         AZ::AzTestShared
-                        AZ::AzToolsFramework
-                        Gem::${gem_name}.Editor.Static
+                        Legacy::CryCommon
+                        Legacy::EditorCommon
+                        Legacy::Editor.Headers
+                        AZ::AzManipulatorTestFramework.Static
+                        Gem::${gem_name}.Editor.Private.Object
+                        Gem::${gem_name}.Static
+                RUNTIME_DEPENDENCIES
+                    Legacy::Editor
             )
 
-            # Add ROS2.Editor.Tests to googletest
+            # Add ${gem_name}.Editor.Tests to googletest
             ly_add_googletest(
                 NAME Gem::${gem_name}.Editor.Tests
             )
         endif()
     endif()
 endif()
-

+ 1 - 1
Gems/ROS2/Code/FindROS2.cmake

@@ -5,10 +5,10 @@
 
 # Note that this does not find any ros2 package in particular, but determines whether a distro is sourced properly
 # Can be extended to handle supported / unsupported distros
-message(STATUS "Ros Distro is \"$ENV{ROS_DISTRO}\"")
 if (NOT DEFINED ENV{ROS_DISTRO} OR NOT DEFINED ENV{AMENT_PREFIX_PATH})
     message(WARNING, "To build ROS2 Gem a ROS distribution needs to be sourced, but none detected")
     set(ROS2_FOUND FALSE)
     return()
 endif()
+message(STATUS "Ros Distro is \"$ENV{ROS_DISTRO}\"")
 set(ROS2_FOUND TRUE)

+ 3 - 3
Gems/ROS2/Code/Include/ROS2/Clock/RealTimeSource.h

@@ -14,7 +14,7 @@ namespace ROS2
     //! The RealTimeSource starts from 0 at the start of the simulation.
     //! This time source could be affected by the jitter in the data, simulation
     //! computations or other similar events. On the other hand RealTimeSource
-    //! can remain consistent with the other independent clocks if it is synchronised
+    //! can remain consistent with the other independent clocks if it is synchronized
     //! (e.g. through NTP).
     class RealTimeSource : public ITimeSource
     {
@@ -22,8 +22,8 @@ namespace ROS2
         virtual ~RealTimeSource() = default;
 
         // ITimeSource overrides ...
-        virtual void Activate() override {};
-        virtual void Deactivate() override {};
+        virtual void Activate() override{};
+        virtual void Deactivate() override{};
 
         //! Get simulation time as ROS 2 message.
         //! @see ROS2Requests::GetROSTimestamp() for more details.

+ 8 - 7
Gems/ROS2/Code/Include/ROS2/Communication/PublisherConfiguration.h

@@ -1,9 +1,9 @@
 /*
-* 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
-*
+ * 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
+ *
  */
 
 #pragma once
@@ -11,16 +11,17 @@
 #include <AzCore/RTTI/RTTI.h>
 #include <AzCore/Serialization/SerializeContext.h>
 #include <ROS2/Communication/TopicConfiguration.h>
+#include <ROS2/ROS2TypeIds.h>
 #include <rclcpp/publisher.hpp>
 
 namespace ROS2
 {
     struct PublisherConfiguration
     {
-        AZ_TYPE_INFO(PublisherConfiguration, "{E50D1926-0322-4832-BD72-C48F854131C8}");
+        AZ_TYPE_INFO(PublisherConfiguration, PublisherConfigurationTypeId);
         static void Reflect(AZ::ReflectContext* context);
 
-        bool m_publish = true;  //!< A switch controlling whether publishing happens.
+        bool m_publish = true; //!< A switch controlling whether publishing happens.
         TopicConfiguration m_topicConfiguration; //!< Configuration of the published topic.
         float m_frequency = 10.0f; //!< Frequency of the published topic (Hz)
     };

+ 2 - 1
Gems/ROS2/Code/Include/ROS2/Communication/QoS.h

@@ -10,6 +10,7 @@
 
 #include <AzCore/RTTI/RTTI.h>
 #include <AzCore/Serialization/SerializeContext.h>
+#include <ROS2/ROS2TypeIds.h>
 #include <rclcpp/qos.hpp>
 
 namespace ROS2
@@ -19,7 +20,7 @@ namespace ROS2
     struct QoS
     {
     public:
-        AZ_TYPE_INFO(QoS, "{46692EA4-EA4C-495E-AD3C-426EAB8954D3}");
+        AZ_TYPE_INFO(QoS, QoSTypeId);
         QoS(const rclcpp::QoS& qos = rclcpp::QoS(rmw_qos_profile_default.depth));
         static void Reflect(AZ::ReflectContext* context);
 

+ 5 - 4
Gems/ROS2/Code/Include/ROS2/Communication/TopicConfiguration.h

@@ -7,10 +7,11 @@
  */
 #pragma once
 
-#include "QoS.h"
 #include <AzCore/RTTI/RTTI.h>
 #include <AzCore/Serialization/SerializeContext.h>
 #include <AzCore/std/string/string.h>
+#include <ROS2/Communication/QoS.h>
+#include <ROS2/ROS2TypeIds.h>
 
 namespace ROS2
 {
@@ -18,12 +19,12 @@ namespace ROS2
     struct TopicConfiguration
     {
     public:
-        AZ_TYPE_INFO(TopicConfiguration, "{7535D58F-5284-4657-A799-1F69D3F5AA42}");
+        AZ_TYPE_INFO(TopicConfiguration, TopicConfigurationTypeId);
         static void Reflect(AZ::ReflectContext* context);
 
         TopicConfiguration() = default;
-        TopicConfiguration(const QoS& qos) :
-            m_qos(qos)
+        TopicConfiguration(const QoS& qos)
+            : m_qos(qos)
         {
         }
 

+ 2 - 1
Gems/ROS2/Code/Include/ROS2/Frame/NamespaceConfiguration.h

@@ -10,6 +10,7 @@
 #include <AzCore/RTTI/RTTI.h>
 #include <AzCore/Serialization/SerializeContext.h>
 #include <AzCore/std/string/string.h>
+#include <ROS2/ROS2TypeIds.h>
 
 namespace ROS2
 {
@@ -20,7 +21,7 @@ namespace ROS2
     struct NamespaceConfiguration
     {
     public:
-        AZ_TYPE_INFO(NamespaceConfiguration, "{5E5BC6EA-DD01-480E-A4D1-6857CF70FDC8}");
+        AZ_TYPE_INFO(NamespaceConfiguration, NamespaceConfigurationTypeId);
         static void Reflect(AZ::ReflectContext* context);
 
         //! A choice of methods to handle namespaces.

+ 2 - 1
Gems/ROS2/Code/Include/ROS2/Frame/ROS2FrameComponent.h

@@ -16,6 +16,7 @@
 #include <ROS2/Frame/ROS2FrameConfiguration.h>
 #include <ROS2/Frame/ROS2Transform.h>
 #include <ROS2/ROS2GemUtilities.h>
+#include <ROS2/ROS2TypeIds.h>
 
 namespace ROS2
 {
@@ -23,7 +24,7 @@ namespace ROS2
     class JsonFrameComponentConfigSerializer : public AZ::BaseJsonSerializer
     {
     public:
-        AZ_RTTI(ROS2::JsonFrameComponentConfigSerializer, "{ac74cbc1-a5dc-4014-85d7-0e7934f352bd}", AZ::BaseJsonSerializer);
+        AZ_RTTI(ROS2::JsonFrameComponentConfigSerializer, ROS2FrameComponentTypeId, AZ::BaseJsonSerializer);
         AZ_CLASS_ALLOCATOR_DECL;
 
         AZ::JsonSerializationResult::Result Load(

+ 2 - 1
Gems/ROS2/Code/Include/ROS2/Frame/ROS2FrameConfiguration.h

@@ -12,13 +12,14 @@
 #include <AzCore/Serialization/SerializeContext.h>
 #include <AzCore/std/string/string.h>
 #include <ROS2/Frame/NamespaceConfiguration.h>
+#include <ROS2/ROS2TypeIds.h>
 
 namespace ROS2
 {
     class ROS2FrameConfiguration final : public AZ::ComponentConfig
     {
     public:
-        AZ_TYPE_INFO(ROS2FrameConfiguration, "{04882f01-5451-4efa-b4f8-cd57e4b6cadf}");
+        AZ_TYPE_INFO(ROS2FrameConfiguration, ROS2FrameConfigurationTypeId);
         static void Reflect(AZ::ReflectContext* context);
 
         NamespaceConfiguration m_namespaceConfiguration;

+ 2 - 1
Gems/ROS2/Code/Include/ROS2/Frame/ROS2FrameEditorComponent.h

@@ -16,6 +16,7 @@
 #include <ROS2/Frame/ROS2FrameConfiguration.h>
 #include <ROS2/Frame/ROS2Transform.h>
 #include <ROS2/ROS2GemUtilities.h>
+#include <ROS2/ROS2TypeIds.h>
 
 namespace ROS2
 {
@@ -30,7 +31,7 @@ namespace ROS2
         , public AZ::EntityBus::Handler
     {
     public:
-        AZ_COMPONENT(ROS2FrameEditorComponent, "{f76d6f29-73c3-40b2-bcc2-47fc824c25df}", AzToolsFramework::Components::EditorComponentBase);
+        AZ_COMPONENT(ROS2FrameEditorComponent, ROS2FrameEditorComponentTypeId, AzToolsFramework::Components::EditorComponentBase);
 
         ROS2FrameEditorComponent() = default;
         ~ROS2FrameEditorComponent() = default;

+ 3 - 1
Gems/ROS2/Code/Include/ROS2/ROS2Bus.h

@@ -7,6 +7,8 @@
  */
 #pragma once
 
+#include <ROS2/ROS2TypeIds.h>
+
 #include <AzCore/EBus/EBus.h>
 #include <AzCore/EBus/Event.h>
 #include <AzCore/Interface/Interface.h>
@@ -27,7 +29,7 @@ namespace ROS2
     public:
         using NodeChangedEvent = AZ::Event<std::shared_ptr<rclcpp::Node>>;
 
-        AZ_RTTI(ROS2Requests, "{a9bdbff6-e644-430d-8096-cdb53c88e8fc}");
+        AZ_RTTI(ROS2Requests, ROS2RequestsTypeId);
         virtual ~ROS2Requests() = default;
 
         //! Get a central ROS2 node of the Gem.

+ 46 - 0
Gems/ROS2/Code/Include/ROS2/ROS2TypeIds.h

@@ -0,0 +1,46 @@
+/*
+ * 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
+ *
+ */
+#pragma once
+
+namespace ROS2
+{
+    // System Component TypeIds
+    inline constexpr const char* ROS2SystemComponentTypeId = "{CB28D486-AFA4-4A9F-A237-AC5EB42E1C87}";
+    inline constexpr const char* ROS2EditorSystemComponentTypeId = "{349883C1-C66E-45F5-90D7-884565FCFA7E}";
+
+    // Module derived classes TypeIds
+    inline constexpr const char* ROS2ModuleInterfaceTypeId = "{8B5567CB-1DE9-49AF-9CD4-9750D4ABCD6B}";
+    inline constexpr const char* ROS2ModuleTypeId = "{3DDFC98F-D1CC-4658-BAF8-2CC34A9D39F3}";
+    // The Editor Module by default is mutually exclusive with the Client Module
+    // so they use the Same TypeId
+    inline constexpr const char* ROS2EditorModuleTypeId = ROS2ModuleTypeId;
+
+    // Interface TypeIds
+    inline constexpr const char* ROS2RequestsTypeId = "{A9BDBFF6-E644-430D-8096-CDB53C88E8FC}";
+
+    // Communication Interface TypeIds
+    inline constexpr const char* PublisherConfigurationTypeId = "{E50D1926-0322-4832-BD72-C48F854131C8}";
+    inline constexpr const char* QoSTypeId = "{46692EA4-EA4C-495E-AD3C-426EAB8954D3}";
+    inline constexpr const char* TopicConfigurationTypeId = "{7535D58F-5284-4657-A799-1F69D3F5AA42}";
+
+    // Frame Interface TypeIds
+    inline constexpr const char* NamespaceConfigurationTypeId = "{5E5BC6EA-DD01-480E-A4D1-6857CF70FDC8}";
+    inline constexpr const char* ROS2FrameComponentTypeId = "{AC74CBC1-A5DC-4014-85D7-0E7934F352BD}";
+    inline constexpr const char* ROS2FrameConfigurationTypeId = "{04882F01-5451-4EFA-B4F8-CD57E4B6CADF}";
+    inline constexpr const char* ROS2FrameEditorComponentTypeId = "{F76D6F29-73C3-40B2-BCC2-47FC824C25DF}";
+
+    // Sensors Events TypeIds
+    inline constexpr const char* EventSourceAdapterTypeId = "{DC8BB5F7-8E0E-42A1-BD82-5FCD9D31B9DD}";
+    inline constexpr const char* TickBasedSourceTypeId = "{AD3CC041-5F7C-45E8-AA2D-5D8A1D4CC466}";
+    inline constexpr const char* PhysicsBasedSourceTypeId = "{48BB21A8-F14E-4869-95DC-28EEA279Cf53}";
+
+    // Spawner Bus TypeIds
+    inline constexpr const char* SpawnerRequestsTypeId = "{3C42A3A1-1B8E-4800-9473-E4441315D7C8}";
+    inline constexpr const char* SpawnerNotificationTypeId = "{0D22B024-48C7-457C-BFFB-D292045B68EC}";
+    inline constexpr const char* SpawnerBusHandlerTypeId = "{9EB89664-0BE5-4E89-8E17-01B21073EBB8}";
+} // namespace ROS2

+ 2 - 1
Gems/ROS2/Code/Include/ROS2/Sensor/Events/EventSourceAdapter.h

@@ -10,6 +10,7 @@
 
 #include <AzCore/Serialization/EditContext.h>
 #include <ROS2/ROS2Bus.h>
+#include <ROS2/ROS2TypeIds.h>
 #include <ROS2/Sensor/Events/SensorEventSource.h>
 
 namespace ROS2
@@ -201,5 +202,5 @@ namespace ROS2
         int m_tickCounter{ 0 }; ///< Internal counter for controlling adapter frequency.
     };
 
-    AZ_TYPE_INFO_TEMPLATE(EventSourceAdapter, "{DC8BB5F7-8E0E-42A1-BD82-5FCD9D31B9DD}", AZ_TYPE_INFO_CLASS)
+    AZ_TYPE_INFO_TEMPLATE(EventSourceAdapter, EventSourceAdapterTypeId, AZ_TYPE_INFO_CLASS)
 } // namespace ROS2

+ 2 - 1
Gems/ROS2/Code/Include/ROS2/Sensor/Events/PhysicsBasedSource.h

@@ -12,6 +12,7 @@
 #include <AzFramework/Physics/Common/PhysicsEvents.h>
 #include <AzFramework/Physics/Common/PhysicsTypes.h>
 #include <ROS2/ROS2Bus.h>
+#include <ROS2/ROS2TypeIds.h>
 #include <ROS2/Sensor/Events/SensorEventSource.h>
 
 namespace ROS2
@@ -23,7 +24,7 @@ namespace ROS2
     class PhysicsBasedSource final : public SensorEventSource<AZ::OrderedEvent, AZ::OrderedEventHandler, AzPhysics::SceneHandle, float>
     {
     public:
-        AZ_TYPE_INFO(PhysicsBasedSource, "{48BB21A8-F14E-4869-95DC-28EEA279Cf53}");
+        AZ_TYPE_INFO(PhysicsBasedSource, PhysicsBasedSourceTypeId);
         static void Reflect(AZ::ReflectContext* context);
 
         // Overrides of ROS2::SensorEventSource.

+ 4 - 2
Gems/ROS2/Code/Include/ROS2/Sensor/Events/TickBasedSource.h

@@ -10,8 +10,10 @@
 
 #include <AzCore/Component/TickBus.h>
 #include <AzCore/EBus/Event.h>
-#include <ROS2/Sensor/Events/SensorEventSource.h>
 #include <ROS2/ROS2Bus.h>
+#include <ROS2/ROS2TypeIds.h>
+#include <ROS2/Sensor/Events/SensorEventSource.h>
+
 namespace ROS2
 {
     //! Class implementing system TickBus (draw calls) as sensor event source. Source event (ROS2::SensorEventSource) is signalled based on
@@ -22,7 +24,7 @@ namespace ROS2
         , protected AZ::TickBus::Handler
     {
     public:
-        AZ_TYPE_INFO(TickBasedSource, "{AD3CC041-5F7C-45E8-AA2D-5D8A1D4CC466}");
+        AZ_TYPE_INFO(TickBasedSource, TickBasedSourceTypeId);
         static void Reflect(AZ::ReflectContext* context);
 
         // Overrides of ROS2::SensorEventSource.

+ 3 - 2
Gems/ROS2/Code/Include/ROS2/Spawner/SpawnerBus.h

@@ -12,6 +12,7 @@
 #include <AzCore/EBus/EBus.h>
 #include <AzCore/Math/Transform.h>
 #include <AzCore/RTTI/BehaviorContext.h>
+#include <ROS2/ROS2TypeIds.h>
 #include <ROS2/Spawner/SpawnerInfo.h>
 
 namespace ROS2
@@ -20,7 +21,7 @@ namespace ROS2
     class SpawnerRequests : public AZ::ComponentBus
     {
     public:
-        AZ_RTTI(SpawnerRequests, "{3C42A3A1-1B8E-4800-9473-E4441315D7C8}");
+        AZ_RTTI(SpawnerRequests, SpawnerRequestsTypeId);
 
         static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
 
@@ -37,7 +38,7 @@ namespace ROS2
     class SpawnerNotifications : public AZ::EBusTraits
     {
     public:
-        AZ_RTTI(SpawnerNotifications, "{0D22B024-48C7-457C-BFFB-D292045B68EC}");
+        AZ_RTTI(SpawnerNotifications, SpawnerNotificationTypeId);
 
         static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple;
         static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;

+ 3 - 3
Gems/ROS2/Code/Include/ROS2/Spawner/SpawnerBusHandler.h

@@ -7,10 +7,11 @@
  */
 #pragma once
 
-#include "AzCore/RTTI/BehaviorContext.h"
 #include <AzCore/Component/ComponentBus.h>
 #include <AzCore/Component/EntityId.h>
 #include <AzCore/EBus/EBus.h>
+#include <AzCore/RTTI/BehaviorContext.h>
+#include <ROS2/ROS2TypeIds.h>
 #include <ROS2/Spawner/SpawnerBus.h>
 
 namespace ROS2
@@ -20,8 +21,7 @@ namespace ROS2
         , public AZ::BehaviorEBusHandler
     {
     public:
-        AZ_EBUS_BEHAVIOR_BINDER(
-            SpawnerNotificationsBusHandler, "{9EB89664-0BE5-4E89-8E17-01B21073EBB8}", AZ::SystemAllocator, OnSpawned, OnDespawned);
+        AZ_EBUS_BEHAVIOR_BINDER(SpawnerNotificationsBusHandler, SpawnerBusHandlerTypeId, AZ::SystemAllocator, OnSpawned, OnDespawned);
 
         void OnSpawned(const AZStd::string& spawnableName, const AZ::EntityId& rootEntity, const AZStd::string& ticketName) override
         {

+ 3 - 1
Gems/ROS2/Code/Platform/Android/PAL_android.cmake

@@ -6,4 +6,6 @@
 #
 #
 
-set(PAL_TRAIT_BUILD_ROS2_GEM_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_EDITOR_TEST_SUPPORTED FALSE)

+ 3 - 0
Gems/ROS2/Code/Platform/Android/ros2_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
Gems/ROS2/Code/Platform/Android/ros2_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Android
+# i.e. ../Source/Android/ROS2Android.cpp
+#      ../Source/Android/ROS2Android.h
+#      ../Include/Android/ROS2Android.h
+
+set(FILES
+)

+ 8 - 0
Gems/ROS2/Code/Platform/Android/ros2_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Android
+# i.e. ../Source/Android/ROS2Android.cpp
+#      ../Source/Android/ROS2Android.h
+#      ../Include/Android/ROS2Android.h
+
+set(FILES
+)

+ 0 - 11
Gems/ROS2/Code/Platform/Common/Clang/ros2_static_editor_clang.cmake

@@ -1,11 +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
-#
-
-set(LY_COMPILE_OPTIONS
-        PRIVATE
-            -fexceptions
-)

+ 0 - 11
Gems/ROS2/Code/Platform/Common/GCC/ros2_static_editor_gcc.cmake

@@ -1,11 +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
-#
-
-set(LY_COMPILE_OPTIONS
-        PRIVATE
-            -fexceptions
-)

+ 3 - 1
Gems/ROS2/Code/Platform/Linux/PAL_linux.cmake

@@ -6,4 +6,6 @@
 #
 #
 
-set(PAL_TRAIT_BUILD_ROS2_GEM_SUPPORTED TRUE)
+set(PAL_TRAIT_ROS2_SUPPORTED TRUE)
+set(PAL_TRAIT_ROS2_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_EDITOR_TEST_SUPPORTED TRUE)

+ 3 - 0
Gems/ROS2/Code/Platform/Linux/ros2_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 3 - 0
Gems/ROS2/Code/Platform/Linux/ros2_editor_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
Gems/ROS2/Code/Platform/Linux/ros2_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Linux
+# i.e. ../Source/Linux/ROS2Linux.cpp
+#      ../Source/Linux/ROS2Linux.h
+#      ../Include/Linux/ROS2Linux.h
+
+set(FILES
+)

+ 8 - 0
Gems/ROS2/Code/Platform/Linux/ros2_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Linux
+# i.e. ../Source/Linux/ROS2Linux.cpp
+#      ../Source/Linux/ROS2Linux.h
+#      ../Include/Linux/ROS2Linux.h
+
+set(FILES
+)

+ 3 - 1
Gems/ROS2/Code/Platform/Mac/PAL_mac.cmake

@@ -6,4 +6,6 @@
 #
 #
 
-set(PAL_TRAIT_BUILD_ROS2_GEM_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_EDITOR_TEST_SUPPORTED FALSE)

+ 3 - 0
Gems/ROS2/Code/Platform/Mac/ros2_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 3 - 0
Gems/ROS2/Code/Platform/Mac/ros2_editor_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
Gems/ROS2/Code/Platform/Mac/ros2_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Mac
+# i.e. ../Source/Mac/ROS2Mac.cpp
+#      ../Source/Mac/ROS2Mac.h
+#      ../Include/Mac/ROS2Mac.h
+
+set(FILES
+)

+ 8 - 0
Gems/ROS2/Code/Platform/Mac/ros2_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Mac
+# i.e. ../Source/Mac/ROS2Mac.cpp
+#      ../Source/Mac/ROS2Mac.h
+#      ../Include/Mac/ROS2Mac.h
+
+set(FILES
+)

+ 3 - 1
Gems/ROS2/Code/Platform/Windows/PAL_windows.cmake

@@ -6,4 +6,6 @@
 #
 #
 
-set(PAL_TRAIT_BUILD_ROS2_GEM_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_EDITOR_TEST_SUPPORTED FALSE)

+ 3 - 0
Gems/ROS2/Code/Platform/Windows/ros2_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 3 - 0
Gems/ROS2/Code/Platform/Windows/ros2_editor_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
Gems/ROS2/Code/Platform/Windows/ros2_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Windows
+# i.e. ../Source/Windows/ROS2Windows.cpp
+#      ../Source/Windows/ROS2Windows.h
+#      ../Include/Windows/ROS2Windows.h
+
+set(FILES
+)

+ 8 - 0
Gems/ROS2/Code/Platform/Windows/ros2_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for Windows
+# i.e. ../Source/Windows/ROS2Windows.cpp
+#      ../Source/Windows/ROS2Windows.h
+#      ../Include/Windows/ROS2Windows.h
+
+set(FILES
+)

+ 3 - 1
Gems/ROS2/Code/Platform/iOS/PAL_ios.cmake

@@ -6,4 +6,6 @@
 #
 #
 
-set(PAL_TRAIT_BUILD_ROS2_GEM_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_EDITOR_TEST_SUPPORTED FALSE)

+ 3 - 0
Gems/ROS2/Code/Platform/iOS/ros2_api_files.cmake

@@ -0,0 +1,3 @@
+
+set(FILES
+)

+ 8 - 0
Gems/ROS2/Code/Platform/iOS/ros2_private_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for iOS
+# i.e. ../Source/iOS/ROS2iOS.cpp
+#      ../Source/iOS/ROS2iOS.h
+#      ../Include/iOS/ROS2iOS.h
+
+set(FILES
+)

+ 8 - 0
Gems/ROS2/Code/Platform/iOS/ros2_shared_files.cmake

@@ -0,0 +1,8 @@
+
+# Platform specific files for iOS
+# i.e. ../Source/iOS/ROS2iOS.cpp
+#      ../Source/iOS/ROS2iOS.h
+#      ../Include/iOS/ROS2iOS.h
+
+set(FILES
+)

+ 7 - 1
Gems/ROS2/Code/Source/ROS2Module.cpp → Gems/ROS2/Code/Source/Clients/ROS2Module.cpp

@@ -6,6 +6,8 @@
  *
  */
 
+#include "ROS2SystemComponent.h"
+#include <ROS2/ROS2TypeIds.h>
 #include <ROS2ModuleInterface.h>
 
 namespace ROS2
@@ -13,9 +15,13 @@ namespace ROS2
     class ROS2Module : public ROS2ModuleInterface
     {
     public:
-        AZ_RTTI(ROS2Module, "{e23a1379-787c-481e-ad83-c0e04a3d06fe}", ROS2ModuleInterface);
+        AZ_RTTI(ROS2Module, ROS2ModuleTypeId, ROS2ModuleInterface);
         AZ_CLASS_ALLOCATOR(ROS2Module, AZ::SystemAllocator);
     };
 } // namespace ROS2
 
+#if defined(O3DE_GEM_NAME)
+AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), ROS2::ROS2Module)
+#else
 AZ_DECLARE_MODULE_CLASS(Gem_ROS2, ROS2::ROS2Module)
+#endif

+ 3 - 0
Gems/ROS2/Code/Source/SystemComponents/ROS2SystemComponent.cpp → Gems/ROS2/Code/Source/Clients/ROS2SystemComponent.cpp

@@ -14,6 +14,7 @@
 #include <ROS2/Communication/PublisherConfiguration.h>
 #include <ROS2/Communication/QoS.h>
 #include <ROS2/Communication/TopicConfiguration.h>
+#include <ROS2/ROS2TypeIds.h>
 #include <ROS2/Utilities/ROS2Conversions.h>
 
 #include <AzCore/Serialization/EditContext.h>
@@ -32,6 +33,8 @@ namespace ROS2
     constexpr AZStd::string_view PublishClockConfigurationKey = "/O3DE/ROS2/PublishClock";
     constexpr size_t FramesNumberForStats = 60;
 
+    AZ_COMPONENT_IMPL(ROS2SystemComponent, "ROS2SystemComponent", ROS2SystemComponentTypeId);
+
     void ROS2SystemComponent::Reflect(AZ::ReflectContext* context)
     {
         // Reflect structs not strictly owned by any single component

+ 9 - 8
Gems/ROS2/Code/Source/SystemComponents/ROS2SystemComponent.h → Gems/ROS2/Code/Source/Clients/ROS2SystemComponent.h

@@ -44,7 +44,7 @@ namespace ROS2
         , protected ROS2RequestBus::Handler
     {
     public:
-        AZ_COMPONENT(ROS2SystemComponent, "{cb28d486-afa4-4a9f-a237-ac5eb42e1c87}");
+        AZ_COMPONENT_DECL(ROS2SystemComponent);
 
         static void Reflect(AZ::ReflectContext* context);
 
@@ -54,21 +54,22 @@ namespace ROS2
         static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
 
         ROS2SystemComponent();
-        ~ROS2SystemComponent() override;
+        ~ROS2SystemComponent();
 
-        //////////////////////////////////////////////////////////////////////////
-        // ROS2RequestBus::Handler overrides
+
+    protected:
+        ////////////////////////////////////////////////////////////////////////
+        // ROS2RequestBus interface implementation
         std::shared_ptr<rclcpp::Node> GetNode() const override;
         void ConnectOnNodeChanged(NodeChangedEvent::Handler& handler) override;
         builtin_interfaces::msg::Time GetROSTimestamp() const override;
         void BroadcastTransform(const geometry_msgs::msg::TransformStamped& t, bool isDynamic) override;
         const ROS2Clock& GetSimulationClock() const override;
         float GetExpectedSimulationLoopTime() const override;
-        //////////////////////////////////////////////////////////////////////////
+        ////////////////////////////////////////////////////////////////////////
 
-    protected:
         ////////////////////////////////////////////////////////////////////////
-        // AZ::Component override
+        // AZ::Component interface implementation
         void Init() override;
         void Activate() override;
         void Deactivate() override;
@@ -92,6 +93,6 @@ namespace ROS2
 
         AZStd::deque<float> m_simulationLoopTimes;
         builtin_interfaces::msg::Time m_lastSimulationTime;
-        float m_simulationLoopTimeMedian = 1.f / 60.0f;
+        float m_simulationLoopTimeMedian = 1.0f / 60.0f;
     };
 } // namespace ROS2

+ 8 - 6
Gems/ROS2/Code/Source/Frame/ROS2FrameComponent.cpp

@@ -8,6 +8,7 @@
 
 #include "ROS2FrameSystemComponent.h"
 #include <AzCore/Component/Entity.h>
+#include <AzCore/Component/EntityUtils.h>
 #include <AzCore/RTTI/ReflectContext.h>
 #include <AzCore/Serialization/EditContext.h>
 #include <AzCore/Serialization/EditContextConstants.inl>
@@ -20,9 +21,6 @@
 #include <ROS2/ROS2Bus.h>
 #include <ROS2/ROS2GemUtilities.h>
 #include <ROS2/Utilities/ROS2Names.h>
-#include <Source/ArticulationLinkComponent.h>
-#include <Source/FixedJointComponent.h>
-#include <Source/JointComponent.h>
 #include <rapidjson/document.h>
 #include <rapidjson/stringbuffer.h>
 
@@ -151,9 +149,13 @@ namespace ROS2
             // Otherwise it'll be dynamic when it has joints and it's not a fixed joint.
             else
             {
-                const bool hasJoints = Utils::HasComponentOfType(m_entity, PhysX::JointComponent::TYPEINFO_Uuid());
-                const bool hasFixedJoints = Utils::HasComponentOfType(m_entity, PhysX::FixedJointComponent::TYPEINFO_Uuid());
-                const bool hasArticulations = Utils::HasComponentOfType(m_entity, PhysX::ArticulationLinkComponent::TYPEINFO_Uuid());
+                // Quickfix: Use hard-coded uuids to avoid linking to PhysX.
+                const bool hasJoints =
+                    Utils::HasComponentOfType(m_entity, AZ::Uuid("{B01FD1D2-1D91-438D-874A-BF5EB7E919A8}")); // PhysX::JointComponent;
+                const bool hasFixedJoints =
+                    Utils::HasComponentOfType(m_entity, AZ::Uuid("{02E6C633-8F44-4CEE-AE94-DCB06DE36422}")); // PhysX::FixedJointComponent
+                const bool hasArticulations =
+                    Utils::HasComponentOfType(m_entity, AZ::Uuid("{48751E98-B35F-4A2F-A908-D9CDD5230264}")); // PhysX::ArticulationComponent
                 m_isDynamic = (hasJoints && !hasFixedJoints) || hasArticulations;
             }
 

+ 45 - 0
Gems/ROS2/Code/Source/ROS2ModuleInterface.cpp

@@ -0,0 +1,45 @@
+/*
+ * 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
+ *
+ */
+
+#include "ROS2ModuleInterface.h"
+#include <AzCore/Memory/Memory.h>
+
+#include <ROS2/ROS2TypeIds.h>
+
+#include <Clients/ROS2SystemComponent.h>
+#include <ROS2/Frame/ROS2FrameComponent.h>
+#include <SimulationUtils/FollowingCameraComponent.h>
+#include <Spawner/ROS2SpawnPointComponent.h>
+#include <Spawner/ROS2SpawnerComponent.h>
+
+namespace ROS2
+{
+    AZ_TYPE_INFO_WITH_NAME_IMPL(ROS2ModuleInterface, "ROS2ModuleInterface", ROS2ModuleInterfaceTypeId);
+    AZ_RTTI_NO_TYPE_INFO_IMPL(ROS2ModuleInterface, AZ::Module);
+    AZ_CLASS_ALLOCATOR_IMPL(ROS2ModuleInterface, AZ::SystemAllocator);
+
+    ROS2ModuleInterface::ROS2ModuleInterface()
+    {
+        m_descriptors.insert(
+            m_descriptors.end(),
+            {
+                ROS2SystemComponent::CreateDescriptor(),
+                ROS2FrameComponent::CreateDescriptor(),
+                ROS2SpawnerComponent::CreateDescriptor(),
+                ROS2SpawnPointComponent::CreateDescriptor(),
+                FollowingCameraComponent::CreateDescriptor(),
+            });
+    }
+
+    AZ::ComponentTypeList ROS2ModuleInterface::GetRequiredSystemComponents() const
+    {
+        return AZ::ComponentTypeList{
+            azrtti_typeid<ROS2SystemComponent>(),
+        };
+    }
+} // namespace ROS2

+ 11 - 26
Gems/ROS2/Code/Source/ROS2ModuleInterface.h

@@ -7,40 +7,25 @@
  */
 #pragma once
 
-#include <AzCore/Memory/SystemAllocator.h>
+#include <AzCore/Memory/Memory_fwd.h>
 #include <AzCore/Module/Module.h>
-#include <ROS2/Frame/ROS2FrameComponent.h>
-#include <SimulationUtils/FollowingCameraComponent.h>
-#include <Spawner/ROS2SpawnPointComponent.h>
-#include <Spawner/ROS2SpawnerComponent.h>
-#include <SystemComponents/ROS2SystemComponent.h>
+#include <AzCore/RTTI/RTTIMacros.h>
+#include <AzCore/RTTI/TypeInfoSimple.h>
 
 namespace ROS2
 {
     class ROS2ModuleInterface : public AZ::Module
     {
     public:
-        AZ_RTTI(ROS2ModuleInterface, "{8b5567cb-1de9-49af-9cd4-9750d4abcd6b}", AZ::Module);
-        AZ_CLASS_ALLOCATOR(ROS2ModuleInterface, AZ::SystemAllocator);
+        AZ_TYPE_INFO_WITH_NAME_DECL(ROS2ModuleInterface)
+        AZ_RTTI_NO_TYPE_INFO_DECL()
+        AZ_CLASS_ALLOCATOR_DECL
 
-        ROS2ModuleInterface()
-        {
-            m_descriptors.insert(
-                m_descriptors.end(),
-                {
-                    ROS2SystemComponent::CreateDescriptor(),
-                    ROS2FrameComponent::CreateDescriptor(),
-                    ROS2SpawnerComponent::CreateDescriptor(),
-                    ROS2SpawnPointComponent::CreateDescriptor(),
-                    FollowingCameraComponent::CreateDescriptor(),
-                });
-        }
+        ROS2ModuleInterface();
 
-        AZ::ComponentTypeList GetRequiredSystemComponents() const override
-        {
-            return AZ::ComponentTypeList{
-                azrtti_typeid<ROS2SystemComponent>(),
-            };
-        }
+        /**
+         * Add required SystemComponents to the SystemEntity.
+         */
+        AZ::ComponentTypeList GetRequiredSystemComponents() const override;
     };
 } // namespace ROS2

+ 8 - 4
Gems/ROS2/Code/Source/ROS2EditorModule.cpp → Gems/ROS2/Code/Source/Tools/ROS2EditorModule.cpp

@@ -6,20 +6,20 @@
  *
  */
 
-#include <AzCore/RTTI/RTTIMacros.h>
+#include "ROS2EditorSystemComponent.h"
 #include <Frame/ROS2FrameSystemComponent.h>
 #include <ROS2/Frame/ROS2FrameEditorComponent.h>
+#include <ROS2/ROS2TypeIds.h>
 #include <ROS2ModuleInterface.h>
 #include <Spawner/ROS2SpawnPointEditorComponent.h>
 #include <Spawner/ROS2SpawnerEditorComponent.h>
-#include <SystemComponents/ROS2EditorSystemComponent.h>
 
 namespace ROS2
 {
     class ROS2EditorModule : public ROS2ModuleInterface
     {
     public:
-        AZ_RTTI(ROS2EditorModule, "{3DDFC98F-D1CC-4658-BAF8-2CC34A9D39F3}", ROS2ModuleInterface);
+        AZ_RTTI(ROS2EditorModule, ROS2EditorModuleTypeId, ROS2ModuleInterface);
         AZ_CLASS_ALLOCATOR(ROS2EditorModule, AZ::SystemAllocator);
 
         ROS2EditorModule()
@@ -43,4 +43,8 @@ namespace ROS2
     };
 } // namespace ROS2
 
-AZ_DECLARE_MODULE_CLASS(Gem_ROS2, ROS2::ROS2EditorModule)
+#if defined(O3DE_GEM_NAME)
+AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME, _Editor), ROS2::ROS2EditorModule)
+#else
+AZ_DECLARE_MODULE_CLASS(Gem_ROS2_Editor, ROS2::ROS2EditorModule)
+#endif

+ 6 - 1
Gems/ROS2/Code/Source/SystemComponents/ROS2EditorSystemComponent.cpp → Gems/ROS2/Code/Source/Tools/ROS2EditorSystemComponent.cpp

@@ -6,11 +6,14 @@
  *
  */
 #include "ROS2EditorSystemComponent.h"
-#include <AzCore/Component/ComponentApplicationBus.h>
 #include <AzCore/Serialization/SerializeContext.h>
 
+#include <ROS2/ROS2TypeIds.h>
+
 namespace ROS2
 {
+    AZ_COMPONENT_IMPL(ROS2EditorSystemComponent, "ROS2EditorSystemComponent", ROS2EditorSystemComponentTypeId, BaseSystemComponent);
+
     void ROS2EditorSystemComponent::Reflect(AZ::ReflectContext* context)
     {
         if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
@@ -48,10 +51,12 @@ namespace ROS2
     void ROS2EditorSystemComponent::Activate()
     {
         AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect();
+        AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
     }
 
     void ROS2EditorSystemComponent::Deactivate()
     {
+        AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect();
         AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect();
     }
 

+ 7 - 3
Gems/ROS2/Code/Source/SystemComponents/ROS2EditorSystemComponent.h → Gems/ROS2/Code/Source/Tools/ROS2EditorSystemComponent.h

@@ -7,20 +7,24 @@
  */
 #pragma once
 
-#include "ROS2SystemComponent.h"
+#include <AzToolsFramework/API/ToolsApplicationAPI.h>
 #include <AzToolsFramework/Entity/EditorEntityContextBus.h>
 
+#include <Clients/ROS2SystemComponent.h>
+
 namespace ROS2
 {
     /// System component for ROS2 editor
     class ROS2EditorSystemComponent
         : public ROS2SystemComponent
+        , protected AzToolsFramework::EditorEvents::Bus::Handler
         , private AzToolsFramework::EditorEntityContextNotificationBus::Handler
     {
         using BaseSystemComponent = ROS2SystemComponent;
 
     public:
-        AZ_COMPONENT(ROS2EditorSystemComponent, "{34fa5d9a-956b-4655-a6bc-1d57dce8e7a2}", BaseSystemComponent);
+        AZ_COMPONENT_DECL(ROS2EditorSystemComponent);
+
         static void Reflect(AZ::ReflectContext* context);
 
         ROS2EditorSystemComponent();
@@ -33,7 +37,7 @@ namespace ROS2
         static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
 
         //////////////////////////////////////////////////////////////////////////
-        // Component overrides
+        // AZ::Component overrides
         void Activate() override;
         void Deactivate() override;
         //////////////////////////////////////////////////////////////////////////

+ 1 - 1
Gems/ROS2/Code/Tests/Frame/ROS2FrameComponentTest.cpp

@@ -24,9 +24,9 @@
 #include <AzToolsFramework/ToolsComponents/TransformComponent.h>
 #include <AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h>
 #include <AzToolsFramework/UnitTest/ToolsTestApplication.h>
+#include <Clients/ROS2SystemComponent.h>
 #include <ROS2/Frame/ROS2FrameComponent.h>
 #include <ROS2/ROS2Bus.h>
-#include <SystemComponents/ROS2SystemComponent.h>
 
 #include <QApplication>
 #include <gtest/gtest.h>

+ 0 - 11
Gems/ROS2/Code/Tests/ROS2EditorTest.cpp

@@ -1,11 +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
- *
- */
-
-#include <AzTest/AzTest.h>
-
-AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);

+ 0 - 11
Gems/ROS2/Code/Tests/ROS2Test.cpp

@@ -1,11 +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
- *
- */
-
-#include <AzTest/AzTest.h>
-
-AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);

+ 0 - 3
Gems/ROS2/Code/frame_test_files.cmake

@@ -1,3 +0,0 @@
-set(FILES
-        Tests/Frame/ROS2FrameComponentTest.cpp
-        )

+ 30 - 0
Gems/ROS2/Code/ros2_api_files.cmake

@@ -0,0 +1,30 @@
+# 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
+
+set(FILES
+    Include/ROS2/ROS2Bus.h
+    Include/ROS2/ROS2GemUtilities.h
+    Include/ROS2/ROS2TypeIds.h
+    Include/ROS2/Clock/ROS2Clock.h
+    Include/ROS2/Clock/ITimeSource.h
+    Include/ROS2/Clock/ROS2TimeSource.h
+    Include/ROS2/Clock/SimulationTimeSource.h
+    Include/ROS2/Clock/RealTimeSource.h
+    Include/ROS2/Communication/PublisherConfiguration.h
+    Include/ROS2/Communication/TopicConfiguration.h
+    Include/ROS2/Communication/QoS.h
+    Include/ROS2/Frame/NamespaceConfiguration.h
+    Include/ROS2/Frame/ROS2FrameComponent.h
+    Include/ROS2/Frame/ROS2FrameConfiguration.h
+    Include/ROS2/Frame/ROS2Transform.h
+    Include/ROS2/Sensor/Events/EventSourceAdapter.h
+    Include/ROS2/Sensor/Events/SensorEventSource.h
+    Include/ROS2/Sensor/Events/PhysicsBasedSource.h
+    Include/ROS2/Sensor/Events/TickBasedSource.h
+    Include/ROS2/Spawner/SpawnerBus.h
+    Include/ROS2/Spawner/SpawnerBusHandler.h
+    Include/ROS2/Utilities/ROS2Conversions.h
+    Include/ROS2/Utilities/ROS2Names.h
+)

+ 2 - 5
Gems/ROS2/Code/Platform/Common/msvc/ros2_static_editor_msvc.cmake → Gems/ROS2/Code/ros2_editor_api_files.cmake

@@ -1,11 +1,8 @@
-#
 # 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
-#
 
-set(LY_COMPILE_OPTIONS
-        PRIVATE
-            /EHsc
+set(FILES
+    Include/ROS2/Frame/ROS2FrameEditorComponent.h
 )

+ 2 - 4
Gems/ROS2/Code/ros2_editor_files.cmake → Gems/ROS2/Code/ros2_editor_private_files.cmake

@@ -4,15 +4,13 @@
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 
 set(FILES
-    Source/ROS2GemUtilities.cpp
+    Source/Tools/ROS2EditorSystemComponent.cpp
+    Source/Tools/ROS2EditorSystemComponent.h
     Source/Spawner/ROS2SpawnerEditorComponent.cpp
     Source/Spawner/ROS2SpawnerEditorComponent.h
     Source/Spawner/ROS2SpawnPointEditorComponent.cpp
     Source/Spawner/ROS2SpawnPointEditorComponent.h
-    Source/Frame/ROS2FrameEditorComponent.cpp
     Source/Frame/ROS2FrameSystemComponent.cpp
     Source/Frame/ROS2FrameSystemComponent.h
     Source/Frame/ROS2FrameSystemBus.h
-    Source/SystemComponents/ROS2EditorSystemComponent.cpp
-    Source/SystemComponents/ROS2EditorSystemComponent.h
 )

+ 1 - 1
Gems/ROS2/Code/ros2_editor_shared_files.cmake

@@ -4,5 +4,5 @@
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 
 set(FILES
-    Source/ROS2EditorModule.cpp
+    Source/Tools/ROS2EditorModule.cpp
 )

+ 1 - 1
Gems/ROS2/Code/ros2_editor_tests_files.cmake

@@ -4,5 +4,5 @@
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 
 set(FILES
-    Tests/ROS2EditorTest.cpp
+    Tests/Frame/ROS2FrameComponentTest.cpp
 )

+ 0 - 42
Gems/ROS2/Code/ros2_files.cmake

@@ -1,42 +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
-
-set(FILES
-        ../Assets/Passes/PipelineRenderToTextureROSColor.pass
-        ../Assets/Passes/PipelineRenderToTextureROSDepth.pass
-        ../Assets/Passes/PipelineROSColor.pass
-        ../Assets/Passes/PipelineROSDepth.pass
-        ../Assets/Passes/ROSPassTemplates.azasset
-        Source/Clock/ROS2Clock.cpp
-        Source/Clock/ROS2TimeSource.cpp
-        Source/Clock/SimulationTimeSource.cpp
-        Source/Clock/RealTimeSource.cpp
-        Source/Communication/QoS.cpp
-        Source/Communication/PublisherConfiguration.cpp
-        Source/Communication/TopicConfiguration.cpp
-        Source/Frame/NamespaceConfiguration.cpp
-        Source/Frame/ROS2FrameComponent.cpp
-        Source/Frame/ROS2FrameConfiguration.cpp
-        Source/Frame/ROS2Transform.cpp
-        Source/ROS2ModuleInterface.h
-        Source/Sensor/Events/PhysicsBasedSource.cpp
-        Source/Sensor/Events/TickBasedSource.cpp
-        Source/SimulationUtils/FollowingCameraConfiguration.cpp
-        Source/SimulationUtils/FollowingCameraConfiguration.h
-        Source/SimulationUtils/FollowingCameraComponent.cpp
-        Source/SimulationUtils/FollowingCameraComponent.h
-        Source/Spawner/ROS2SpawnerComponent.cpp
-        Source/Spawner/ROS2SpawnerComponent.h
-        Source/Spawner/ROS2SpawnPointComponent.cpp
-        Source/Spawner/ROS2SpawnPointComponent.h
-        Source/Spawner/ROS2SpawnerComponentController.cpp
-        Source/Spawner/ROS2SpawnerComponentController.h
-        Source/Spawner/ROS2SpawnPointComponentController.cpp
-        Source/Spawner/ROS2SpawnPointComponentController.h
-        Source/SystemComponents/ROS2SystemComponent.cpp
-        Source/SystemComponents/ROS2SystemComponent.h
-        Source/Utilities/ROS2Conversions.cpp
-        Source/Utilities/ROS2Names.cpp
-)

+ 0 - 29
Gems/ROS2/Code/ros2_header_files.cmake

@@ -1,29 +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
-
-set(FILES
-        Include/ROS2/Clock/ROS2Clock.h
-        Include/ROS2/Clock/ITimeSource.h
-        Include/ROS2/Clock/ROS2TimeSource.h
-        Include/ROS2/Clock/SimulationTimeSource.h
-        Include/ROS2/Clock/RealTimeSource.h
-        Include/ROS2/Communication/PublisherConfiguration.h
-        Include/ROS2/Communication/TopicConfiguration.h
-        Include/ROS2/Communication/QoS.h
-        Include/ROS2/Frame/NamespaceConfiguration.h
-        Include/ROS2/Frame/ROS2FrameComponent.h
-        Include/ROS2/Frame/ROS2FrameConfiguration.h
-        Include/ROS2/Frame/ROS2Transform.h
-        Include/ROS2/ROS2Bus.h
-        Include/ROS2/ROS2GemUtilities.h
-        Include/ROS2/Sensor/Events/EventSourceAdapter.h
-        Include/ROS2/Sensor/Events/SensorEventSource.h
-        Include/ROS2/Sensor/Events/PhysicsBasedSource.h
-        Include/ROS2/Sensor/Events/TickBasedSource.h
-        Include/ROS2/Spawner/SpawnerBus.h
-        Include/ROS2/Spawner/SpawnerBusHandler.h
-        Include/ROS2/Utilities/ROS2Conversions.h
-        Include/ROS2/Utilities/ROS2Names.h
-)

+ 26 - 0
Gems/ROS2/Code/ros2_private_files.cmake

@@ -0,0 +1,26 @@
+# 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
+
+set(FILES
+    Source/ROS2ModuleInterface.cpp
+    Source/ROS2ModuleInterface.h
+    ../Assets/Passes/PipelineRenderToTextureROSColor.pass
+    ../Assets/Passes/PipelineRenderToTextureROSDepth.pass
+    ../Assets/Passes/PipelineROSColor.pass
+    ../Assets/Passes/PipelineROSDepth.pass
+    ../Assets/Passes/ROSPassTemplates.azasset
+    Source/SimulationUtils/FollowingCameraConfiguration.cpp
+    Source/SimulationUtils/FollowingCameraConfiguration.h
+    Source/SimulationUtils/FollowingCameraComponent.cpp
+    Source/SimulationUtils/FollowingCameraComponent.h
+    Source/Spawner/ROS2SpawnerComponent.cpp
+    Source/Spawner/ROS2SpawnerComponent.h
+    Source/Spawner/ROS2SpawnPointComponent.cpp
+    Source/Spawner/ROS2SpawnPointComponent.h
+    Source/Spawner/ROS2SpawnerComponentController.cpp
+    Source/Spawner/ROS2SpawnerComponentController.h
+    Source/Spawner/ROS2SpawnPointComponentController.cpp
+    Source/Spawner/ROS2SpawnPointComponentController.h
+)

+ 27 - 0
Gems/ROS2/Code/ros2_shared_api_files.cmake

@@ -0,0 +1,27 @@
+# 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
+
+set(FILES
+    Source/Clients/ROS2Module.cpp
+    Source/Clients/ROS2SystemComponent.cpp
+    Source/Clients/ROS2SystemComponent.h
+    Source/Clock/ROS2Clock.cpp
+    Source/Clock/ROS2TimeSource.cpp
+    Source/Clock/SimulationTimeSource.cpp
+    Source/Clock/RealTimeSource.cpp
+    Source/Communication/QoS.cpp
+    Source/Communication/PublisherConfiguration.cpp
+    Source/Communication/TopicConfiguration.cpp
+    Source/Frame/NamespaceConfiguration.cpp
+    Source/Frame/ROS2FrameComponent.cpp
+    Source/Frame/ROS2FrameConfiguration.cpp
+    Source/Frame/ROS2FrameEditorComponent.cpp
+    Source/Frame/ROS2Transform.cpp
+    Source/Sensor/Events/PhysicsBasedSource.cpp
+    Source/Sensor/Events/TickBasedSource.cpp
+    Source/Utilities/ROS2Conversions.cpp
+    Source/Utilities/ROS2Names.cpp
+    Source/ROS2GemUtilities.cpp
+)

+ 0 - 1
Gems/ROS2/Code/ros2_shared_files.cmake

@@ -4,5 +4,4 @@
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 
 set(FILES
-    Source/ROS2Module.cpp
 )

+ 19 - 0
Gems/ROS2/Code/ros2_target_depends.cmake

@@ -20,3 +20,22 @@ function(target_depends_on_ros2_packages TARGET_NAME)
         target_depends_on_ros2_package(${TARGET_NAME} ${_package} REQUIRED)
     endforeach ()
 endfunction()
+
+
+function(target_interface_depends_on_ros2_package TARGET_NAME)
+    list(GET ARGN 0 _package)
+    find_package(${ARGN})
+    include(${${_package}_DIR}/${_package}Config.cmake OPTIONAL)
+    if (${${_package}_FOUND_AMENT_PACKAGE})
+        message(DEBUG "Package ${_package} was found (${${_package}_DIR}) version ${${_package}_VERSION} targets : ${${_package}_TARGETS}")
+        target_link_libraries(${TARGET_NAME} INTERFACE ${${_package}_TARGETS})
+    else ()
+        message(FATAL_ERROR "Package ${_package} was found (${${_package}_DIR}), but package is not an Ament package.")
+    endif ()
+endfunction()
+
+function(target_interface_depends_on_ros2_packages TARGET_NAME)
+    foreach (_package IN LISTS ARGN)
+        target_interface_depends_on_ros2_package(${TARGET_NAME} ${_package} REQUIRED)
+    endforeach ()
+endfunction()

+ 0 - 1
Gems/ROS2/Code/ros2_tests_files.cmake

@@ -4,5 +4,4 @@
 # SPDX-License-Identifier: Apache-2.0 OR MIT
 
 set(FILES
-    Tests/ROS2Test.cpp
 )

+ 0 - 3
Gems/ROS2/Registry/assetprocessor_settings.setreg

@@ -1,8 +1,5 @@
 {
     "Amazon": {
-      "Physics": {
-            "EnableReducedCoordinateArticulations": true
-        },
         "AssetProcessor": {
             "Settings": {
                 "ScanFolder ROS2/Assets": {

+ 0 - 41
Gems/ROS2/Registry/sceneassetimporter.setreg

@@ -1,41 +0,0 @@
-{
-    "O3DE":
-    {
-        "SceneAPI":
-        {
-            "AssetImporter":
-            {
-            	// This list controls the set of file types that will get processed
-            	// by the Scene asset builder.
-            	// All supported file types need to be listed here because setreg
-            	// merges will completely replace the contents of the array.
-                "SupportedFileTypeExtensions":
-                [
-                    ".dae",
-                    ".fbx",
-                    ".stl",
-                    ".gltf",
-                    ".glb",
-                    ".obj"
-                ]
-            }
-        }
-    },
-    "Amazon": {
-        "AssetProcessor": {
-            "Settings": {
-            	// Only the newly-exposed Scene types need to be listed here, as
-            	// these will get appended to any MetaDataTypes that have been
-            	// previously listed.
-            	// This setting ensures that changes to an .assetinfo file will cause
-            	// the source asset to automatically rebuild itself.
-                "MetaDataTypes": {
-                    "dae.assetinfo": "dae",
-                    "obj.assetinfo": "obj"
-                }
-            }
-        }
-    }
-}    
-}
-

+ 8 - 15
Gems/ROS2/gem.json

@@ -1,9 +1,6 @@
 {
     "gem_name": "ROS2",
-    "version": "3.3.0",
-    "platforms": [
-        "Linux"
-    ],
+    "version": "4.0.0",
     "display_name": "ROS2",
     "license": "Apache-2.0",
     "license_url": "https://opensource.org/licenses/Apache-2.0",
@@ -22,21 +19,17 @@
         "o3de-sdk>=4.2.0",
         "o3de>=4.2.0"
     ],
+    "engine_api_dependencies": [],
+    "platforms": [
+        "Linux"
+    ],
     "icon_path": "preview.png",
-    "requirements": "Requires ROS 2 installation (supported distributions: Humble, 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/",
     "dependencies": [
-        "Atom_RPI",
-        "Atom_Feature_Common",
-        "Atom_Component_DebugCamera",
-        "CommonFeaturesAtom",
-        "PhysX5",
-        "PrimitiveAssets",
-        "StartingPointInput",
         "LevelGeoreferencing"
     ],
     "restricted": "ROS2",
-    "repo_uri": "https://raw.githubusercontent.com/o3de/o3de-extras/development",
-    "download_source_uri": "https://github.com/o3de/o3de-extras/releases/download/2.0/ros2-3.3.0-gem.zip"
+    "repo_uri": "https://github.com/o3de/o3de-extras",
+    "download_source_uri": "https://github.com/o3de/o3de-extras/releases/download/2.0/ros2-4.0.0-gem.zip"
 }
-

+ 0 - 2
Gems/ROS2/requirements.txt

@@ -1,2 +0,0 @@
-pyyaml==5.3
-lark==1.1.1

+ 5 - 1
Gems/ROS2Controllers/Code/CMakeLists.txt

@@ -57,7 +57,11 @@ ly_add_target(
         PUBLIC
             AZ::AzCore
             AZ::AzFramework
-            Gem::ROS2.Static
+            Gem::ImGui.Static
+            Gem::LmbrCentral.API
+            Gem::PhysX5.Static
+            Gem::ROS2
+            Gem::StartingPointInput
 )
 
 # Here add ${gem_name} target, it depends on the Private Object library and Public API interface

+ 2 - 1
Gems/ROS2Controllers/gem.json

@@ -18,9 +18,10 @@
         "Linux"
     ],
     "icon_path": "preview.png",
-    "requirements": "Requires ROS 2 installation (supported distributions: Humble, Jazzy). Source your workspace before building the Gem",
+    "requirements": "Requires ROS 2 Gem and PhysX5 Gem",
     "documentation_url": "https://docs.o3de.org/docs/user-guide/gems/reference/robotics/ros2/",
     "dependencies": [
+        "PhysX5",
         "ROS2>=3.3.0"
     ],
     "repo_uri": "https://github.com/o3de/o3de-extras/",

+ 3 - 2
Gems/ROS2RobotImporter/Code/CMakeLists.txt

@@ -57,7 +57,7 @@ ly_add_target(
         PUBLIC
             AZ::AzCore
             AZ::AzFramework
-            Gem::ROS2.Static
+            Gem::ROS2
 )
 
 # Here add ${gem_name} target, it depends on the Private Object library and Public API interface
@@ -146,7 +146,8 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
                 AZ::AzToolsFramework
                 Gem::CommonFeaturesAtom.Editor.Static
                 Gem::PhysX5.Editor.Static
-                Gem::ROS2.Editor.Static
+                Gem::ROS2.Editor
+                Gem::ROS2.Static
                 ${gem_name}.Private.Object
             PRIVATE
                 AZ::AssetBuilderSDK

+ 0 - 0
Gems/ROS2/Registry/sdfassetbuilder_settings.setreg → Gems/ROS2RobotImporter/Registry/sdfassetbuilder_settings.setreg


+ 3 - 1
Gems/ROS2Sensors/Code/CMakeLists.txt

@@ -77,7 +77,9 @@ ly_add_target(
         PUBLIC
             AZ::AzCore
             AZ::AzFramework
-            Gem::ROS2.Static
+            Gem::Atom_Feature_Common.Public # Camera Sensor
+            Gem::PhysX5.Static # Imu Sensor
+            Gem::ROS2
             Gem::LevelGeoreferencing.API
             ${gem_name}.Lidar.Static
 )

+ 2 - 1
Gems/ROS2Sensors/gem.json

@@ -18,10 +18,11 @@
         "Linux"
     ],
     "icon_path": "preview.png",
-    "requirements": "Requires ROS 2 installation (supported distributions: Humble, Jazzy). Source your workspace before building the Gem",
+    "requirements": "Requires ROS 2 Gem, LevelGeoreferencing Gem, and PhysX5 Gem",
     "documentation_url": "https://docs.o3de.org/docs/user-guide/gems/reference/robotics/ros2/",
     "dependencies": [
         "LevelGeoreferencing",
+        "PhysX5",
         "ROS2>=3.3.0"
     ],
     "repo_uri": "https://github.com/o3de/o3de-extras/",