Parcourir la source

[RFC 96] Re-enable `ROS2WheelOdometrySensorComponent` within `ROS2Controllers` Gem (#917)

* Move ROS2SensorComponentBase to ROS2 Gem
* Move ROS2WheelOdometrySensor to ROS2Controllers Gem
* Re-enable ROS2WheelOdometrySensorComponent

Signed-off-by: Jan Hanca <[email protected]>
Jan Hanca il y a 1 mois
Parent
commit
a8d6129f3f
52 fichiers modifiés avec 282 ajouts et 227 suppressions
  1. 4 1
      Gems/ROS2/Code/Include/ROS2/ROS2TypeIds.h
  2. 5 5
      Gems/ROS2/Code/Include/ROS2/Sensor/ROS2SensorComponentBase.h
  3. 79 0
      Gems/ROS2/Code/Include/ROS2/Sensor/SensorConfiguration.h
  4. 5 3
      Gems/ROS2/Code/Include/ROS2/Sensor/SensorConfigurationRequestBus.h
  5. 2 0
      Gems/ROS2/Code/Source/Clients/ROS2SystemComponent.cpp
  6. 6 2
      Gems/ROS2/Code/Source/ROS2ModuleInterface.cpp
  7. 3 0
      Gems/ROS2/Code/ros2_api_files.cmake
  8. 2 2
      Gems/ROS2/gem.json
  9. 3 0
      Gems/ROS2Controllers/Code/CMakeLists.txt
  10. 6 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/ROS2ControllersTypeIds.h
  11. 3 3
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Sensors/ROS2OdometryCovariance.h
  12. 4 4
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Sensors/WheelOdometryConfigurationRequestBus.h
  13. 4 4
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Sensors/WheelOdometrySensorConfiguration.h
  14. 1 1
      Gems/ROS2Controllers/Code/Platform/Linux/PAL_linux.cmake
  15. 2 0
      Gems/ROS2Controllers/Code/Source/ROS2ControllersModuleInterface.cpp
  16. 3 3
      Gems/ROS2Controllers/Code/Source/Sensors/ROS2OdometryCovariance.cpp
  17. 6 6
      Gems/ROS2Controllers/Code/Source/Sensors/ROS2WheelOdometrySensorComponent.cpp
  18. 10 7
      Gems/ROS2Controllers/Code/Source/Sensors/ROS2WheelOdometrySensorComponent.h
  19. 4 4
      Gems/ROS2Controllers/Code/Source/Sensors/WheelOdometrySensorConfiguration.cpp
  20. 46 3
      Gems/ROS2Controllers/Code/Tests/Tools/ROS2ControllersEditorTest.cpp
  21. 6 6
      Gems/ROS2Controllers/Code/Tests/WheelOdometrySensorConfigurationSerializationTest.cpp
  22. 3 0
      Gems/ROS2Controllers/Code/ros2controllers_api_files.cmake
  23. 1 0
      Gems/ROS2Controllers/Code/ros2controllers_editor_tests_files.cmake
  24. 4 0
      Gems/ROS2Controllers/Code/ros2controllers_private_files.cmake
  25. 0 3
      Gems/ROS2Sensors/Code/CMakeLists.txt
  26. 1 10
      Gems/ROS2Sensors/Code/Include/ROS2Sensors/ROS2SensorsTypeIds.h
  27. 0 43
      Gems/ROS2Sensors/Code/Include/ROS2Sensors/Sensor/SensorConfiguration.h
  28. 1 1
      Gems/ROS2Sensors/Code/Platform/Linux/PAL_linux.cmake
  29. 8 8
      Gems/ROS2Sensors/Code/Source/Camera/CameraPublishers.cpp
  30. 1 1
      Gems/ROS2Sensors/Code/Source/Camera/CameraSensorDescription.cpp
  31. 3 3
      Gems/ROS2Sensors/Code/Source/Camera/CameraSensorDescription.h
  32. 1 1
      Gems/ROS2Sensors/Code/Source/Camera/ROS2CameraSensorComponent.cpp
  33. 7 4
      Gems/ROS2Sensors/Code/Source/Camera/ROS2CameraSensorComponent.h
  34. 1 1
      Gems/ROS2Sensors/Code/Source/Camera/ROS2CameraSensorEditorComponent.cpp
  35. 3 3
      Gems/ROS2Sensors/Code/Source/Camera/ROS2CameraSensorEditorComponent.h
  36. 0 2
      Gems/ROS2Sensors/Code/Source/Clients/ROS2SensorsSystemComponent.cpp
  37. 5 3
      Gems/ROS2Sensors/Code/Source/ContactSensor/ROS2ContactSensorComponent.h
  38. 1 1
      Gems/ROS2Sensors/Code/Source/GNSS/ROS2GNSSSensorComponent.cpp
  39. 6 4
      Gems/ROS2Sensors/Code/Source/GNSS/ROS2GNSSSensorComponent.h
  40. 1 1
      Gems/ROS2Sensors/Code/Source/Imu/ROS2ImuSensorComponent.cpp
  41. 6 4
      Gems/ROS2Sensors/Code/Source/Imu/ROS2ImuSensorComponent.h
  42. 1 1
      Gems/ROS2Sensors/Code/Source/Lidar/ROS2Lidar2DSensorComponent.cpp
  43. 7 4
      Gems/ROS2Sensors/Code/Source/Lidar/ROS2Lidar2DSensorComponent.h
  44. 1 1
      Gems/ROS2Sensors/Code/Source/Lidar/ROS2LidarSensorComponent.cpp
  45. 6 4
      Gems/ROS2Sensors/Code/Source/Lidar/ROS2LidarSensorComponent.h
  46. 6 3
      Gems/ROS2Sensors/Code/Source/Odometry/ROS2OdometrySensorComponent.h
  47. 0 8
      Gems/ROS2Sensors/Code/Source/ROS2SensorsModuleInterface.cpp
  48. 1 1
      Gems/ROS2Sensors/Code/Source/Sensor/SensorConfiguration.cpp
  49. 3 46
      Gems/ROS2Sensors/Code/Tests/Tools/ROS2SensorsEditorTest.cpp
  50. 0 6
      Gems/ROS2Sensors/Code/ros2sensors_api_files.cmake
  51. 0 1
      Gems/ROS2Sensors/Code/ros2sensors_editor_tests_files.cmake
  52. 0 5
      Gems/ROS2Sensors/Code/ros2sensors_private_files.cmake

+ 4 - 1
Gems/ROS2/Code/Include/ROS2/ROS2TypeIds.h

@@ -34,7 +34,10 @@ namespace ROS2
     inline constexpr const char* ROS2FrameConfigurationTypeId = "{04882F01-5451-4EFA-B4F8-CD57E4B6CADF}";
     inline constexpr const char* ROS2FrameEditorComponentTypeId = "{F76D6F29-73C3-40B2-BCC2-47FC824C25DF}";
 
-    // Sensors Events TypeIds
+    // Sensors Interface TypeIds
+    inline constexpr const char* SensorConfigurationTypeId = "{4755363D-0B5A-42D7-BBEF-152D87BA10D7}";
+    inline constexpr const char* SensorConfigurationRequestTypeId = "{01904EAB-FA33-7487-B634-E3F8361EB5FB}";
+    inline constexpr const char* ROS2SensorComponentBaseTypeId = "{2DF9A652-DF5D-43B1-932F-B6A838E36E97}";
     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}";

+ 5 - 5
Gems/ROS2Sensors/Code/Include/ROS2Sensors/Sensor/ROS2SensorComponentBase.h → Gems/ROS2/Code/Include/ROS2/Sensor/ROS2SensorComponentBase.h

@@ -12,12 +12,12 @@
 #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 <ROS2Sensors/ROS2SensorsTypeIds.h>
-#include <ROS2Sensors/Sensor/SensorConfiguration.h>
-#include <ROS2Sensors/Sensor/SensorConfigurationRequestBus.h>
+#include <ROS2/Sensor/SensorConfiguration.h>
+#include <ROS2/Sensor/SensorConfigurationRequestBus.h>
 
-namespace ROS2Sensors
+namespace ROS2
 {
     //! Base sensor component class for all specific sensor implementations. Developer working on the new sensor should derive from this
     //! class, defining necessary event source type (EventSourceT template parameter). Available sources are e.g. TickBasedSource or
@@ -176,4 +176,4 @@ namespace ROS2Sensors
     };
 
     AZ_COMPONENT_IMPL_INLINE((ROS2SensorComponentBase, AZ_CLASS), "ROS2SensorComponentBase", ROS2SensorComponentBaseTypeId, AZ::Component)
-} // namespace ROS2Sensors
+} // namespace ROS2

+ 79 - 0
Gems/ROS2/Code/Include/ROS2/Sensor/SensorConfiguration.h

@@ -0,0 +1,79 @@
+/*
+ * 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/RTTI/RTTI.h>
+#include <AzCore/Serialization/EditContext.h>
+#include <AzCore/Serialization/SerializeContext.h>
+#include <AzCore/std/containers/map.h>
+#include <AzCore/std/string/string.h>
+#include <ROS2/Communication/TopicConfiguration.h>
+#include <ROS2/ROS2TypeIds.h>
+
+namespace ROS2
+{
+    //! General configuration for sensors.
+    //! All sensors can be set to a certain frequency, have their data published or not,
+    //! and visualized or not.
+    struct SensorConfiguration
+    {
+    public:
+        AZ_TYPE_INFO(SensorConfiguration, SensorConfigurationTypeId);
+        static void Reflect(AZ::ReflectContext* context)
+        {
+            if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
+            {
+                serializeContext->RegisterGenericType<AZStd::shared_ptr<ROS2::TopicConfiguration>>();
+                serializeContext->RegisterGenericType<AZStd::map<AZStd::string, AZStd::shared_ptr<ROS2::TopicConfiguration>>>();
+                serializeContext->Class<SensorConfiguration>()
+                    ->Version(2)
+                    ->Field("Visualize", &SensorConfiguration::m_visualize)
+                    ->Field("Publishing Enabled", &SensorConfiguration::m_publishingEnabled)
+                    ->Field("Frequency (HZ)", &SensorConfiguration::m_frequency)
+                    ->Field("Publishers", &SensorConfiguration::m_publishersConfigurations);
+
+                if (AZ::EditContext* ec = serializeContext->GetEditContext())
+                {
+                    ec->Class<SensorConfiguration>("ROS2 Sensor Configuration", "Sensor configuration")
+                        ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
+                        ->DataElement(AZ::Edit::UIHandlers::Default, &SensorConfiguration::m_visualize, "Visualize", "Visualize")
+                        ->DataElement(
+                            AZ::Edit::UIHandlers::Default,
+                            &SensorConfiguration::m_publishingEnabled,
+                            "Publishing Enabled",
+                            "Toggle publishing for topic")
+                        ->DataElement(
+                            AZ::Edit::UIHandlers::Default, &SensorConfiguration::m_frequency, "Frequency", "Frequency of publishing [Hz]")
+                        ->Attribute(AZ::Edit::Attributes::Min, SensorConfiguration::m_minFrequency)
+                        ->DataElement(
+                            AZ::Edit::UIHandlers::Default, &SensorConfiguration::m_publishersConfigurations, "Publishers", "Publishers")
+                        ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
+                        ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
+                        ->Attribute(AZ::Edit::Attributes::ContainerCanBeModified, false)
+                        ->ElementAttribute(AZ::Edit::Attributes::AutoExpand, true)
+                        ->ElementAttribute(AZ::Edit::Attributes::NameLabelOverride, "Publisher configuration");
+                }
+            }
+        }
+
+        //! ROS2 Publishers of this sensor.
+        //! Some sensors can have more than one publisher (example: Camera).
+        //! @note This map will typically hold 1-3 elements.
+        AZStd::map<AZStd::string, ROS2::TopicConfiguration> m_publishersConfigurations;
+
+        //! Frequency in Hz (1/s).
+        //! Applies both to data acquisition and publishing.
+        float m_frequency = 10.f;
+
+        bool m_publishingEnabled = true; //!< Determines whether the sensor is publishing (sending data to ROS 2 ecosystem).
+        bool m_visualize = true; //!< Determines whether the sensor is visualized in O3DE (for example, point cloud is drawn for LIDAR).
+    private:
+        // Frequency limit is once per day.
+        static constexpr float m_minFrequency = AZStd::numeric_limits<float>::epsilon();
+    };
+} // namespace ROS2

+ 5 - 3
Gems/ROS2Sensors/Code/Include/ROS2Sensors/Sensor/SensorConfigurationRequestBus.h → Gems/ROS2/Code/Include/ROS2/Sensor/SensorConfigurationRequestBus.h

@@ -10,8 +10,10 @@
 #include <AzCore/Component/ComponentBus.h>
 #include <AzCore/Component/EntityId.h>
 #include <AzCore/EBus/EBus.h>
-#include <ROS2Sensors/Sensor/SensorConfiguration.h>
-namespace ROS2Sensors
+#include <ROS2/ROS2TypeIds.h>
+#include <ROS2/Sensor/SensorConfiguration.h>
+
+namespace ROS2
 {
     //! Interface that allows to get sensor configuration and switch publish state.
     class SensorConfigurationRequest : public AZ::EBusTraits
@@ -43,4 +45,4 @@ namespace ROS2Sensors
     };
 
     using SensorConfigurationRequestBus = AZ::EBus<SensorConfigurationRequest>;
-} // namespace ROS2Sensors
+} // namespace ROS2

+ 2 - 0
Gems/ROS2/Code/Source/Clients/ROS2SystemComponent.cpp

@@ -15,6 +15,7 @@
 #include <ROS2/Communication/QoS.h>
 #include <ROS2/Communication/TopicConfiguration.h>
 #include <ROS2/ROS2TypeIds.h>
+#include <ROS2/Sensor/SensorConfiguration.h>
 #include <ROS2/Utilities/ROS2Conversions.h>
 
 #include <AzCore/Serialization/EditContext.h>
@@ -41,6 +42,7 @@ namespace ROS2
         QoS::Reflect(context);
         TopicConfiguration::Reflect(context);
         PublisherConfiguration::Reflect(context);
+        SensorConfiguration::Reflect(context);
 
         if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
         {

+ 6 - 2
Gems/ROS2/Code/Source/ROS2ModuleInterface.cpp

@@ -9,10 +9,12 @@
 #include "ROS2ModuleInterface.h"
 #include <AzCore/Memory/Memory.h>
 
-#include <ROS2/ROS2TypeIds.h>
-
 #include <Clients/ROS2SystemComponent.h>
 #include <ROS2/Frame/ROS2FrameComponent.h>
+#include <ROS2/ROS2TypeIds.h>
+#include <ROS2/Sensor/Events/PhysicsBasedSource.h>
+#include <ROS2/Sensor/Events/TickBasedSource.h>
+#include <ROS2/Sensor/ROS2SensorComponentBase.h>
 #include <SimulationUtils/FollowingCameraComponent.h>
 #include <Spawner/ROS2SpawnPointComponent.h>
 #include <Spawner/ROS2SpawnerComponent.h>
@@ -33,6 +35,8 @@ namespace ROS2
                 ROS2SpawnerComponent::CreateDescriptor(),
                 ROS2SpawnPointComponent::CreateDescriptor(),
                 FollowingCameraComponent::CreateDescriptor(),
+                ROS2SensorComponentBase<TickBasedSource>::CreateDescriptor(),
+                ROS2SensorComponentBase<PhysicsBasedSource>::CreateDescriptor(),
             });
     }
 

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

@@ -18,6 +18,9 @@ set(FILES
     Include/ROS2/Frame/ROS2FrameComponent.h
     Include/ROS2/Frame/ROS2FrameConfiguration.h
     Include/ROS2/Frame/ROS2Transform.h
+    Include/ROS2/Sensor/SensorConfiguration.h
+    Include/ROS2/Sensor/SensorConfigurationRequestBus.h
+    Include/ROS2/Sensor/ROS2SensorComponentBase.h
     Include/ROS2/Sensor/Events/EventSourceAdapter.h
     Include/ROS2/Sensor/Events/SensorEventSource.h
     Include/ROS2/Sensor/Events/PhysicsBasedSource.h

+ 2 - 2
Gems/ROS2/gem.json

@@ -16,8 +16,8 @@
         "ROS2"
     ],
     "compatible_engines": [
-        "o3de-sdk>=4.2.0",
-        "o3de>=4.2.0"
+        "o3de-sdk>=2.4.0",
+        "o3de>=2.4.0"
     ],
     "engine_api_dependencies": [],
     "platforms": [

+ 3 - 0
Gems/ROS2Controllers/Code/CMakeLists.txt

@@ -245,6 +245,9 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
                 BUILD_DEPENDENCIES
                     PRIVATE
                         AZ::AzTest
+                        AZ::AzTestShared
+                        AZ::AzToolsFramework
+                        AZ::AzManipulatorTestFramework.Static
                         Gem::${gem_name}.Editor.Private.Object
             )
 

+ 6 - 0
Gems/ROS2Controllers/Code/Include/ROS2Controllers/ROS2ControllersTypeIds.h

@@ -25,6 +25,12 @@ namespace ROS2Controllers
     // Interface TypeIds
     inline constexpr const char* ROS2ControllersRequestsTypeId = "{2E0AB230-743E-4BCA-8194-D1BC7C9341EA}";
 
+    // Sensors TypeIds
+    inline constexpr const char* ROS2WheelOdometryComponentTypeId = "{9BDB8C23-AC76-4C25-8D35-37AAA9F43FAC}";
+    inline constexpr const char* ROS2OdometrySensorComponentTypeId = "{61387448-63AA-4563-AF87-60C72B05B863}";
+    inline constexpr const char* ROS2OdometryCovarianceTypeId = "{DB015832-F621-11ED-B67E-0242AC120002}";
+    inline constexpr const char* WheelOdometrySensorConfigurationTypeId = "{9DC58D89-E674-4D7F-9EA9-AFE3AE7FD2EB}";
+
     // Controllers Components TypeIds
     inline constexpr const char* FingerGripperComponentTypeId = "{AE5F8EC2-26EE-11EE-BE56-0242AC120002}";
     inline constexpr const char* GripperActionServerComponentTypeId = "{6A4417AC-1D85-4AB0-A116-1E77D40FC816}";

+ 3 - 3
Gems/ROS2Sensors/Code/Include/ROS2Sensors/Odometry/ROS2OdometryCovariance.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Sensors/ROS2OdometryCovariance.h

@@ -11,10 +11,10 @@
 #include <AzCore/RTTI/RTTI.h>
 #include <AzCore/RTTI/TypeInfoSimple.h>
 #include <AzCore/Serialization/SerializeContext.h>
-#include <ROS2Sensors/ROS2SensorsTypeIds.h>
+#include <ROS2Controllers/ROS2ControllersTypeIds.h>
 #include <array>
 
-namespace ROS2Sensors
+namespace ROS2Controllers
 {
     struct ROS2OdometryCovariance
     {
@@ -27,4 +27,4 @@ namespace ROS2Sensors
         AZ::Vector3 m_linearCovariance = AZ::Vector3::CreateZero();
         AZ::Vector3 m_angularCovariance = AZ::Vector3::CreateZero();
     };
-} // namespace ROS2Sensors
+} // namespace ROS2Controllers

+ 4 - 4
Gems/ROS2Sensors/Code/Include/ROS2Sensors/Odometry/WheelOdometryConfigurationRequestBus.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Sensors/WheelOdometryConfigurationRequestBus.h

@@ -10,10 +10,10 @@
 #include <AzCore/EBus/EBus.h>
 #include <AzCore/Math/Vector3.h>
 #include <AzCore/RTTI/RTTI.h>
-#include <ROS2Sensors/Odometry/ROS2OdometryCovariance.h>
-#include <ROS2Sensors/Odometry/WheelOdometrySensorConfiguration.h>
+#include <ROS2Controllers/Sensors/ROS2OdometryCovariance.h>
+#include <ROS2Controllers/Sensors/WheelOdometrySensorConfiguration.h>
 
-namespace ROS2Sensors
+namespace ROS2Controllers
 {
     //! Interface that allows to get and set WheelOdometry sensor's configuration.
     class WheelOdometryConfigurationRequest : public AZ::EBusTraits
@@ -45,4 +45,4 @@ namespace ROS2Sensors
     };
 
     using WheelOdometryConfigurationRequestBus = AZ::EBus<WheelOdometryConfigurationRequest>;
-} // namespace ROS2Sensors
+} // namespace ROS2Controllers

+ 4 - 4
Gems/ROS2Sensors/Code/Include/ROS2Sensors/Odometry/WheelOdometrySensorConfiguration.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Sensors/WheelOdometrySensorConfiguration.h

@@ -10,10 +10,10 @@
 
 #include <AzCore/RTTI/RTTI.h>
 #include <AzCore/Serialization/SerializeContext.h>
-#include <ROS2Sensors/Odometry/ROS2OdometryCovariance.h>
-#include <ROS2Sensors/ROS2SensorsTypeIds.h>
+#include <ROS2Controllers/ROS2ControllersTypeIds.h>
+#include <ROS2Controllers/Sensors/ROS2OdometryCovariance.h>
 
-namespace ROS2Sensors
+namespace ROS2Controllers
 {
 
     //! A structure capturing configuration of a wheel odometry sensor.
@@ -29,4 +29,4 @@ namespace ROS2Sensors
         ROS2OdometryCovariance m_poseCovariance;
         ROS2OdometryCovariance m_twistCovariance;
     };
-} // namespace ROS2Sensors
+} // namespace ROS2Controllers

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

@@ -8,4 +8,4 @@
 
 set(PAL_TRAIT_ROS2CONTROLLERS_SUPPORTED TRUE)
 set(PAL_TRAIT_ROS2CONTROLLERS_TEST_SUPPORTED TRUE)
-set(PAL_TRAIT_ROS2CONTROLLERS_EDITOR_TEST_SUPPORTED FALSE)
+set(PAL_TRAIT_ROS2CONTROLLERS_EDITOR_TEST_SUPPORTED TRUE)

+ 2 - 0
Gems/ROS2Controllers/Code/Source/ROS2ControllersModuleInterface.cpp

@@ -29,6 +29,7 @@
 #include <RobotControl/Controllers/RigidBodyController/RigidBodyTwistControlComponent.h>
 #include <RobotControl/Controllers/SkidSteeringController/SkidSteeringControlComponent.h>
 #include <RobotControl/ROS2RobotControlComponent.h>
+#include <Sensors/ROS2WheelOdometrySensorComponent.h>
 #include <VehicleDynamics/ModelComponents/AckermannModelComponent.h>
 #include <VehicleDynamics/ModelComponents/SkidSteeringModelComponent.h>
 #include <VehicleDynamics/WheelControllerComponent.h>
@@ -59,6 +60,7 @@ namespace ROS2Controllers
                 RigidBodyTwistControlComponent::CreateDescriptor(),
                 SkidSteeringControlComponent::CreateDescriptor(),
                 ROS2RobotControlComponent::CreateDescriptor(),
+                ROS2WheelOdometryComponent::CreateDescriptor(),
                 VehicleDynamics::AckermannVehicleModelComponent::CreateDescriptor(),
                 VehicleDynamics::SkidSteeringModelComponent::CreateDescriptor(),
                 VehicleDynamics::WheelControllerComponent::CreateDescriptor(),

+ 3 - 3
Gems/ROS2Sensors/Code/Source/Odometry/ROS2OdometryCovariance.cpp → Gems/ROS2Controllers/Code/Source/Sensors/ROS2OdometryCovariance.cpp

@@ -10,9 +10,9 @@
 #include <AzCore/Serialization/EditContext.h>
 #include <AzCore/Serialization/EditContextConstants.inl>
 #include <AzCore/base.h>
-#include <ROS2Sensors/Odometry/ROS2OdometryCovariance.h>
+#include <ROS2Controllers/Sensors/ROS2OdometryCovariance.h>
 
-namespace ROS2Sensors
+namespace ROS2Controllers
 {
     void ROS2OdometryCovariance::Reflect(AZ::ReflectContext* context)
     {
@@ -57,4 +57,4 @@ namespace ROS2Sensors
         // clang-format on
     }
 
-} // namespace ROS2Sensors
+} // namespace ROS2Controllers

+ 6 - 6
Gems/ROS2Sensors/Code/Source/Odometry/ROS2WheelOdometrySensorComponent.cpp → Gems/ROS2Controllers/Code/Source/Sensors/ROS2WheelOdometrySensorComponent.cpp

@@ -12,9 +12,10 @@
 #include <AzCore/Serialization/Json/RegistrationContext.h>
 #include <ROS2/Utilities/ROS2Conversions.h>
 #include <ROS2/Utilities/ROS2Names.h>
-#include <ROS2Sensors/Odometry/ROS2OdometryCovariance.h>
+#include <ROS2Controllers/Sensors/ROS2OdometryCovariance.h>
+#include <ROS2Controllers/VehicleDynamics/VehicleInputControlBus.h>
 
-namespace ROS2Sensors
+namespace ROS2Controllers
 {
     namespace
     {
@@ -157,9 +158,8 @@ namespace ROS2Sensors
     {
         AZStd::pair<AZ::Vector3, AZ::Vector3> vt;
 
-        // Temporarily disabled until the ROS2Controllers gem is available
-        // VehicleDynamics::VehicleInputControlRequestBus::EventResult(
-        //     vt, GetEntityId(), &VehicleDynamics::VehicleInputControlRequests::GetWheelsOdometry);
+        VehicleDynamics::VehicleInputControlRequestBus::EventResult(
+            vt, GetEntityId(), &VehicleDynamics::VehicleInputControlRequests::GetWheelsOdometry);
 
         m_odometryMsg.header.stamp = ROS2::ROS2Interface::Get()->GetROSTimestamp();
         m_odometryMsg.twist.twist.linear = ROS2::ROS2Conversions::ToROS2Vector3(vt.first);
@@ -248,4 +248,4 @@ namespace ROS2Sensors
         m_odometryConfiguration.m_twistCovariance = covariance;
     }
 
-} // namespace ROS2Sensors
+} // namespace ROS2Controllers

+ 10 - 7
Gems/ROS2Sensors/Code/Source/Odometry/ROS2WheelOdometrySensorComponent.h → Gems/ROS2Controllers/Code/Source/Sensors/ROS2WheelOdometrySensorComponent.h

@@ -9,13 +9,14 @@
 
 #include <AzCore/Math/Transform.h>
 #include <ROS2/Sensor/Events/PhysicsBasedSource.h>
-#include <ROS2Sensors/Odometry/ROS2OdometryCovariance.h>
-#include <ROS2Sensors/Odometry/WheelOdometryConfigurationRequestBus.h>
-#include <ROS2Sensors/Sensor/ROS2SensorComponentBase.h>
+#include <ROS2/Sensor/ROS2SensorComponentBase.h>
+#include <ROS2Controllers/ROS2ControllersTypeIds.h>
+#include <ROS2Controllers/Sensors/ROS2OdometryCovariance.h>
+#include <ROS2Controllers/Sensors/WheelOdometryConfigurationRequestBus.h>
 #include <nav_msgs/msg/odometry.hpp>
 #include <rclcpp/publisher.hpp>
 
-namespace ROS2Sensors
+namespace ROS2Controllers
 {
     class JsonROS2WheelOdometryComponentConfigSerializer : public AZ::BaseJsonSerializer
     {
@@ -35,13 +36,15 @@ namespace ROS2Sensors
     //! This is a physical sensor that takes a vehicle's configuration and computes updates from the wheels' rotations.
     //! @see <a href="https://index.ros.org/p/nav_msgs/">nav_msgs package</a>.
     class ROS2WheelOdometryComponent
-        : public ROS2SensorComponentBase<ROS2::PhysicsBasedSource>
+        : public ROS2::ROS2SensorComponentBase<ROS2::PhysicsBasedSource>
         , protected WheelOdometryConfigurationRequestBus::Handler
     {
         friend class JsonROS2WheelOdometryComponentConfigSerializer;
 
     public:
-        AZ_COMPONENT(ROS2WheelOdometryComponent, ROS2Sensors::ROS2WheelOdometryComponentTypeId, SensorBaseType);
+        using SensorBaseType = ROS2::ROS2SensorComponentBase<ROS2::PhysicsBasedSource>;
+
+        AZ_COMPONENT(ROS2WheelOdometryComponent, ROS2WheelOdometryComponentTypeId, SensorBaseType);
         ROS2WheelOdometryComponent();
         ~ROS2WheelOdometryComponent() = default;
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
@@ -73,4 +76,4 @@ namespace ROS2Sensors
         void OnOdometryEvent();
         void OnPhysicsEvent(float physicsDeltaTime);
     };
-} // namespace ROS2Sensors
+} // namespace ROS2Controllers

+ 4 - 4
Gems/ROS2Sensors/Code/Source/Odometry/WheelOdometrySensorConfiguration.cpp → Gems/ROS2Controllers/Code/Source/Sensors/WheelOdometrySensorConfiguration.cpp

@@ -7,10 +7,10 @@
  */
 
 #include <AzCore/Serialization/EditContext.h>
-#include <ROS2Sensors/Odometry/ROS2OdometryCovariance.h>
-#include <ROS2Sensors/Odometry/WheelOdometrySensorConfiguration.h>
+#include <ROS2Controllers/Sensors/ROS2OdometryCovariance.h>
+#include <ROS2Controllers/Sensors/WheelOdometrySensorConfiguration.h>
 
-namespace ROS2Sensors
+namespace ROS2Controllers
 {
     void WheelOdometrySensorConfiguration::Reflect(AZ::ReflectContext* context)
     {
@@ -40,4 +40,4 @@ namespace ROS2Sensors
             }
         }
     }
-} // namespace ROS2Sensors
+} // namespace ROS2Controllers

+ 46 - 3
Gems/ROS2Controllers/Code/Tests/Tools/ROS2ControllersEditorTest.cpp

@@ -1,12 +1,55 @@
 /*
  * 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.
+ * 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/UserSettings/UserSettingsComponent.h>
 #include <AzTest/AzTest.h>
+#include <AzTest/GemTestEnvironment.h>
+#include <AzToolsFramework/UnitTest/ToolsTestApplication.h>
 
-AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);
+namespace UnitTest
+{
+    class ROS2ControllersTestEnvironment : public AZ::Test::GemTestEnvironment
+    {
+        // AZ::Test::GemTestEnvironment overrides ...
+        void AddGemsAndComponents() override;
+        AZ::ComponentApplication* CreateApplicationInstance() override;
+        void PostSystemEntityActivate() override;
+
+    public:
+        ROS2ControllersTestEnvironment() = default;
+        ~ROS2ControllersTestEnvironment() override = default;
+    };
+
+    void ROS2ControllersTestEnvironment::AddGemsAndComponents()
+    {
+        AddActiveGems(AZStd::to_array<AZStd::string_view>({ "ROS2", "ROS2Controllers" }));
+        AddDynamicModulePaths({ "ROS2", "ROS2Controllers" });
+    }
+
+    AZ::ComponentApplication* ROS2ControllersTestEnvironment::CreateApplicationInstance()
+    {
+        // Using ToolsTestApplication to have AzFramework and AzToolsFramework components.
+        return aznew UnitTest::ToolsTestApplication("ROS2ControllersTestEnvironment");
+    }
+
+    void ROS2ControllersTestEnvironment::PostSystemEntityActivate()
+    {
+        AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize);
+    }
+} // namespace UnitTest
+
+AZTEST_EXPORT int AZ_UNIT_TEST_HOOK_NAME(int argc, char** argv)
+{
+    ::testing::InitGoogleMock(&argc, argv);
+    AZ::Test::printUnusedParametersWarning(argc, argv);
+    AZ::Test::addTestEnvironments({ new UnitTest::ROS2ControllersTestEnvironment() });
+    int result = RUN_ALL_TESTS();
+    return result;
+}
+
+IMPLEMENT_TEST_EXECUTABLE_MAIN();

+ 6 - 6
Gems/ROS2Sensors/Code/Tests/Odometry/WheelOdometrySensorConfigurationSerializationTest.cpp → Gems/ROS2Controllers/Code/Tests/WheelOdometrySensorConfigurationSerializationTest.cpp

@@ -8,20 +8,20 @@
 
 #include <AzCore/UnitTest/TestTypes.h>
 #include <AzTest/AzTest.h>
-#include <Odometry/ROS2WheelOdometrySensorComponent.h>
+#include <Sensors/ROS2WheelOdometrySensorComponent.h>
 #include <rapidjson/stringbuffer.h>
 #include <rapidjson/writer.h>
 
 namespace UnitTest
 {
-    class ROS2SensorsTestFixture : public ::testing::Test
+    class ROS2ControllersTestFixture : public ::testing::Test
     {
     };
 
     // Store test for the old schema, where there is no configuration class.
-    TEST_F(ROS2SensorsTestFixture, Deserialize_WhenOldSchemaProvided_StoresSuccessfully)
+    TEST_F(ROS2ControllersTestFixture, Deserialize_WhenOldSchemaProvided_StoresSuccessfully)
     {
-        ROS2Sensors::ROS2WheelOdometryComponent wheelOdometryComponent;
+        ROS2Controllers::ROS2WheelOdometryComponent wheelOdometryComponent;
 
         rapidjson::Document jsonDocument(rapidjson::kObjectType);
         jsonDocument.Parse(R"({
@@ -77,9 +77,9 @@ namespace UnitTest
     }
 
     // Store test for the new schema, where there is a configuration class.
-    TEST_F(ROS2SensorsTestFixture, Deserialize_WhenNewSchemaProvided_StoresSuccessfully)
+    TEST_F(ROS2ControllersTestFixture, Deserialize_WhenNewSchemaProvided_StoresSuccessfully)
     {
-        ROS2Sensors::ROS2WheelOdometryComponent wheelOdometryComponent;
+        ROS2Controllers::ROS2WheelOdometryComponent wheelOdometryComponent;
 
         rapidjson::Document jsonDocument(rapidjson::kObjectType);
         jsonDocument.Parse(R"({

+ 3 - 0
Gems/ROS2Controllers/Code/ros2controllers_api_files.cmake

@@ -21,5 +21,8 @@ set(FILES
     Include/ROS2Controllers/Manipulation/MotorizedJoints/PidMotorControllerComponent.h
     Include/ROS2Controllers/RobotControl/ControlConfiguration.h
     Include/ROS2Controllers/RobotControl/ControlSubscriptionHandler.h
+    Include/ROS2Controllers/Sensors/ROS2OdometryCovariance.h
+    Include/ROS2Controllers/Sensors/WheelOdometrySensorConfiguration.h
+    Include/ROS2Controllers/Sensors/WheelOdometryConfigurationRequestBus.h
     Include/ROS2Controllers/VehicleDynamics/VehicleInputControlBus.h
 )

+ 1 - 0
Gems/ROS2Controllers/Code/ros2controllers_editor_tests_files.cmake

@@ -8,4 +8,5 @@
 
 set(FILES
     Tests/Tools/ROS2ControllersEditorTest.cpp
+    Tests/WheelOdometrySensorConfigurationSerializationTest.cpp
 )

+ 4 - 0
Gems/ROS2Controllers/Code/ros2controllers_private_files.cmake

@@ -54,6 +54,10 @@ set(FILES
     Source/RobotControl/ROS2RobotControlComponent.cpp
     Source/RobotControl/ROS2RobotControlComponent.h
     Source/RobotControl/Twist/TwistSubscriptionHandler.cpp
+    Source/Sensors/ROS2OdometryCovariance.cpp
+    Source/Sensors/ROS2WheelOdometrySensorComponent.cpp
+    Source/Sensors/ROS2WheelOdometrySensorComponent.h
+    Source/Sensors/WheelOdometrySensorConfiguration.cpp
     Source/Utilities/ArticulationsUtilities.cpp
     Source/Utilities/ArticulationsUtilities.h
     Source/Utilities/JointUtilities.cpp

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

@@ -267,9 +267,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
                 BUILD_DEPENDENCIES
                     PRIVATE
                         AZ::AzTest
-                        AZ::AzTestShared
-                        AZ::AzToolsFramework
-                        AZ::AzManipulatorTestFramework.Static
                         Gem::${gem_name}.Editor.Private.Object
             )
 

+ 1 - 10
Gems/ROS2Sensors/Code/Include/ROS2Sensors/ROS2SensorsTypeIds.h

@@ -21,12 +21,6 @@ namespace ROS2Sensors
     // so they use the Same TypeId
     inline constexpr const char* ROS2SensorsEditorModuleTypeId = ROS2SensorsModuleTypeId;
 
-    // ROS2Sensors Interface TypeIds
-    inline constexpr const char* ImuConfigurationRequestTypeId = "{8D426B46-DF12-419A-96FB-4E2834567ECD}";
-    inline constexpr const char* SensorConfigurationTypeId = "{4755363D-0B5A-42D7-BBEF-152D87BA10D7}";
-    inline constexpr const char* SensorConfigurationRequestTypeId = "{01904EAB-FA33-7487-B634-E3F8361EB5FB}";
-    inline constexpr const char* ROS2SensorComponentBaseTypeId = "{2DF9A652-DF5D-43B1-932F-B6A838E36E97}";
-
     // System Sensor Components TypeIds
     inline constexpr const char* ROS2SystemCameraComponentTypeId = "{B4665D39-78FD-40DE-8518-2F6BD345A831}";
     inline constexpr const char* ROS2EditorCameraSystemComponentTypeId = "{407F51C0-92C9-11EE-B9D1-0242AC120002}";
@@ -46,8 +40,6 @@ namespace ROS2Sensors
     inline constexpr const char* LidarSensorConfigurationTypeId = "{E46E75F4-1E0E-48CA-A22F-43AFD8F25101}";
     inline constexpr const char* LidarTemplateTypeId = "{9E9EF583-733D-4450-BBA0-ADD4D1BEFBF2}";
     inline constexpr const char* LidarTemplateNoiseParametersTypeId = "{58C007AD-320F-49DF-BC20-6419159EE176}";
-    inline constexpr const char* ROS2OdometryCovarianceTypeId = "{DB015832-F621-11ED-B67E-0242AC120002}";
-    inline constexpr const char* WheelOdometrySensorConfigurationTypeId = "{9DC58D89-E674-4D7F-9EA9-AFE3AE7FD2EB}";
 
     // Sensor Components TypeIds
     inline constexpr const char* ROS2CameraSensorComponentTypeId = "{3C6B8AE6-9721-4639-B8F9-D8D28FD7A071}";
@@ -56,8 +48,7 @@ namespace ROS2Sensors
     inline constexpr const char* ROS2ImuSensorComponentTypeId = "{502A955E-7742-4E23-AD77-5E4063739DCA}";
     inline constexpr const char* ROS2LidarSensorComponentTypeId = "{502A955F-7742-4E23-AD77-5E4063739DCA}";
     inline constexpr const char* ROS2Lidar2DSensorComponentTypeId = "{F4C2D970-1D69-40F2-9D4D-B52DCFDD2704}";
-    inline constexpr const char* ROS2WheelOdometryComponentTypeId = "{9BDB8C23-AC76-4C25-8D35-37AAA9F43FAC}";
-    inline constexpr const char* ROS2OdometrySensorComponent = "{61387448-63AA-4563-AF87-60C72B05B863}";
+    inline constexpr const char* ROS2OdometrySensorComponentTypeId = "{61387448-63AA-4563-AF87-60C72B05B863}";
 
     // Sensors Components Tools TypeIds
     inline constexpr const char* ClassSegmentationConfigurationComponentTypeId = "{BAB1EA0C-7456-40EA-BC1E-71697137C27C}";

+ 0 - 43
Gems/ROS2Sensors/Code/Include/ROS2Sensors/Sensor/SensorConfiguration.h

@@ -1,43 +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/RTTI/RTTI.h>
-#include <AzCore/Serialization/SerializeContext.h>
-#include <AzCore/std/containers/map.h>
-#include <AzCore/std/string/string.h>
-#include <ROS2/Communication/TopicConfiguration.h>
-#include <ROS2Sensors/ROS2SensorsTypeIds.h>
-
-namespace ROS2Sensors
-{
-    //! General configuration for sensors.
-    //! All sensors can be set to a certain frequency, have their data published or not,
-    //! and visualized or not.
-    struct SensorConfiguration
-    {
-    public:
-        AZ_TYPE_INFO(SensorConfiguration, SensorConfigurationTypeId);
-        static void Reflect(AZ::ReflectContext* context);
-
-        //! ROS2 Publishers of this sensor.
-        //! Some sensors can have more than one publisher (example: Camera).
-        //! @note This map will typically hold 1-3 elements.
-        AZStd::map<AZStd::string, ROS2::TopicConfiguration> m_publishersConfigurations;
-
-        //! Frequency in Hz (1/s).
-        //! Applies both to data acquisition and publishing.
-        float m_frequency = 10.f;
-
-        bool m_publishingEnabled = true; //!< Determines whether the sensor is publishing (sending data to ROS 2 ecosystem).
-        bool m_visualize = true; //!< Determines whether the sensor is visualized in O3DE (for example, point cloud is drawn for LIDAR).
-    private:
-        // Frequency limit is once per day.
-        static constexpr float m_minFrequency = AZStd::numeric_limits<float>::epsilon();
-    };
-} // namespace ROS2Sensors

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

@@ -8,4 +8,4 @@
 
 set(PAL_TRAIT_ROS2SENSORS_SUPPORTED TRUE)
 set(PAL_TRAIT_ROS2SENSORS_TEST_SUPPORTED FALSE)
-set(PAL_TRAIT_ROS2SENSORS_EDITOR_TEST_SUPPORTED TRUE)
+set(PAL_TRAIT_ROS2SENSORS_EDITOR_TEST_SUPPORTED FALSE)

+ 8 - 8
Gems/ROS2Sensors/Code/Source/Camera/CameraPublishers.cpp

@@ -11,8 +11,8 @@
 #include "CameraSensor.h"
 #include <ROS2/Communication/TopicConfiguration.h>
 #include <ROS2/ROS2Bus.h>
+#include <ROS2/Sensor/SensorConfiguration.h>
 #include <ROS2/Utilities/ROS2Names.h>
-#include <ROS2Sensors/Sensor/SensorConfiguration.h>
 
 namespace ROS2Sensors
 {
@@ -20,7 +20,7 @@ namespace ROS2Sensors
     {
         using TopicConfigurations = AZStd::unordered_map<CameraSensorDescription::CameraChannelType, ROS2::TopicConfiguration>;
 
-        ROS2::TopicConfiguration GetTopicConfiguration(const SensorConfiguration& sensorConfiguration, const AZStd::string& key)
+        ROS2::TopicConfiguration GetTopicConfiguration(const ROS2::SensorConfiguration& sensorConfiguration, const AZStd::string& key)
         {
             auto ipos = sensorConfiguration.m_publishersConfigurations.find(key);
             AZ_Assert(ipos != sensorConfiguration.m_publishersConfigurations.end(), "Missing key in topic configuration!");
@@ -28,42 +28,42 @@ namespace ROS2Sensors
         }
 
         template<typename CameraType>
-        TopicConfigurations GetCameraTopicConfiguration([[maybe_unused]] const SensorConfiguration& sensorConfiguration)
+        TopicConfigurations GetCameraTopicConfiguration([[maybe_unused]] const ROS2::SensorConfiguration& sensorConfiguration)
         {
             AZ_Error("GetCameraTopicConfiguration", false, "Invalid camera template type!");
             return TopicConfigurations();
         }
 
         template<typename CameraType>
-        TopicConfigurations GetCameraInfoTopicConfiguration([[maybe_unused]] const SensorConfiguration& sensorConfiguration)
+        TopicConfigurations GetCameraInfoTopicConfiguration([[maybe_unused]] const ROS2::SensorConfiguration& sensorConfiguration)
         {
             AZ_Error("GetCameraInfoTopicConfiguration", false, "Invalid camera template type!");
             return TopicConfigurations();
         }
 
         template<>
-        TopicConfigurations GetCameraTopicConfiguration<CameraColorSensor>(const SensorConfiguration& sensorConfiguration)
+        TopicConfigurations GetCameraTopicConfiguration<CameraColorSensor>(const ROS2::SensorConfiguration& sensorConfiguration)
         {
             return { { CameraSensorDescription::CameraChannelType::RGB,
                        GetTopicConfiguration(sensorConfiguration, CameraConstants::ColorImageConfig) } };
         }
 
         template<>
-        TopicConfigurations GetCameraInfoTopicConfiguration<CameraColorSensor>(const SensorConfiguration& sensorConfiguration)
+        TopicConfigurations GetCameraInfoTopicConfiguration<CameraColorSensor>(const ROS2::SensorConfiguration& sensorConfiguration)
         {
             return { { CameraSensorDescription::CameraChannelType::RGB,
                        GetTopicConfiguration(sensorConfiguration, CameraConstants::ColorInfoConfig) } };
         }
 
         template<>
-        TopicConfigurations GetCameraTopicConfiguration<CameraDepthSensor>(const SensorConfiguration& sensorConfiguration)
+        TopicConfigurations GetCameraTopicConfiguration<CameraDepthSensor>(const ROS2::SensorConfiguration& sensorConfiguration)
         {
             return { { CameraSensorDescription::CameraChannelType::DEPTH,
                        GetTopicConfiguration(sensorConfiguration, CameraConstants::DepthImageConfig) } };
         }
 
         template<>
-        TopicConfigurations GetCameraInfoTopicConfiguration<CameraDepthSensor>(const SensorConfiguration& sensorConfiguration)
+        TopicConfigurations GetCameraInfoTopicConfiguration<CameraDepthSensor>(const ROS2::SensorConfiguration& sensorConfiguration)
         {
             return { { CameraSensorDescription::CameraChannelType::DEPTH,
                        GetTopicConfiguration(sensorConfiguration, CameraConstants::DepthInfoConfig) } };

+ 1 - 1
Gems/ROS2Sensors/Code/Source/Camera/CameraSensorDescription.cpp

@@ -16,7 +16,7 @@ namespace ROS2Sensors
         const AZStd::string& cameraName,
         const AZStd::string& effectiveNamespace,
         const CameraSensorConfiguration& configuration,
-        const SensorConfiguration& sensorConfiguration)
+        const ROS2::SensorConfiguration& sensorConfiguration)
         : m_cameraConfiguration(configuration)
         , m_sensorConfiguration(sensorConfiguration)
         , m_cameraName(cameraName)

+ 3 - 3
Gems/ROS2Sensors/Code/Source/Camera/CameraSensorDescription.h

@@ -7,8 +7,8 @@
  */
 #pragma once
 
+#include <ROS2/Sensor/SensorConfiguration.h>
 #include <ROS2Sensors/Camera/CameraSensorConfiguration.h>
-#include <ROS2Sensors/Sensor/SensorConfiguration.h>
 
 #include <AzCore/Math/Matrix4x4.h>
 #include <AzCore/std/containers/array.h>
@@ -35,10 +35,10 @@ namespace ROS2Sensors
             const AZStd::string& cameraName,
             const AZStd::string& effectiveNamespace,
             const CameraSensorConfiguration& configuration,
-            const SensorConfiguration& sensorConfiguration);
+            const ROS2::SensorConfiguration& sensorConfiguration);
 
         const CameraSensorConfiguration m_cameraConfiguration; //!< Configuration of the camera.
-        const SensorConfiguration m_sensorConfiguration; //!< Generic sensor configuration.
+        const ROS2::SensorConfiguration m_sensorConfiguration; //!< Generic sensor configuration.
         const AZStd::string m_cameraName; //!< Camera name to differentiate cameras in a multi-camera setup.
         const AZStd::string m_cameraNamespace; //!< Effective camera namespace for frames and topics.
 

+ 1 - 1
Gems/ROS2Sensors/Code/Source/Camera/ROS2CameraSensorComponent.cpp

@@ -13,7 +13,7 @@
 namespace ROS2Sensors
 {
     ROS2CameraSensorComponent::ROS2CameraSensorComponent(
-        const SensorConfiguration& sensorConfiguration, const CameraSensorConfiguration& cameraConfiguration)
+        const ROS2::SensorConfiguration& sensorConfiguration, const CameraSensorConfiguration& cameraConfiguration)
         : m_cameraConfiguration(cameraConfiguration)
     {
         m_sensorConfiguration = sensorConfiguration;

+ 7 - 4
Gems/ROS2Sensors/Code/Source/Camera/ROS2CameraSensorComponent.h

@@ -17,10 +17,10 @@
 #include "CameraSensor.h"
 #include <ROS2/ROS2Bus.h>
 #include <ROS2/Sensor/Events/TickBasedSource.h>
+#include <ROS2/Sensor/ROS2SensorComponentBase.h>
 #include <ROS2Sensors/Camera/CameraConfigurationRequestBus.h>
 #include <ROS2Sensors/Camera/CameraSensorConfiguration.h>
 #include <ROS2Sensors/ROS2SensorsTypeIds.h>
-#include <ROS2Sensors/Sensor/ROS2SensorComponentBase.h>
 
 namespace ROS2Sensors
 {
@@ -32,18 +32,21 @@ namespace ROS2Sensors
     //!   - camera vertical field of view in degrees
     //! Camera frustum is facing negative Z axis; image plane is parallel to X,Y plane: X - right, Y - up
     class ROS2CameraSensorComponent
-        : public ROS2SensorComponentBase<ROS2::TickBasedSource>
+        : public ROS2::ROS2SensorComponentBase<ROS2::TickBasedSource>
         , protected CameraConfigurationRequestBus::Handler
     {
     public:
+        using SensorBaseType = ROS2::ROS2SensorComponentBase<ROS2::TickBasedSource>;
+
         ROS2CameraSensorComponent() = default;
-        ROS2CameraSensorComponent(const SensorConfiguration& sensorConfiguration, const CameraSensorConfiguration& cameraConfiguration);
+        ROS2CameraSensorComponent(
+            const ROS2::SensorConfiguration& sensorConfiguration, const CameraSensorConfiguration& cameraConfiguration);
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
         static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
         static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
         ~ROS2CameraSensorComponent() override = default;
 
-        AZ_COMPONENT(ROS2CameraSensorComponent, ROS2Sensors::ROS2CameraSensorComponentTypeId, SensorBaseType);
+        AZ_COMPONENT(ROS2CameraSensorComponent, ROS2CameraSensorComponentTypeId, SensorBaseType);
         static void Reflect(AZ::ReflectContext* context);
 
         // AzToolsFramework::Components::EditorComponentBase overrides ..

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

@@ -29,7 +29,7 @@ namespace ROS2Sensors
     }
 
     ROS2CameraSensorEditorComponent::ROS2CameraSensorEditorComponent(
-        const SensorConfiguration& sensorConfiguration, const CameraSensorConfiguration& cameraConfiguration)
+        const ROS2::SensorConfiguration& sensorConfiguration, const CameraSensorConfiguration& cameraConfiguration)
         : m_sensorConfiguration(sensorConfiguration)
         , m_cameraConfiguration(cameraConfiguration)
     {

+ 3 - 3
Gems/ROS2Sensors/Code/Source/Camera/ROS2CameraSensorEditorComponent.h

@@ -14,9 +14,9 @@
 
 #include <ROS2/Frame/NamespaceConfiguration.h>
 #include <ROS2/Frame/ROS2Transform.h>
+#include <ROS2/Sensor/SensorConfiguration.h>
 #include <ROS2Sensors/Camera/CameraConfigurationRequestBus.h>
 #include <ROS2Sensors/Camera/CameraSensorConfiguration.h>
-#include <ROS2Sensors/Sensor/SensorConfiguration.h>
 
 namespace ROS2Sensors
 {
@@ -31,7 +31,7 @@ namespace ROS2Sensors
     public:
         ROS2CameraSensorEditorComponent();
         ROS2CameraSensorEditorComponent(
-            const SensorConfiguration& sensorConfiguration, const CameraSensorConfiguration& cameraConfiguration);
+            const ROS2::SensorConfiguration& sensorConfiguration, const CameraSensorConfiguration& cameraConfiguration);
         ~ROS2CameraSensorEditorComponent() override = default;
         AZ_EDITOR_COMPONENT(ROS2CameraSensorEditorComponent, "{3C2A86B2-AD58-4BF1-A5EF-71E0F94A2B42}");
         static void Reflect(AZ::ReflectContext* context);
@@ -71,7 +71,7 @@ namespace ROS2Sensors
         AZStd::pair<AZStd::string, ROS2::TopicConfiguration> MakeTopicConfigurationPair(
             const AZStd::string& topic, const AZStd::string& messageType, const AZStd::string& configName) const;
 
-        SensorConfiguration m_sensorConfiguration;
+        ROS2::SensorConfiguration m_sensorConfiguration;
         CameraSensorConfiguration m_cameraConfiguration;
     };
 } // namespace ROS2Sensors

+ 0 - 2
Gems/ROS2Sensors/Code/Source/Clients/ROS2SensorsSystemComponent.cpp

@@ -12,7 +12,6 @@
 #include <ROS2Sensors/ROS2SensorsTypeIds.h>
 
 #include <Lidar/LidarCore.h>
-#include <ROS2Sensors/Sensor/SensorConfiguration.h>
 
 namespace ROS2Sensors
 {
@@ -22,7 +21,6 @@ namespace ROS2Sensors
     {
         // Reflect structs not strictly owned by any single component
         LidarCore::Reflect(context);
-        SensorConfiguration::Reflect(context);
 
         if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
         {

+ 5 - 3
Gems/ROS2Sensors/Code/Source/ContactSensor/ROS2ContactSensorComponent.h

@@ -15,8 +15,8 @@
 #include <AzCore/std/string/string.h>
 #include <AzFramework/Physics/Common/PhysicsSimulatedBodyEvents.h>
 #include <ROS2/Sensor/Events/TickBasedSource.h>
+#include <ROS2/Sensor/ROS2SensorComponentBase.h>
 #include <ROS2Sensors/ROS2SensorsTypeIds.h>
-#include <ROS2Sensors/Sensor/ROS2SensorComponentBase.h>
 #include <gazebo_msgs/msg/contact_state.hpp>
 #include <gazebo_msgs/msg/contacts_state.hpp>
 #include <rclcpp/publisher.hpp>
@@ -27,10 +27,12 @@ namespace ROS2Sensors
     //! It reports the location of the contact associated forces.
     //! This component publishes a contact_sensor topic.
     //! It doesn't measure torque.
-    class ROS2ContactSensorComponent : public ROS2SensorComponentBase<ROS2::TickBasedSource>
+    class ROS2ContactSensorComponent : public ROS2::ROS2SensorComponentBase<ROS2::TickBasedSource>
     {
     public:
-        AZ_COMPONENT(ROS2ContactSensorComponent, ROS2Sensors::ROS2ContactSensorComponentTypeId, SensorBaseType);
+        using SensorBaseType = ROS2::ROS2SensorComponentBase<ROS2::TickBasedSource>;
+
+        AZ_COMPONENT(ROS2ContactSensorComponent, ROS2ContactSensorComponentTypeId, SensorBaseType);
         ROS2ContactSensorComponent();
         ~ROS2ContactSensorComponent() = default;
 

+ 1 - 1
Gems/ROS2Sensors/Code/Source/GNSS/ROS2GNSSSensorComponent.cpp

@@ -50,7 +50,7 @@ namespace ROS2Sensors
         m_sensorConfiguration.m_publishersConfigurations.insert(AZStd::make_pair(GNSSMsgType, pc));
     }
 
-    ROS2GNSSSensorComponent::ROS2GNSSSensorComponent(const SensorConfiguration& sensorConfiguration)
+    ROS2GNSSSensorComponent::ROS2GNSSSensorComponent(const ROS2::SensorConfiguration& sensorConfiguration)
     {
         m_sensorConfiguration = sensorConfiguration;
     }

+ 6 - 4
Gems/ROS2Sensors/Code/Source/GNSS/ROS2GNSSSensorComponent.h

@@ -10,8 +10,8 @@
 #include <AzCore/Math/Transform.h>
 #include <AzCore/Serialization/SerializeContext.h>
 #include <ROS2/Sensor/Events/TickBasedSource.h>
+#include <ROS2/Sensor/ROS2SensorComponentBase.h>
 #include <ROS2Sensors/ROS2SensorsTypeIds.h>
-#include <ROS2Sensors/Sensor/ROS2SensorComponentBase.h>
 #include <rclcpp/publisher.hpp>
 #include <sensor_msgs/msg/nav_sat_fix.hpp>
 
@@ -21,12 +21,14 @@ namespace ROS2Sensors
     //! It provides NavSatFix data of sensor's position in GNSS frame which is defined by GNSS origin offset
     //! Offset is provided as latitude [deg], longitude [deg], altitude [m] of o3de global frame
     //! It is assumed that o3de global frame overlaps with ENU coordinate system
-    class ROS2GNSSSensorComponent : public ROS2SensorComponentBase<ROS2::TickBasedSource>
+    class ROS2GNSSSensorComponent : public ROS2::ROS2SensorComponentBase<ROS2::TickBasedSource>
     {
     public:
-        AZ_COMPONENT(ROS2GNSSSensorComponent, ROS2Sensors::ROS2GNSSSensorComponentTypeId, SensorBaseType);
+        using SensorBaseType = ROS2::ROS2SensorComponentBase<ROS2::TickBasedSource>;
+
+        AZ_COMPONENT(ROS2GNSSSensorComponent, ROS2GNSSSensorComponentTypeId, SensorBaseType);
         ROS2GNSSSensorComponent();
-        ROS2GNSSSensorComponent(const SensorConfiguration& sensorConfiguration);
+        ROS2GNSSSensorComponent(const ROS2::SensorConfiguration& sensorConfiguration);
         ~ROS2GNSSSensorComponent() = default;
         static void Reflect(AZ::ReflectContext* context);
 

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

@@ -67,7 +67,7 @@ namespace ROS2Sensors
     }
 
     ROS2ImuSensorComponent::ROS2ImuSensorComponent(
-        const SensorConfiguration& sensorConfiguration, const ImuSensorConfiguration& imuConfiguration)
+        const ROS2::SensorConfiguration& sensorConfiguration, const ImuSensorConfiguration& imuConfiguration)
         : m_imuConfiguration(imuConfiguration)
     {
         m_sensorConfiguration = sensorConfiguration;

+ 6 - 4
Gems/ROS2Sensors/Code/Source/Imu/ROS2ImuSensorComponent.h

@@ -14,9 +14,9 @@
 #include <AzFramework/Physics/Common/PhysicsEvents.h>
 #include <AzFramework/Physics/PhysicsSystem.h>
 #include <ROS2/Sensor/Events/PhysicsBasedSource.h>
+#include <ROS2/Sensor/ROS2SensorComponentBase.h>
 #include <ROS2Sensors/Imu/ImuConfigurationRequestBus.h>
 #include <ROS2Sensors/Imu/ImuSensorConfiguration.h>
-#include <ROS2Sensors/Sensor/ROS2SensorComponentBase.h>
 #include <rclcpp/publisher.hpp>
 #include <sensor_msgs/msg/imu.hpp>
 
@@ -26,13 +26,15 @@ namespace ROS2Sensors
     //! IMUs typically include gyroscopes, accelerometers and magnetometers. This component encapsulates data
     //! acquisition and its publishing to ROS2 ecosystem. IMU Component requires ROS2FrameComponent.
     class ROS2ImuSensorComponent
-        : public ROS2SensorComponentBase<ROS2::PhysicsBasedSource>
+        : public ROS2::ROS2SensorComponentBase<ROS2::PhysicsBasedSource>
         , protected ImuConfigurationRequestBus::Handler
     {
     public:
-        AZ_COMPONENT(ROS2ImuSensorComponent, ROS2Sensors::ROS2ImuSensorComponentTypeId, SensorBaseType);
+        using SensorBaseType = ROS2::ROS2SensorComponentBase<ROS2::PhysicsBasedSource>;
+
+        AZ_COMPONENT(ROS2ImuSensorComponent, ROS2ImuSensorComponentTypeId, SensorBaseType);
         ROS2ImuSensorComponent();
-        ROS2ImuSensorComponent(const SensorConfiguration& sensorConfiguration, const ImuSensorConfiguration& imuConfiguration);
+        ROS2ImuSensorComponent(const ROS2::SensorConfiguration& sensorConfiguration, const ImuSensorConfiguration& imuConfiguration);
         ~ROS2ImuSensorComponent() = default;
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
         static void Reflect(AZ::ReflectContext* context);

+ 1 - 1
Gems/ROS2Sensors/Code/Source/Lidar/ROS2Lidar2DSensorComponent.cpp

@@ -57,7 +57,7 @@ namespace ROS2Sensors
         m_sensorConfiguration.m_publishersConfigurations.insert(AZStd::make_pair(type, ls));
     }
     ROS2Lidar2DSensorComponent::ROS2Lidar2DSensorComponent(
-        const SensorConfiguration& sensorConfiguration, const LidarSensorConfiguration& lidarConfiguration)
+        const ROS2::SensorConfiguration& sensorConfiguration, const LidarSensorConfiguration& lidarConfiguration)
         : m_lidarCore(lidarConfiguration)
     {
         m_sensorConfiguration = sensorConfiguration;

+ 7 - 4
Gems/ROS2Sensors/Code/Source/Lidar/ROS2Lidar2DSensorComponent.h

@@ -12,10 +12,10 @@
 #include <Atom/RPI.Public/AuxGeom/AuxGeomDraw.h>
 #include <AzCore/Serialization/SerializeContext.h>
 #include <ROS2/Sensor/Events/TickBasedSource.h>
+#include <ROS2/Sensor/ROS2SensorComponentBase.h>
 #include <ROS2Sensors/Lidar/LidarConfigurationRequestBus.h>
 #include <ROS2Sensors/Lidar/LidarRegistrarBus.h>
 #include <ROS2Sensors/Lidar/LidarSystemBus.h>
-#include <ROS2Sensors/Sensor/ROS2SensorComponentBase.h>
 #include <rclcpp/publisher.hpp>
 #include <sensor_msgs/msg/laser_scan.hpp>
 
@@ -26,13 +26,16 @@ namespace ROS2Sensors
     //! Lidar Component allows customization of lidar type and behavior and encapsulates both simulation
     //! and data publishing. It requires ROS2FrameComponent.
     class ROS2Lidar2DSensorComponent
-        : public ROS2SensorComponentBase<ROS2::TickBasedSource>
+        : public ROS2::ROS2SensorComponentBase<ROS2::TickBasedSource>
         , protected LidarConfigurationRequestBus::Handler
     {
     public:
-        AZ_COMPONENT(ROS2Lidar2DSensorComponent, ROS2Sensors::ROS2Lidar2DSensorComponentTypeId, SensorBaseType);
+        using SensorBaseType = ROS2::ROS2SensorComponentBase<ROS2::TickBasedSource>;
+
+        AZ_COMPONENT(ROS2Lidar2DSensorComponent, ROS2Lidar2DSensorComponentTypeId, SensorBaseType);
         ROS2Lidar2DSensorComponent();
-        ROS2Lidar2DSensorComponent(const SensorConfiguration& sensorConfiguration, const LidarSensorConfiguration& lidarConfiguration);
+        ROS2Lidar2DSensorComponent(
+            const ROS2::SensorConfiguration& sensorConfiguration, const LidarSensorConfiguration& lidarConfiguration);
         ~ROS2Lidar2DSensorComponent() = default;
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
         static void Reflect(AZ::ReflectContext* context);

+ 1 - 1
Gems/ROS2Sensors/Code/Source/Lidar/ROS2LidarSensorComponent.cpp

@@ -65,7 +65,7 @@ namespace ROS2Sensors
     }
 
     ROS2LidarSensorComponent::ROS2LidarSensorComponent(
-        const SensorConfiguration& sensorConfiguration, const LidarSensorConfiguration& lidarConfiguration)
+        const ROS2::SensorConfiguration& sensorConfiguration, const LidarSensorConfiguration& lidarConfiguration)
         : m_lidarCore(lidarConfiguration)
     {
         m_sensorConfiguration = sensorConfiguration;

+ 6 - 4
Gems/ROS2Sensors/Code/Source/Lidar/ROS2LidarSensorComponent.h

@@ -12,9 +12,9 @@
 #include <Atom/RPI.Public/AuxGeom/AuxGeomDraw.h>
 #include <AzCore/Serialization/SerializeContext.h>
 #include <ROS2/Sensor/Events/TickBasedSource.h>
+#include <ROS2/Sensor/ROS2SensorComponentBase.h>
 #include <ROS2Sensors/Lidar/LidarConfigurationRequestBus.h>
 #include <ROS2Sensors/Lidar/LidarSensorConfiguration.h>
-#include <ROS2Sensors/Sensor/ROS2SensorComponentBase.h>
 #include <rclcpp/publisher.hpp>
 #include <sensor_msgs/msg/point_cloud2.hpp>
 #include <vision_msgs/msg/label_info.hpp>
@@ -26,13 +26,15 @@ namespace ROS2Sensors
     //! Lidar Component allows customization of lidar type and behavior and encapsulates both simulation
     //! and data publishing. It requires ROS2FrameComponent.
     class ROS2LidarSensorComponent
-        : public ROS2SensorComponentBase<ROS2::TickBasedSource>
+        : public ROS2::ROS2SensorComponentBase<ROS2::TickBasedSource>
         , protected LidarConfigurationRequestBus::Handler
     {
     public:
-        AZ_COMPONENT(ROS2LidarSensorComponent, ROS2Sensors::ROS2LidarSensorComponentTypeId, SensorBaseType);
+        using SensorBaseType = ROS2::ROS2SensorComponentBase<ROS2::TickBasedSource>;
+
+        AZ_COMPONENT(ROS2LidarSensorComponent, ROS2LidarSensorComponentTypeId, SensorBaseType);
         ROS2LidarSensorComponent();
-        ROS2LidarSensorComponent(const SensorConfiguration& sensorConfiguration, const LidarSensorConfiguration& lidarConfiguration);
+        ROS2LidarSensorComponent(const ROS2::SensorConfiguration& sensorConfiguration, const LidarSensorConfiguration& lidarConfiguration);
         ~ROS2LidarSensorComponent() = default;
         static void Reflect(AZ::ReflectContext* context);
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);

+ 6 - 3
Gems/ROS2Sensors/Code/Source/Odometry/ROS2OdometrySensorComponent.h

@@ -11,7 +11,8 @@
 #include <AzCore/Math/Transform.h>
 #include <AzCore/Math/Vector3.h>
 #include <ROS2/Sensor/Events/PhysicsBasedSource.h>
-#include <ROS2Sensors/Sensor/ROS2SensorComponentBase.h>
+#include <ROS2/Sensor/ROS2SensorComponentBase.h>
+#include <ROS2Sensors/ROS2SensorsTypeIds.h>
 #include <nav_msgs/msg/odometry.hpp>
 #include <rclcpp/publisher.hpp>
 
@@ -21,10 +22,12 @@ namespace ROS2Sensors
     //! It constructs and publishes an odometry message, which contains information about vehicle velocity and position in space.
     //! This is a ground truth "sensor", which can be helpful for development and machine learning.
     //! @see <a href="https://index.ros.org/p/nav_msgs/"> nav_msgs package. </a>
-    class ROS2OdometrySensorComponent : public ROS2SensorComponentBase<ROS2::PhysicsBasedSource>
+    class ROS2OdometrySensorComponent : public ROS2::ROS2SensorComponentBase<ROS2::PhysicsBasedSource>
     {
     public:
-        AZ_COMPONENT(ROS2OdometrySensorComponent, ROS2Sensors::ROS2OdometrySensorComponent, SensorBaseType);
+        using SensorBaseType = ROS2::ROS2SensorComponentBase<ROS2::PhysicsBasedSource>;
+
+        AZ_COMPONENT(ROS2OdometrySensorComponent, ROS2OdometrySensorComponentTypeId, SensorBaseType);
         ROS2OdometrySensorComponent();
         ~ROS2OdometrySensorComponent() = default;
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);

+ 0 - 8
Gems/ROS2Sensors/Code/Source/ROS2SensorsModuleInterface.cpp

@@ -10,11 +10,7 @@
 #include <AzCore/Memory/Memory.h>
 
 #include <Clients/ROS2SensorsSystemComponent.h>
-#include <ROS2/Sensor/Events/PhysicsBasedSource.h>
-#include <ROS2/Sensor/Events/TickBasedSource.h>
-
 #include <ROS2Sensors/ROS2SensorsTypeIds.h>
-#include <ROS2Sensors/Sensor/ROS2SensorComponentBase.h>
 
 #include <Camera/PostProcessing/ROS2ImageEncodingConversionComponent.h>
 #include <Camera/ROS2CameraSensorComponent.h>
@@ -27,7 +23,6 @@
 #include <Lidar/ROS2Lidar2DSensorComponent.h>
 #include <Lidar/ROS2LidarSensorComponent.h>
 #include <Odometry/ROS2OdometrySensorComponent.h>
-#include <Odometry/ROS2WheelOdometrySensorComponent.h>
 
 namespace ROS2Sensors
 {
@@ -41,8 +36,6 @@ namespace ROS2Sensors
             m_descriptors.end(),
             {
                 ROS2SensorsSystemComponent::CreateDescriptor(),
-                ROS2SensorComponentBase<ROS2::TickBasedSource>::CreateDescriptor(),
-                ROS2SensorComponentBase<ROS2::PhysicsBasedSource>::CreateDescriptor(),
                 ROS2CameraSensorComponent::CreateDescriptor(),
                 ROS2SystemCameraComponent::CreateDescriptor(),
                 ROS2ImageEncodingConversionComponent::CreateDescriptor(),
@@ -54,7 +47,6 @@ namespace ROS2Sensors
                 ClassSegmentationConfigurationComponent::CreateDescriptor(),
                 LidarRegistrarSystemComponent::CreateDescriptor(),
                 ROS2OdometrySensorComponent::CreateDescriptor(),
-                ROS2WheelOdometryComponent::CreateDescriptor(),
             });
     }
 

+ 1 - 1
Gems/ROS2Sensors/Code/Source/Sensor/SensorConfiguration.cpp

@@ -8,7 +8,7 @@
 
 #include <AzCore/Serialization/EditContext.h>
 #include <AzCore/Serialization/EditContextConstants.inl>
-#include <ROS2Sensors/Sensor/SensorConfiguration.h>
+#include <ROS2/Sensor/SensorConfiguration.h>
 
 namespace ROS2Sensors
 {

+ 3 - 46
Gems/ROS2Sensors/Code/Tests/Tools/ROS2SensorsEditorTest.cpp

@@ -1,55 +1,12 @@
 /*
  * 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.
+ * 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/UserSettings/UserSettingsComponent.h>
 #include <AzTest/AzTest.h>
-#include <AzTest/GemTestEnvironment.h>
-#include <AzToolsFramework/UnitTest/ToolsTestApplication.h>
 
-namespace UnitTest
-{
-    class ROS2SensorsTestEnvironment : public AZ::Test::GemTestEnvironment
-    {
-        // AZ::Test::GemTestEnvironment overrides ...
-        void AddGemsAndComponents() override;
-        AZ::ComponentApplication* CreateApplicationInstance() override;
-        void PostSystemEntityActivate() override;
-
-    public:
-        ROS2SensorsTestEnvironment() = default;
-        ~ROS2SensorsTestEnvironment() override = default;
-    };
-
-    void ROS2SensorsTestEnvironment::AddGemsAndComponents()
-    {
-        AddActiveGems(AZStd::to_array<AZStd::string_view>({ "ROS2", "ROS2Sensors" }));
-        AddDynamicModulePaths({ "ROS2", "ROS2Sensors" });
-    }
-
-    AZ::ComponentApplication* ROS2SensorsTestEnvironment::CreateApplicationInstance()
-    {
-        // Using ToolsTestApplication to have AzFramework and AzToolsFramework components.
-        return aznew UnitTest::ToolsTestApplication("ROS2SensorsTestEnvironment");
-    }
-
-    void ROS2SensorsTestEnvironment::PostSystemEntityActivate()
-    {
-        AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize);
-    }
-} // namespace UnitTest
-
-AZTEST_EXPORT int AZ_UNIT_TEST_HOOK_NAME(int argc, char** argv)
-{
-    ::testing::InitGoogleMock(&argc, argv);
-    AZ::Test::printUnusedParametersWarning(argc, argv);
-    AZ::Test::addTestEnvironments({ new UnitTest::ROS2SensorsTestEnvironment() });
-    int result = RUN_ALL_TESTS();
-    return result;
-}
-
-IMPLEMENT_TEST_EXECUTABLE_MAIN();
+AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);

+ 0 - 6
Gems/ROS2Sensors/Code/ros2sensors_api_files.cmake

@@ -8,9 +8,6 @@
 
 set(FILES
     Include/ROS2Sensors/ROS2SensorsTypeIds.h
-    Include/ROS2Sensors/Sensor/SensorConfiguration.h
-    Include/ROS2Sensors/Sensor/SensorConfigurationRequestBus.h
-    Include/ROS2Sensors/Sensor/ROS2SensorComponentBase.h
     Include/ROS2Sensors/Camera/CameraPostProcessingRequestBus.h
     Include/ROS2Sensors/Camera/CameraSensorConfiguration.h
     Include/ROS2Sensors/GNSS/GNSSPostProcessingRequestBus.h
@@ -24,7 +21,4 @@ set(FILES
     Include/ROS2Sensors/Lidar/LidarSystemBus.h
     Include/ROS2Sensors/Lidar/LidarTemplate.h
     Include/ROS2Sensors/Lidar/LidarTemplateUtils.h
-    Include/ROS2Sensors/Odometry/ROS2OdometryCovariance.h
-    Include/ROS2Sensors/Odometry/WheelOdometrySensorConfiguration.h
-    Include/ROS2Sensors/Odometry/WheelOdometryConfigurationRequestBus.h
 )

+ 0 - 1
Gems/ROS2Sensors/Code/ros2sensors_editor_tests_files.cmake

@@ -8,5 +8,4 @@
 
 set(FILES
     Tests/Tools/ROS2SensorsEditorTest.cpp
-    Tests/Odometry/WheelOdometrySensorConfigurationSerializationTest.cpp
 )

+ 0 - 5
Gems/ROS2Sensors/Code/ros2sensors_private_files.cmake

@@ -11,7 +11,6 @@ set(FILES
     Source/ROS2SensorsModuleInterface.h
     Source/Clients/ROS2SensorsSystemComponent.cpp
     Source/Clients/ROS2SensorsSystemComponent.h
-    Source/Sensor/SensorConfiguration.cpp
     Source/Camera/PostProcessing/ROS2ImageEncodingConversionComponent.cpp
     Source/Camera/PostProcessing/ROS2ImageEncodingConversionComponent.h
     Source/Camera/CameraConstants.h
@@ -56,8 +55,4 @@ set(FILES
     Source/Lidar/ROS2LidarSensorComponent.h
     Source/Odometry/ROS2OdometrySensorComponent.cpp
     Source/Odometry/ROS2OdometrySensorComponent.h
-    Source/Odometry/ROS2WheelOdometrySensorComponent.cpp
-    Source/Odometry/ROS2WheelOdometrySensorComponent.h
-    Source/Odometry/WheelOdometrySensorConfiguration.cpp
-    Source/Odometry/ROS2OdometryCovariance.cpp
 )