Explorar el Código

ROS2 Gem API changes (remove ROS2GemUtilities, inline ROS2Conversions) (#929)

* Fix build: remove unused variables
* Remove usage of methods in ROS2GemUtilities
* Move ROS2Conversions to inlined
* Remove unused includes ROS2Names.h
* Remove unused include ROS2FrameComponent.h ROS2FrameEditorComponent.h
* Rename ROS2FrameBus into ROS2FrameEditorComponentBus
* Re-enable ROS2 Editor tests disabled by accident

Signed-off-by: Jan Hanca <[email protected]>
Jan Hanca hace 3 semanas
padre
commit
6c1f346f81
Se han modificado 45 ficheros con 85 adiciones y 225 borrados
  1. 0 2
      Gems/ROS2/Code/Include/ROS2/Frame/ROS2FrameComponent.h
  2. 3 4
      Gems/ROS2/Code/Include/ROS2/Frame/ROS2FrameEditorComponent.h
  3. 4 5
      Gems/ROS2/Code/Include/ROS2/Frame/ROS2FrameEditorComponentBus.h
  4. 0 58
      Gems/ROS2/Code/Include/ROS2/ROS2GemUtilities.h
  5. 0 1
      Gems/ROS2/Code/Include/ROS2/Sensor/ROS2SensorComponentBase.h
  6. 3 1
      Gems/ROS2/Code/Include/ROS2/Utilities/ROS2Conversions.h
  7. 13 12
      Gems/ROS2/Code/Include/ROS2/Utilities/ROS2Conversions.inl
  8. 1 1
      Gems/ROS2/Code/Platform/Linux/PAL_linux.cmake
  9. 0 1
      Gems/ROS2/Code/Source/Communication/PublisherConfiguration.cpp
  10. 13 9
      Gems/ROS2/Code/Source/Frame/ROS2FrameComponent.cpp
  11. 0 2
      Gems/ROS2/Code/Source/Frame/ROS2FrameConfiguration.cpp
  12. 5 5
      Gems/ROS2/Code/Source/Frame/ROS2FrameEditorComponent.cpp
  13. 1 1
      Gems/ROS2/Code/Source/Frame/ROS2FrameSystemBus.h
  14. 14 17
      Gems/ROS2/Code/Source/Frame/ROS2FrameSystemComponent.cpp
  15. 0 41
      Gems/ROS2/Code/Source/ROS2GemUtilities.cpp
  16. 0 1
      Gems/ROS2/Code/Source/Spawner/ROS2SpawnerComponent.cpp
  17. 0 1
      Gems/ROS2/Code/Source/Utilities/ROS2Names.cpp
  18. 7 7
      Gems/ROS2/Code/Tests/Frame/ROS2FrameComponentTest.cpp
  19. 1 0
      Gems/ROS2/Code/ros2_api_files.cmake
  20. 1 1
      Gems/ROS2/Code/ros2_editor_api_files.cmake
  21. 0 1
      Gems/ROS2/Code/ros2_editor_shared_api_files.cmake
  22. 0 1
      Gems/ROS2/Code/ros2_shared_api_files.cmake
  23. 0 1
      Gems/ROS2Controllers/Code/Source/Gripper/GripperActionServer.cpp
  24. 0 1
      Gems/ROS2Controllers/Code/Source/Gripper/GripperActionServerComponent.cpp
  25. 5 7
      Gems/ROS2Controllers/Code/Source/Manipulation/JointUtils.cpp
  26. 3 5
      Gems/ROS2Controllers/Code/Source/Manipulation/JointsManipulationComponent.cpp
  27. 1 4
      Gems/ROS2Controllers/Code/Source/Manipulation/JointsManipulationEditorComponent.cpp
  28. 0 1
      Gems/ROS2Controllers/Code/Source/Manipulation/JointsPositionsComponent.cpp
  29. 1 3
      Gems/ROS2Controllers/Code/Source/Manipulation/JointsPositionsEditorComponent.cpp
  30. 1 2
      Gems/ROS2Controllers/Code/Source/VehicleDynamics/DriveModels/SkidSteeringDriveModel.cpp
  31. 0 1
      Gems/ROS2RobotImporter/Code/Source/RobotImporter/Pages/CheckAssetPage.h
  32. 0 1
      Gems/ROS2RobotImporter/Code/Source/RobotImporter/Pages/FileSelectionPage.h
  33. 1 2
      Gems/ROS2RobotImporter/Code/Source/RobotImporter/Pages/PrefabMakerPage.cpp
  34. 0 1
      Gems/ROS2RobotImporter/Code/Source/RobotImporter/Pages/PrefabMakerPage.h
  35. 0 1
      Gems/ROS2RobotImporter/Code/Source/RobotImporter/SDFormat/ROS2SDFormatHooksUtils.cpp
  36. 5 9
      Gems/ROS2RobotImporter/Code/Source/RobotImporter/URDF/URDFPrefabMaker.cpp
  37. 0 1
      Gems/ROS2Sensors/Code/Source/Camera/CameraSensor.h
  38. 0 1
      Gems/ROS2Sensors/Code/Source/Camera/ROS2CameraSensorEditorComponent.cpp
  39. 0 1
      Gems/ROS2Sensors/Code/Source/Camera/ROS2CameraSensorEditorComponent.h
  40. 0 2
      Gems/ROS2Sensors/Code/Source/ContactSensor/ROS2ContactSensorComponent.cpp
  41. 0 2
      Gems/ROS2Sensors/Code/Source/GNSS/ROS2GNSSSensorComponent.cpp
  42. 0 1
      Gems/ROS2Sensors/Code/Source/Imu/ROS2ImuSensorComponent.cpp
  43. 1 2
      Gems/ROS2Sensors/Code/Source/Lidar/LidarCore.cpp
  44. 1 3
      Templates/Ros2ProjectTemplate/Template/Gem/Source/${Name}SampleComponent.cpp
  45. 0 1
      Templates/Ros2ProjectTemplate/Template/Gem/Source/${Name}SampleComponent.h

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

@@ -12,10 +12,8 @@
 #include <AzCore/std/smart_ptr/unique_ptr.h>
 #include <AzFramework/Components/TransformComponent.h>
 #include <ROS2/Frame/NamespaceConfiguration.h>
-#include <ROS2/Frame/ROS2FrameBus.h>
 #include <ROS2/Frame/ROS2FrameConfiguration.h>
 #include <ROS2/Frame/ROS2Transform.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <ROS2/ROS2TypeIds.h>
 
 namespace ROS2

+ 3 - 4
Gems/ROS2/Code/Include/ROS2/Frame/ROS2FrameEditorComponent.h

@@ -12,10 +12,9 @@
 #include <AzFramework/Components/TransformComponent.h>
 #include <AzToolsFramework/ToolsComponents/EditorComponentBase.h>
 #include <ROS2/Frame/NamespaceConfiguration.h>
-#include <ROS2/Frame/ROS2FrameComponent.h>
 #include <ROS2/Frame/ROS2FrameConfiguration.h>
+#include <ROS2/Frame/ROS2FrameEditorComponentBus.h>
 #include <ROS2/Frame/ROS2Transform.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <ROS2/ROS2TypeIds.h>
 
 namespace ROS2
@@ -27,7 +26,7 @@ namespace ROS2
     //! @note A robot should have this component on every level of entity hierarchy (for each joint, fixed or dynamic)
     class ROS2FrameEditorComponent
         : public AzToolsFramework::Components::EditorComponentBase
-        , public ROS2FrameComponentBus::Handler
+        , public ROS2FrameEditorComponentBus::Handler
         , public AZ::EntityBus::Handler
     {
     public:
@@ -65,7 +64,7 @@ namespace ROS2
         //! @param strategy Namespace strategy to use.
         void UpdateNamespaceConfiguration(const AZStd::string& ros2Namespace, const NamespaceConfiguration::NamespaceStrategy& strategy);
 
-        // ROS2FrameComponentBus::Handler overrides
+        // ROS2FrameEditorComponentBus::Handler overrides
         AZStd::string GetFrameID() const override;
         AZ::Name GetJointName() const override;
         AZStd::string GetNamespace() const override;

+ 4 - 5
Gems/ROS2/Code/Include/ROS2/Frame/ROS2FrameBus.h → Gems/ROS2/Code/Include/ROS2/Frame/ROS2FrameEditorComponentBus.h

@@ -12,13 +12,12 @@
 #include <AzCore/std/containers/set.h>
 #include <AzFramework/Components/TransformComponent.h>
 #include <ROS2/Frame/ROS2Transform.h>
-#include <ROS2/ROS2GemUtilities.h>
 
 namespace ROS2
 {
     //! Interface for the ROS2FrameEditorComponent.
     //! Used to change and get information about the ROS2FrameEditorComponent.
-    class ROS2FrameComponentRequests : public AZ::ComponentBus
+    class ROS2FrameEditorComponentRequests : public AZ::ComponentBus
     {
     public:
         // One handler per address is supported.
@@ -63,9 +62,9 @@ namespace ROS2
         virtual bool IsTopLevel() const = 0;
     };
 
-    using ROS2FrameComponentBus = AZ::EBus<ROS2FrameComponentRequests>;
+    using ROS2FrameEditorComponentBus = AZ::EBus<ROS2FrameEditorComponentRequests>;
 
-    class ROS2FrameComponentNotifications : public AZ::ComponentBus
+    class ROS2FrameEditorComponentNotifications : public AZ::ComponentBus
     {
     public:
         static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple;
@@ -83,5 +82,5 @@ namespace ROS2
         virtual void OnChildRemoved(AZ::EntityId removedChild) = 0;
     };
 
-    using ROS2FrameComponentNotificationBus = AZ::EBus<ROS2FrameComponentNotifications>;
+    using ROS2FrameEditorComponentNotificationBus = AZ::EBus<ROS2FrameEditorComponentNotifications>;
 } // namespace ROS2

+ 0 - 58
Gems/ROS2/Code/Include/ROS2/ROS2GemUtilities.h

@@ -1,58 +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
- *
- */
-#pragma once
-
-#include <AzCore/Component/ComponentBus.h>
-#include <AzCore/Component/Entity.h>
-#include <AzCore/Component/EntityUtils.h>
-#ifdef ROS2_EDITOR
-#include <AzToolsFramework/ToolsComponents/GenericComponentWrapper.h>
-#endif
-
-namespace ROS2
-{
-    namespace Utils
-    {
-        //! Checks whether the entity has a component of the given type
-        //! @param entity pointer to entity
-        //! @param typeId type of the component
-        //! @returns true if entity has component with given type
-        inline bool HasComponentOfType(const AZ::Entity* entity, const AZ::Uuid typeId)
-        {
-            auto components = AZ::EntityUtils::FindDerivedComponents(entity, typeId);
-            return !components.empty();
-        }
-
-        /// Create component for a given entity in safe way.
-        /// @param entityId entity that will own component
-        /// @param componentType Uuid of component to create
-        /// @return The created componentId if successful, otherwise returns an invalid id
-        AZ::ComponentId CreateComponent(const AZ::EntityId entityId, const AZ::Uuid componentType);
-
-        /// Retrieve component from entity given by a pointer. It is a way to get game components and wrapped components.
-        /// We should use that that we are not sure if we access eg ROS2FrameComponent in game mode or from Editor
-        /// @param entity pointer to entity eg with GetEntity()
-        /// @return pointer to component with type T
-        template<class ComponentType>
-        ComponentType* GetGameOrEditorComponent(const AZ::Entity* entity)
-        {
-            AZ_Assert(entity, "Called with empty entity");
-            ComponentType* component = entity->FindComponent<ComponentType>();
-            if (component)
-            {
-                return component;
-            }
-#ifdef ROS2_EDITOR
-            // failed to get game object, let us retry as editor
-            component = AzToolsFramework::FindWrappedComponentForEntity<ComponentType>(entity);
-#endif
-            return component;
-        }
-
-    } // namespace Utils
-} // namespace ROS2

+ 0 - 1
Gems/ROS2/Code/Include/ROS2/Sensor/ROS2SensorComponentBase.h

@@ -11,7 +11,6 @@
 #include <AzCore/Component/Component.h>
 #include <AzCore/Serialization/EditContext.h>
 #include <ROS2/Frame/ROS2FrameComponent.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <ROS2/ROS2TypeIds.h>
 #include <ROS2/Sensor/Events/EventSourceAdapter.h>
 #include <ROS2/Sensor/SensorConfiguration.h>

+ 3 - 1
Gems/ROS2/Code/Include/ROS2/Utilities/ROS2Conversions.h

@@ -10,10 +10,10 @@
 #include <AzCore/Math/Quaternion.h>
 #include <AzCore/Math/Transform.h>
 #include <AzCore/Math/Vector3.h>
+#include <builtin_interfaces/msg/time.hpp>
 #include <geometry_msgs/msg/point.hpp>
 #include <geometry_msgs/msg/pose.hpp>
 #include <geometry_msgs/msg/vector3.hpp>
-#include <builtin_interfaces/msg/time.hpp>
 
 namespace ROS2
 {
@@ -32,3 +32,5 @@ namespace ROS2
         float GetTimeDifference(const builtin_interfaces::msg::Time& start, const builtin_interfaces::msg::Time& end);
     }; // namespace ROS2Conversions
 } // namespace ROS2
+
+#include <ROS2/Utilities/ROS2Conversions.inl>

+ 13 - 12
Gems/ROS2/Code/Source/Utilities/ROS2Conversions.cpp → Gems/ROS2/Code/Include/ROS2/Utilities/ROS2Conversions.inl

@@ -8,16 +8,16 @@
 
 #include <AzCore/Math/Matrix3x3.h>
 #include <AzCore/Math/Transform.h>
-#include <ROS2/Utilities/ROS2Conversions.h>
+#include <AzCore/PlatformDef.h>
 
 namespace ROS2
 {
-    AZ::Vector3 ROS2Conversions::FromROS2Vector3(const geometry_msgs::msg::Vector3& ros2vector)
+    AZ_FORCE_INLINE AZ::Vector3 ROS2Conversions::FromROS2Vector3(const geometry_msgs::msg::Vector3& ros2vector)
     { // Same coordinate systems - just translate types
         return AZ::Vector3(ros2vector.x, ros2vector.y, ros2vector.z);
     }
 
-    geometry_msgs::msg::Vector3 ROS2Conversions::ToROS2Vector3(const AZ::Vector3& azvector)
+    AZ_FORCE_INLINE geometry_msgs::msg::Vector3 ROS2Conversions::ToROS2Vector3(const AZ::Vector3& azvector)
     {
         geometry_msgs::msg::Vector3 ros2vector;
         ros2vector.x = azvector.GetX();
@@ -26,7 +26,7 @@ namespace ROS2
         return ros2vector;
     }
 
-    geometry_msgs::msg::Point ROS2Conversions::ToROS2Point(const AZ::Vector3& azvector)
+    AZ_FORCE_INLINE geometry_msgs::msg::Point ROS2Conversions::ToROS2Point(const AZ::Vector3& azvector)
     {
         geometry_msgs::msg::Point ros2point;
         ros2point.x = azvector.GetX();
@@ -35,7 +35,7 @@ namespace ROS2
         return ros2point;
     }
 
-    geometry_msgs::msg::Quaternion ROS2Conversions::ToROS2Quaternion(const AZ::Quaternion& azquaternion)
+    AZ_FORCE_INLINE geometry_msgs::msg::Quaternion ROS2Conversions::ToROS2Quaternion(const AZ::Quaternion& azquaternion)
     {
         geometry_msgs::msg::Quaternion ros2Quaternion;
         ros2Quaternion.x = azquaternion.GetX();
@@ -45,7 +45,7 @@ namespace ROS2
         return ros2Quaternion;
     }
 
-    geometry_msgs::msg::Pose ROS2Conversions::ToROS2Pose(const AZ::Transform& aztransform)
+    AZ_FORCE_INLINE geometry_msgs::msg::Pose ROS2Conversions::ToROS2Pose(const AZ::Transform& aztransform)
     {
         geometry_msgs::msg::Pose pose;
         pose.position = ToROS2Point(aztransform.GetTranslation());
@@ -53,17 +53,17 @@ namespace ROS2
         return pose;
     }
 
-    AZ::Transform ROS2Conversions::FromROS2Pose(const geometry_msgs::msg::Pose& ros2pose)
+    AZ_FORCE_INLINE AZ::Transform ROS2Conversions::FromROS2Pose(const geometry_msgs::msg::Pose& ros2pose)
     {
         return { FromROS2Point(ros2pose.position), FromROS2Quaternion(ros2pose.orientation), 1.0f };
     }
 
-    AZ::Vector3 ROS2Conversions::FromROS2Point(const geometry_msgs::msg::Point& ros2point)
+    AZ_FORCE_INLINE AZ::Vector3 ROS2Conversions::FromROS2Point(const geometry_msgs::msg::Point& ros2point)
     {
         return AZ::Vector3(ros2point.x, ros2point.y, ros2point.z);
     }
 
-    AZ::Quaternion ROS2Conversions::FromROS2Quaternion(const geometry_msgs::msg::Quaternion& ros2quaternion)
+    AZ_FORCE_INLINE AZ::Quaternion ROS2Conversions::FromROS2Quaternion(const geometry_msgs::msg::Quaternion& ros2quaternion)
     {
         AZ::Quaternion azquaternion;
         azquaternion.SetX(ros2quaternion.x);
@@ -73,7 +73,7 @@ namespace ROS2
         return azquaternion;
     }
 
-    std::array<double, 9> ROS2Conversions::ToROS2Covariance(const AZ::Matrix3x3& covariance)
+    AZ_FORCE_INLINE std::array<double, 9> ROS2Conversions::ToROS2Covariance(const AZ::Matrix3x3& covariance)
     {
         std::array<double, 9> ros2Covariance;
         for (int i = 0; i < 9; ++i)
@@ -83,8 +83,9 @@ namespace ROS2
         return ros2Covariance;
     }
 
-    float ROS2Conversions::GetTimeDifference(const builtin_interfaces::msg::Time &start,
-                                             const builtin_interfaces::msg::Time &end) {
+    AZ_FORCE_INLINE float ROS2Conversions::GetTimeDifference(
+        const builtin_interfaces::msg::Time& start, const builtin_interfaces::msg::Time& end)
+    {
         return static_cast<float>(end.sec - start.sec) + static_cast<float>(end.nanosec - start.nanosec) / 1e9;
     }
 

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

@@ -8,4 +8,4 @@
 
 set(PAL_TRAIT_ROS2_SUPPORTED TRUE)
 set(PAL_TRAIT_ROS2_TEST_SUPPORTED FALSE)
-set(PAL_TRAIT_ROS2_EDITOR_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2_EDITOR_TEST_SUPPORTED TRUE)

+ 0 - 1
Gems/ROS2/Code/Source/Communication/PublisherConfiguration.cpp

@@ -8,7 +8,6 @@
 
 #include <AzCore/Serialization/EditContext.h>
 #include <ROS2/Communication/PublisherConfiguration.h>
-#include <ROS2/Utilities/ROS2Names.h>
 
 namespace ROS2
 {

+ 13 - 9
Gems/ROS2/Code/Source/Frame/ROS2FrameComponent.cpp

@@ -19,7 +19,6 @@
 #include <ROS2/Frame/ROS2FrameComponent.h>
 #include <ROS2/Frame/ROS2FrameConfiguration.h>
 #include <ROS2/ROS2Bus.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <ROS2/Utilities/ROS2Names.h>
 #include <rapidjson/document.h>
 #include <rapidjson/stringbuffer.h>
@@ -28,6 +27,12 @@ namespace ROS2
 {
     namespace Internal
     {
+        bool HasComponentOfType(const AZ::Entity* entity, const AZ::Uuid typeId)
+        {
+            auto components = AZ::EntityUtils::FindDerivedComponents(entity, typeId);
+            return !components.empty();
+        }
+
         AZ::TransformInterface* GetEntityTransformInterface(const AZ::Entity* entity)
         {
             if (!entity)
@@ -36,8 +41,7 @@ namespace ROS2
                 return nullptr;
             }
 
-            auto* interface = Utils::GetGameOrEditorComponent<AzFramework::TransformComponent>(entity);
-
+            auto* interface = entity->FindComponent<AzFramework::TransformComponent>();
             return interface;
         }
 
@@ -59,7 +63,7 @@ namespace ROS2
             AZ::ComponentApplicationBus::BroadcastResult(parentEntity, &AZ::ComponentApplicationRequests::FindEntity, parentEntityId);
             AZ_Assert(parentEntity, "No parent entity id : %s", parentEntityId.ToString().c_str());
 
-            auto* component = Utils::GetGameOrEditorComponent<ROS2FrameComponent>(parentEntity);
+            auto* component = parentEntity->FindComponent<ROS2FrameComponent>();
             if (component == nullptr)
             { // Parent entity has no ROS2Frame, but there can still be a ROS2Frame in its ancestors
                 return GetFirstROS2FrameAncestor(parentEntity);
@@ -151,11 +155,11 @@ namespace ROS2
             {
                 // 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
+                    Internal::HasComponentOfType(m_entity, AZ::Uuid("{B01FD1D2-1D91-438D-874A-BF5EB7E919A8}")); // PhysX::JointComponent;
+                const bool hasFixedJoints = Internal::HasComponentOfType(
+                    m_entity, AZ::Uuid("{02E6C633-8F44-4CEE-AE94-DCB06DE36422}")); // PhysX::FixedJointComponent
+                const bool hasArticulations = Internal::HasComponentOfType(
+                    m_entity, AZ::Uuid("{48751E98-B35F-4A2F-A908-D9CDD5230264}")); // PhysX::ArticulationComponent
                 m_isDynamic = (hasJoints && !hasFixedJoints) || hasArticulations;
             }
 

+ 0 - 2
Gems/ROS2/Code/Source/Frame/ROS2FrameConfiguration.cpp

@@ -11,8 +11,6 @@
 #include <AzCore/Serialization/SerializeContext.h>
 #include <ROS2/Frame/NamespaceConfiguration.h>
 #include <ROS2/Frame/ROS2FrameConfiguration.h>
-#include <ROS2/ROS2GemUtilities.h>
-#include <ROS2/Utilities/ROS2Names.h>
 
 namespace ROS2
 {

+ 5 - 5
Gems/ROS2/Code/Source/Frame/ROS2FrameEditorComponent.cpp

@@ -16,11 +16,10 @@
 #include <AzCore/Serialization/EditContextConstants.inl>
 #include <AzCore/Serialization/SerializeContext.h>
 #include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h>
-#include <ROS2/Frame/ROS2FrameBus.h>
 #include <ROS2/Frame/ROS2FrameComponent.h>
 #include <ROS2/Frame/ROS2FrameEditorComponent.h>
+#include <ROS2/Frame/ROS2FrameEditorComponentBus.h>
 #include <ROS2/ROS2Bus.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <ROS2/Utilities/ROS2Names.h>
 
 namespace ROS2
@@ -37,7 +36,7 @@ namespace ROS2
 
     void ROS2FrameEditorComponent::Activate()
     {
-        ROS2FrameComponentBus::Handler::BusConnect(GetEntityId());
+        ROS2FrameEditorComponentBus::Handler::BusConnect(GetEntityId());
         AZ::EntityBus::Handler::BusConnect(GetEntityId());
         if (auto* frameSystemInterface = ROS2FrameSystemInterface::Get())
         {
@@ -52,7 +51,7 @@ namespace ROS2
             frameSystemInterface->UnregisterFrame(GetEntityId());
         }
         AZ::EntityBus::Handler::BusDisconnect();
-        ROS2FrameComponentBus::Handler::BusDisconnect();
+        ROS2FrameEditorComponentBus::Handler::BusDisconnect();
     }
 
     AZStd::string ROS2FrameEditorComponent::GetGlobalFrameName() const
@@ -90,7 +89,8 @@ namespace ROS2
             &AzToolsFramework::PropertyEditorEntityChangeNotificationBus::Events::OnEntityComponentPropertyChanged,
             GetEntity()->FindComponent<ROS2FrameEditorComponent>()->GetId());
 
-        ROS2FrameComponentNotificationBus::Event(GetEntityId(), &ROS2FrameComponentNotificationBus::Events::OnConfigurationChange);
+        ROS2FrameEditorComponentNotificationBus::Event(
+            GetEntityId(), &ROS2FrameEditorComponentNotificationBus::Events::OnConfigurationChange);
     }
 
     void ROS2FrameEditorComponent::UpdateNamespaceConfiguration(

+ 1 - 1
Gems/ROS2/Code/Source/Frame/ROS2FrameSystemBus.h

@@ -12,8 +12,8 @@
 #include <AzCore/EBus/Policies.h>
 #include <AzCore/Interface/Interface.h>
 #include <AzCore/RTTI/RTTIMacros.h>
+#include <AzCore/std/containers/set.h>
 #include <AzCore/std/string/string.h>
-#include <ROS2/Frame/ROS2FrameComponent.h>
 
 namespace ROS2
 {

+ 14 - 17
Gems/ROS2/Code/Source/Frame/ROS2FrameSystemComponent.cpp

@@ -16,10 +16,8 @@
 #include <AzCore/std/containers/set.h>
 #include <AzCore/std/string/string.h>
 #include <AzToolsFramework/ToolsComponents/TransformComponent.h>
-#include <ROS2/Frame/ROS2FrameBus.h>
 #include <ROS2/Frame/ROS2FrameComponent.h>
-#include <ROS2/Frame/ROS2FrameEditorComponent.h>
-#include <ROS2/ROS2GemUtilities.h>
+#include <ROS2/Frame/ROS2FrameEditorComponentBus.h>
 
 namespace ROS2
 {
@@ -93,8 +91,7 @@ namespace ROS2
             return nullptr;
         }
 
-        auto* interface = Utils::GetGameOrEditorComponent<AzToolsFramework::Components::TransformComponent>(entity);
-
+        auto* interface = entity->FindComponent<AzToolsFramework::Components::TransformComponent>();
         return interface;
     }
 
@@ -154,7 +151,7 @@ namespace ROS2
                     return path;
                 }
             }
-            if (ROS2FrameComponentBus::HasHandlers(nextEntityId))
+            if (ROS2FrameEditorComponentBus::HasHandlers(nextEntityId))
             {
                 path.push_back(nextEntityId);
                 break;
@@ -261,8 +258,8 @@ namespace ROS2
         auto predecessors = GetAllPredecessors(frameToRegister);
         for (const auto& predecessor : predecessors)
         {
-            ROS2FrameComponentNotificationBus::Event(
-                predecessor, &ROS2FrameComponentNotificationBus::Events::OnChildAdded, frameToRegister);
+            ROS2FrameEditorComponentNotificationBus::Event(
+                predecessor, &ROS2FrameEditorComponentNotificationBus::Events::OnChildAdded, frameToRegister);
         }
     }
 
@@ -337,8 +334,8 @@ namespace ROS2
 
         for (const auto& predecessor : predecessors)
         {
-            ROS2FrameComponentNotificationBus::Event(
-                predecessor, &ROS2FrameComponentNotificationBus::Events::OnChildRemoved, frameToUnregister);
+            ROS2FrameEditorComponentNotificationBus::Event(
+                predecessor, &ROS2FrameEditorComponentNotificationBus::Events::OnChildRemoved, frameToUnregister);
         }
     }
 
@@ -431,8 +428,8 @@ namespace ROS2
         {
             for (const auto& oldPredecessor : oldPredecessors)
             {
-                ROS2FrameComponentNotificationBus::Event(
-                    oldPredecessor, &ROS2FrameComponentNotificationBus::Events::OnChildRemoved, successor);
+                ROS2FrameEditorComponentNotificationBus::Event(
+                    oldPredecessor, &ROS2FrameEditorComponentNotificationBus::Events::OnChildRemoved, successor);
             }
         }
 
@@ -447,8 +444,8 @@ namespace ROS2
         {
             for (const auto& newPredecessor : newPredecessors)
             {
-                ROS2FrameComponentNotificationBus::Event(
-                    newPredecessor, &ROS2FrameComponentNotificationBus::Events::OnChildAdded, successor);
+                ROS2FrameEditorComponentNotificationBus::Event(
+                    newPredecessor, &ROS2FrameEditorComponentNotificationBus::Events::OnChildAdded, successor);
             }
         }
 
@@ -459,18 +456,18 @@ namespace ROS2
     void ROS2FrameSystemComponent::UpdateNamespaces(AZ::EntityId frameEntity, AZ::EntityId frameParentEntity, bool isActive)
     {
         AZStd::string ros2Namespace;
-        ROS2FrameComponentBus::EventResult(ros2Namespace, frameParentEntity, &ROS2FrameComponentBus::Events::GetNamespace);
+        ROS2FrameEditorComponentBus::EventResult(ros2Namespace, frameParentEntity, &ROS2FrameEditorComponentBus::Events::GetNamespace);
         UpdateNamespaces(frameEntity, ros2Namespace, isActive);
     }
 
     void ROS2FrameSystemComponent::UpdateNamespaces(AZ::EntityId frameEntity, AZStd::string parentNamespace, bool isActive)
     {
-        ROS2FrameComponentBus::Event(frameEntity, &ROS2FrameComponentBus::Events::UpdateNamespace, parentNamespace);
+        ROS2FrameEditorComponentBus::Event(frameEntity, &ROS2FrameEditorComponentBus::Events::UpdateNamespace, parentNamespace);
         const AZStd::set<AZ::EntityId>& children = m_frameChildren.find(frameEntity)->second;
         AZStd::string ros2Namespace;
         if (isActive)
         {
-            ROS2FrameComponentBus::EventResult(ros2Namespace, frameEntity, &ROS2FrameComponentBus::Events::GetNamespace);
+            ROS2FrameEditorComponentBus::EventResult(ros2Namespace, frameEntity, &ROS2FrameEditorComponentBus::Events::GetNamespace);
         }
         else
         {

+ 0 - 41
Gems/ROS2/Code/Source/ROS2GemUtilities.cpp

@@ -1,41 +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 <AzCore/std/string/regex.h>
-#include <AzToolsFramework/API/EntityCompositionRequestBus.h>
-#include <ROS2/ROS2GemUtilities.h>
-
-namespace ROS2
-{
-
-    AZ::ComponentId Utils::CreateComponent(const AZ::EntityId entityId, const AZ::Uuid componentType)
-    {
-        const AZ::ComponentTypeList componentsToAdd{ componentType };
-        const AZStd::vector<AZ::EntityId> entityIds{ entityId };
-        AzToolsFramework::EntityCompositionRequests::AddComponentsOutcome addComponentsOutcome = AZ::Failure(AZStd::string());
-        AzToolsFramework::EntityCompositionRequestBus::BroadcastResult(
-            addComponentsOutcome, &AzToolsFramework::EntityCompositionRequests::AddComponentsToEntities, entityIds, componentsToAdd);
-        if (!addComponentsOutcome.IsSuccess())
-        {
-            AZ_Warning(
-                "URDF importer",
-                false,
-                "Failed to create component %s, entity %s : %s",
-                componentType.ToString<AZStd::string>().c_str(),
-                entityId.ToString().c_str(),
-                addComponentsOutcome.GetError().c_str());
-        }
-        const auto& added = addComponentsOutcome.GetValue().at(entityId).m_componentsAdded;
-        if (!added.empty())
-        {
-            return added.front()->GetId();
-        }
-        return AZ::InvalidComponentId;
-    }
-
-} // namespace ROS2

+ 0 - 1
Gems/ROS2/Code/Source/Spawner/ROS2SpawnerComponent.cpp

@@ -18,7 +18,6 @@
 #include <Georeferencing/GeoreferenceBus.h>
 #include <ROS2/Frame/ROS2FrameComponent.h>
 #include <ROS2/ROS2Bus.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <ROS2/Spawner/SpawnerBus.h>
 #include <ROS2/Spawner/SpawnerBusHandler.h>
 #include <ROS2/Utilities/ROS2Conversions.h>

+ 0 - 1
Gems/ROS2/Code/Source/Utilities/ROS2Names.cpp

@@ -22,7 +22,6 @@ namespace ROS2
         }
 
         return AZStd::string::format("%s/%s", ns.c_str(), name.c_str());
-        ;
     }
 
     AZStd::string ROS2Names::RosifyName(const AZStd::string& input)

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

@@ -37,7 +37,7 @@
 
 namespace UnitTest
 {
-    class ROS2FrameComponentTestEnviroment : public AZ::Test::GemTestEnvironment
+    class ROS2FrameComponentTestEnvironment : public AZ::Test::GemTestEnvironment
     {
         // AZ::Test::GemTestEnvironment overrides ...
         void AddGemsAndComponents() override;
@@ -45,11 +45,11 @@ namespace UnitTest
         void PostSystemEntityActivate() override;
 
     public:
-        ROS2FrameComponentTestEnviroment() = default;
-        ~ROS2FrameComponentTestEnviroment() override = default;
+        ROS2FrameComponentTestEnvironment() = default;
+        ~ROS2FrameComponentTestEnvironment() override = default;
     };
 
-    void ROS2FrameComponentTestEnviroment::AddGemsAndComponents()
+    void ROS2FrameComponentTestEnvironment::AddGemsAndComponents()
     {
         AddActiveGems(AZStd::to_array<AZStd::string_view>({ "ROS2" }));
         AddDynamicModulePaths({});
@@ -58,13 +58,13 @@ namespace UnitTest
         AddRequiredComponents(AZStd::to_array<AZ::TypeId const>({ ROS2::ROS2SystemComponent::TYPEINFO_Uuid() }));
     }
 
-    AZ::ComponentApplication* ROS2FrameComponentTestEnviroment::CreateApplicationInstance()
+    AZ::ComponentApplication* ROS2FrameComponentTestEnvironment::CreateApplicationInstance()
     {
         // Using ToolsTestApplication to have AzFramework and AzToolsFramework components.
         return aznew UnitTest::ToolsTestApplication("ROS2FrameComponent");
     }
 
-    void ROS2FrameComponentTestEnviroment::PostSystemEntityActivate()
+    void ROS2FrameComponentTestEnvironment::PostSystemEntityActivate()
     {
         AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize);
     }
@@ -187,7 +187,7 @@ AZTEST_EXPORT int AZ_UNIT_TEST_HOOK_NAME(int argc, char** argv)
     AzQtComponents::PrepareQtPaths();
     QApplication app(argc, argv);
     AZ::Test::printUnusedParametersWarning(argc, argv);
-    AZ::Test::addTestEnvironments({ new UnitTest::ROS2FrameComponentTestEnviroment() });
+    AZ::Test::addTestEnvironments({ new UnitTest::ROS2FrameComponentTestEnvironment() });
     int result = RUN_ALL_TESTS();
     return result;
 }

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

@@ -28,5 +28,6 @@ set(FILES
     Include/ROS2/Spawner/SpawnerBus.h
     Include/ROS2/Spawner/SpawnerBusHandler.h
     Include/ROS2/Utilities/ROS2Conversions.h
+    Include/ROS2/Utilities/ROS2Conversions.inl
     Include/ROS2/Utilities/ROS2Names.h
 )

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

@@ -5,5 +5,5 @@
 
 set(FILES
     Include/ROS2/Frame/ROS2FrameEditorComponent.h
-    Include/ROS2/ROS2GemUtilities.h
+    Include/ROS2/Frame/ROS2FrameEditorComponentBus.h
 )

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

@@ -5,5 +5,4 @@
 
 set(FILES
     Source/Frame/ROS2FrameEditorComponent.cpp
-    Source/ROS2GemUtilities.cpp
 )

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

@@ -21,6 +21,5 @@ set(FILES
     Source/ROS2ModuleInterface.h
     Source/Sensor/Events/PhysicsBasedSource.cpp
     Source/Sensor/Events/TickBasedSource.cpp
-    Source/Utilities/ROS2Conversions.cpp
     Source/Utilities/ROS2Names.cpp
 )

+ 0 - 1
Gems/ROS2Controllers/Code/Source/Gripper/GripperActionServer.cpp

@@ -14,7 +14,6 @@
 #include <AzCore/Serialization/SerializeContext.h>
 #include <AzFramework/Components/TransformComponent.h>
 #include <ROS2/ROS2Bus.h>
-#include <ROS2/ROS2GemUtilities.h>
 
 namespace ROS2Controllers
 {

+ 0 - 1
Gems/ROS2Controllers/Code/Source/Gripper/GripperActionServerComponent.cpp

@@ -14,7 +14,6 @@
 #include <AzCore/Serialization/SerializeContext.h>
 #include <AzFramework/Components/TransformComponent.h>
 #include <ROS2/Frame/ROS2FrameComponent.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <ROS2/Utilities/ROS2Names.h>
 
 namespace ROS2Controllers

+ 5 - 7
Gems/ROS2Controllers/Code/Source/Manipulation/JointUtils.cpp

@@ -8,10 +8,8 @@
 
 #include "JointUtils.h"
 
-#include <ROS2/ROS2GemUtilities.h>
 #include <Source/EditorArticulationLinkComponent.h>
 #include <Source/EditorBallJointComponent.h>
-#include <Source/EditorFixedJointComponent.h>
 #include <Source/EditorHingeJointComponent.h>
 #include <Source/EditorPrismaticJointComponent.h>
 
@@ -20,11 +18,11 @@ namespace ROS2Controllers::JointUtils
 
     bool HasNonFixedJoints(const AZ::Entity* entity)
     {
-        const bool hasPrismaticJoints = ROS2::Utils::HasComponentOfType(entity, PhysX::EditorPrismaticJointComponent::TYPEINFO_Uuid());
-        const bool hasBallJoints = ROS2::Utils::HasComponentOfType(entity, PhysX::EditorBallJointComponent::TYPEINFO_Uuid());
-        const bool hasHingeJoints = ROS2::Utils::HasComponentOfType(entity, PhysX::EditorHingeJointComponent::TYPEINFO_Uuid());
-        const bool hasArticulations = ROS2::Utils::HasComponentOfType(entity, PhysX::EditorArticulationLinkComponent::TYPEINFO_Uuid());
-        const bool hasJoints = hasPrismaticJoints || hasBallJoints || hasHingeJoints || hasArticulations;
+        const auto* prismaticJoint = entity->FindComponent<PhysX::EditorPrismaticJointComponent>();
+        const auto* ballJoint = entity->FindComponent<PhysX::EditorBallJointComponent>();
+        const auto* hingeJoint = entity->FindComponent<PhysX::EditorHingeJointComponent>();
+        const auto* articulation = entity->FindComponent<PhysX::EditorArticulationLinkComponent>();
+        const bool hasJoints = prismaticJoint || ballJoint || hingeJoint || articulation;
 
         return hasJoints;
     }

+ 3 - 5
Gems/ROS2Controllers/Code/Source/Manipulation/JointsManipulationComponent.cpp

@@ -106,11 +106,9 @@ namespace ROS2Controllers
                 }
                 const AZStd::string jointName(frameComponent->GetJointName().GetCStr());
 
-                auto* hingeComponent =
-                    azrtti_cast<PhysX::JointComponent*>(ROS2::Utils::GetGameOrEditorComponent<PhysX::HingeJointComponent>(entity));
-                auto* prismaticComponent =
-                    azrtti_cast<PhysX::JointComponent*>(ROS2::Utils::GetGameOrEditorComponent<PhysX::PrismaticJointComponent>(entity));
-                auto* articulationComponent = ROS2::Utils::GetGameOrEditorComponent<PhysX::ArticulationLinkComponent>(entity);
+                auto* hingeComponent = entity->FindComponent<PhysX::HingeJointComponent>();
+                auto* prismaticComponent = entity->FindComponent<PhysX::PrismaticJointComponent>();
+                auto* articulationComponent = entity->FindComponent<PhysX::ArticulationLinkComponent>();
                 [[maybe_unused]] bool classicJoint = hingeComponent || prismaticComponent;
                 AZ_Warning(
                     "JointsManipulationComponent",

+ 1 - 4
Gems/ROS2Controllers/Code/Source/Manipulation/JointsManipulationEditorComponent.cpp

@@ -15,8 +15,6 @@
 #include <AzCore/std/functional.h>
 #include <AzToolsFramework/API/ToolsApplicationAPI.h>
 #include <ROS2/Frame/ROS2FrameEditorComponent.h>
-#include <ROS2/ROS2GemUtilities.h>
-#include <ROS2/Utilities/ROS2Names.h>
 #include <ROS2Controllers/Manipulation/Controllers/JointsPositionControllerRequests.h>
 #include <ROS2Controllers/Manipulation/JointInfo.h>
 #include <Source/ArticulationLinkComponent.h>
@@ -106,8 +104,7 @@ namespace ROS2Controllers
 
         AZStd::function<void(const AZ::Entity* entity)> getAllJointsHierarchy = [&](const AZ::Entity* entity)
         {
-            auto* frameEditorComponent =
-                azrtti_cast<ROS2::ROS2FrameEditorComponent*>(ROS2::Utils::GetGameOrEditorComponent<ROS2::ROS2FrameEditorComponent>(entity));
+            auto* frameEditorComponent = entity->FindComponent<ROS2::ROS2FrameEditorComponent>();
             AZ_Assert(frameEditorComponent, "ROS2FrameEditorComponent does not exist!");
 
             const bool hasNonFixedJoints = JointUtils::HasNonFixedJoints(entity);

+ 0 - 1
Gems/ROS2Controllers/Code/Source/Manipulation/JointsPositionsComponent.cpp

@@ -13,7 +13,6 @@
 #include <AzCore/Serialization/EditContext.h>
 #include <AzCore/Serialization/SerializeContext.h>
 
-#include <ROS2/ROS2GemUtilities.h>
 #include <ROS2Controllers/Manipulation/JointsManipulationRequests.h>
 #include <Utilities/ArticulationsUtilities.h>
 

+ 1 - 3
Gems/ROS2Controllers/Code/Source/Manipulation/JointsPositionsEditorComponent.cpp

@@ -18,7 +18,6 @@
 #include <AzToolsFramework/API/ToolsApplicationAPI.h>
 #include <AzToolsFramework/ToolsComponents/EditorComponentBase.h>
 #include <ROS2/Frame/ROS2FrameEditorComponent.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <ROS2Controllers/Manipulation/JointsManipulationRequests.h>
 
 namespace ROS2Controllers
@@ -82,8 +81,7 @@ namespace ROS2Controllers
         m_jointNames.clear();
         AZStd::function<void(const AZ::Entity* entity)> getAllJointsHierarchy = [&](const AZ::Entity* entity)
         {
-            auto* frameEditorComponent =
-                azrtti_cast<ROS2::ROS2FrameEditorComponent*>(ROS2::Utils::GetGameOrEditorComponent<ROS2::ROS2FrameEditorComponent>(entity));
+            auto* frameEditorComponent = entity->FindComponent<ROS2::ROS2FrameEditorComponent>();
             AZ_Assert(frameEditorComponent, "ROS2FrameEditorComponent does not exist!");
 
             const bool hasNonFixedJoints = JointUtils::HasNonFixedJoints(entity);

+ 1 - 2
Gems/ROS2Controllers/Code/Source/VehicleDynamics/DriveModels/SkidSteeringDriveModel.cpp

@@ -14,7 +14,6 @@
 #include <AzFramework/Physics/RigidBodyBus.h>
 #include <HingeJointComponent.h>
 #include <PhysX/Joint/PhysXJointRequestsBus.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <VehicleDynamics/Utilities.h>
 
 namespace ROS2Controllers::VehicleDynamics
@@ -97,8 +96,8 @@ namespace ROS2Controllers::VehicleDynamics
         AZ::Entity* wheelEntityPtr = nullptr;
         AZ::ComponentApplicationBus::BroadcastResult(wheelEntityPtr, &AZ::ComponentApplicationRequests::FindEntity, wheelEntityId);
         AZ_Assert(wheelEntityPtr, "The wheelEntity should not be null here");
-        out.wheelControllerComponentPtr = ROS2::Utils::GetGameOrEditorComponent<WheelControllerComponent>(wheelEntityPtr);
         out.wheelData = VehicleDynamics::Utilities::GetWheelData(wheelEntityId, axle.m_wheelRadius);
+        out.wheelControllerComponentPtr = wheelEntityPtr->FindComponent<WheelControllerComponent>();
         if (out.wheelControllerComponentPtr)
         {
             const auto wheelsCount = axle.m_axleWheels.size();

+ 0 - 1
Gems/ROS2RobotImporter/Code/Source/RobotImporter/Pages/CheckAssetPage.h

@@ -48,7 +48,6 @@ namespace ROS2RobotImporter
         bool m_success;
         QTableWidget* m_table{};
         QTableWidgetItem* createCell(bool isOk, const QString& text);
-        QLabel* m_numberOfAssetLabel{};
         unsigned int m_missingCount{ 0 };
         unsigned int m_failedCount{ 0 };
         void SetTitle();

+ 0 - 1
Gems/ROS2RobotImporter/Code/Source/RobotImporter/Pages/FileSelectionPage.h

@@ -51,7 +51,6 @@ namespace ROS2RobotImporter
         QFileDialog* m_fileDialog;
         QPushButton* m_button;
         QLineEdit* m_textEdit;
-        QCheckBox* m_copyFiles;
 
         AZStd::unique_ptr<SdfAssetBuilderSettings> m_sdfAssetBuilderSettings;
         AzToolsFramework::ReflectedPropertyEditor* m_sdfAssetBuilderSettingsEditor{};

+ 1 - 2
Gems/ROS2RobotImporter/Code/Source/RobotImporter/Pages/PrefabMakerPage.cpp

@@ -23,10 +23,9 @@
 
 namespace ROS2RobotImporter
 {
-    PrefabMakerPage::PrefabMakerPage(RobotImporterWidget* parent)
+    PrefabMakerPage::PrefabMakerPage([[maybe_unused]] RobotImporterWidget* parent)
         : QWizardPage(parent)
         , m_success(false)
-        , m_parentImporterWidget(parent)
     {
         AZ::EBusAggregateResults<AZStd::unordered_map<AZStd::string, ROS2::SpawnPointInfo>> allActiveSpawnPoints;
         ROS2::SpawnerRequestsBus::BroadcastResult(allActiveSpawnPoints, &ROS2::SpawnerRequestsBus::Events::GetAllSpawnPointInfos);

+ 0 - 1
Gems/ROS2RobotImporter/Code/Source/RobotImporter/Pages/PrefabMakerPage.h

@@ -51,6 +51,5 @@ namespace ROS2RobotImporter
         QTextEdit* m_log;
         QComboBox* m_spawnPointsComboBox;
         ROS2::SpawnPointInfoMap m_spawnPointsInfos;
-        RobotImporterWidget* m_parentImporterWidget;
     };
 } // namespace ROS2RobotImporter

+ 0 - 1
Gems/ROS2RobotImporter/Code/Source/RobotImporter/SDFormat/ROS2SDFormatHooksUtils.cpp

@@ -9,7 +9,6 @@
 #include "ROS2SDFormatHooksUtils.h"
 #include <AzToolsFramework/ToolsComponents/TransformComponent.h>
 #include <ROS2/Communication/TopicConfiguration.h>
-#include <ROS2/Frame/ROS2FrameEditorComponent.h>
 #include <ROS2/Utilities/ROS2Names.h>
 #include <RobotImporter/Utils/RobotImporterUtils.h>
 #include <RobotImporter/Utils/TypeConversions.h>

+ 5 - 9
Gems/ROS2RobotImporter/Code/Source/RobotImporter/URDF/URDFPrefabMaker.cpp

@@ -24,7 +24,6 @@
 #include <AzToolsFramework/ToolsComponents/GenericComponentWrapper.h>
 #include <AzToolsFramework/ToolsComponents/TransformComponent.h>
 #include <ROS2/Frame/ROS2FrameEditorComponent.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <RobotImporter/Utils/ErrorUtils.h>
 #include <RobotImporter/Utils/RobotImporterUtils.h>
 #include <RobotImporter/Utils/TypeConversions.h>
@@ -41,7 +40,7 @@ namespace ROS2RobotImporter
         : m_root(root)
         , m_visualsMaker(urdfAssetsMapping)
         , m_collidersMaker(urdfAssetsMapping)
-        , m_prefabPath(std::move(prefabPath))
+        , m_prefabPath(AZStd::move(prefabPath))
         , m_urdfAssetsMapping(urdfAssetsMapping)
         , m_spawnPosition(spawnPosition)
         , m_useArticulations(useArticulations)
@@ -649,13 +648,10 @@ namespace ROS2RobotImporter
 
         createdEntities.emplace_back(entityId);
 
-        const auto frameComponentId = ROS2::Utils::CreateComponent(entityId, ROS2::ROS2FrameEditorComponent::TYPEINFO_Uuid());
-        if (frameComponentId)
-        {
-            auto* component = entity->FindComponent<ROS2::ROS2FrameEditorComponent>();
-            AZ_Assert(component, "ROS2 Frame Component does not exist for %s", entityId.ToString().c_str());
-            component->SetFrameID(AZStd::string(link.Name().c_str(), link.Name().size()));
-        }
+        [[maybe_unused]] const auto frameComponentId =
+            entity->CreateComponent<ROS2::ROS2FrameEditorComponent>(AZStd::string(link.Name().c_str()));
+        AZ_Assert(frameComponentId, "ROS2 Frame Component does not exist for %s", entityId.ToString().c_str());
+
         auto createdVisualEntities = m_visualsMaker.AddVisuals(&link, entityId);
         createdEntities.insert(createdEntities.end(), createdVisualEntities.begin(), createdVisualEntities.end());
 

+ 0 - 1
Gems/ROS2Sensors/Code/Source/Camera/CameraSensor.h

@@ -11,7 +11,6 @@
 #include <Atom/Feature/Utils/FrameCaptureBus.h>
 #include <AzCore/std/containers/span.h>
 #include <AzFramework/Components/CameraBus.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <rclcpp/publisher.hpp>
 #include <sensor_msgs/msg/camera_info.hpp>
 #include <sensor_msgs/msg/image.hpp>

+ 0 - 1
Gems/ROS2Sensors/Code/Source/Camera/ROS2CameraSensorEditorComponent.cpp

@@ -10,7 +10,6 @@
 #include "CameraUtilities.h"
 #include "ROS2CameraSensorComponent.h"
 #include <AzCore/Component/TransformBus.h>
-#include <ROS2/Frame/ROS2FrameComponent.h>
 
 namespace ROS2Sensors
 {

+ 0 - 1
Gems/ROS2Sensors/Code/Source/Camera/ROS2CameraSensorEditorComponent.h

@@ -12,7 +12,6 @@
 #include <AzToolsFramework/API/ComponentEntitySelectionBus.h>
 #include <AzToolsFramework/ToolsComponents/EditorComponentBase.h>
 
-#include <ROS2/Frame/NamespaceConfiguration.h>
 #include <ROS2/Frame/ROS2Transform.h>
 #include <ROS2/Sensor/SensorConfiguration.h>
 #include <ROS2Sensors/Camera/CameraConfigurationRequestBus.h>

+ 0 - 2
Gems/ROS2Sensors/Code/Source/ContactSensor/ROS2ContactSensorComponent.cpp

@@ -10,8 +10,6 @@
 #include <AzFramework/Physics/Collision/CollisionEvents.h>
 #include <AzFramework/Physics/Common/PhysicsSimulatedBody.h>
 #include <AzFramework/Physics/PhysicsSystem.h>
-#include <ROS2/Frame/ROS2FrameComponent.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <ROS2/Utilities/ROS2Conversions.h>
 #include <ROS2/Utilities/ROS2Names.h>
 #include <geometry_msgs/msg/wrench.hpp>

+ 0 - 2
Gems/ROS2Sensors/Code/Source/GNSS/ROS2GNSSSensorComponent.cpp

@@ -8,8 +8,6 @@
 
 #include "ROS2GNSSSensorComponent.h"
 #include <AzCore/Math/Matrix4x4.h>
-#include <ROS2/Frame/ROS2FrameComponent.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <ROS2/Utilities/ROS2Names.h>
 
 #include <Georeferencing/GeoreferenceBus.h>

+ 0 - 1
Gems/ROS2Sensors/Code/Source/Imu/ROS2ImuSensorComponent.cpp

@@ -7,7 +7,6 @@
  */
 
 #include "ROS2ImuSensorComponent.h"
-#include <ROS2/Frame/ROS2FrameComponent.h>
 #include <ROS2/ROS2Bus.h>
 #include <ROS2/Utilities/ROS2Conversions.h>
 #include <ROS2/Utilities/ROS2Names.h>

+ 1 - 2
Gems/ROS2Sensors/Code/Source/Lidar/LidarCore.cpp

@@ -8,12 +8,11 @@
 
 #include <Atom/RPI.Public/AuxGeom/AuxGeomFeatureProcessorInterface.h>
 #include <Atom/RPI.Public/Scene.h>
+#include <AzFramework/Components/TransformComponent.h>
 #include <AzFramework/Physics/PhysicsSystem.h>
 #include <Lidar/LidarCore.h>
 #include <Lidar/LidarRegistrarSystemComponent.h>
-#include <ROS2/Frame/ROS2FrameComponent.h>
 #include <ROS2/ROS2Bus.h>
-#include <ROS2/Utilities/ROS2Names.h>
 #include <ROS2Sensors/Lidar/ClassSegmentationBus.h>
 
 namespace ROS2Sensors

+ 1 - 3
Templates/Ros2ProjectTemplate/Template/Gem/Source/${Name}SampleComponent.cpp

@@ -19,9 +19,7 @@
 #include <imgui/imgui.h>
 
 #include <ROS2/ROS2Bus.h>
-#include <ROS2/ROS2GemUtilities.h>
 #include <ROS2/Utilities/ROS2Conversions.h>
-#include <ROS2/Utilities/ROS2Names.h>
 
 namespace ${SanitizedCppName}
 {
@@ -92,4 +90,4 @@ namespace ${SanitizedCppName}
         }
         ImGui::End();
     }
-} // namespace ${SanitizedCppName}
+} // namespace ${SanitizedCppName}

+ 0 - 1
Templates/Ros2ProjectTemplate/Template/Gem/Source/${Name}SampleComponent.h

@@ -16,7 +16,6 @@
 #include <ImGuiBus.h>
 
 #include <ROS2/ROS2Bus.h>
-#include <ROS2/Utilities/ROS2Names.h>
 #include <ROS2/Communication/TopicConfiguration.h>
 
 #include <rclcpp/publisher.hpp>