Browse Source

Create new Gem `ROS2Controllers` out of `ROS2` Gem (#881)

* Add ROS2Controllers Gem: autogenerated code
* clang-format the source
* Add license note to files; update gem.json
* Remove ROS2Controllers from ROS2 Gem; temporarily disable ROS2WheelOdometry
* Move the implementation from ROS2 to ROS2Controllers
* Move the icons from ROS2 to ROS2Controllers
* Move uuids to the header

Signed-off-by: Jan Hanca <[email protected]>
Jan Hanca 2 tháng trước cách đây
mục cha
commit
bc5c0b2ab9
100 tập tin đã thay đổi với 805 bổ sung177 xóa
  1. 0 4
      Gems/ROS2/Code/Source/ROS2EditorModule.cpp
  2. 0 37
      Gems/ROS2/Code/Source/ROS2ModuleInterface.h
  3. 0 1
      Gems/ROS2/Code/Source/RobotImporter/SDFormat/ROS2SDFormatHooksUtils.cpp
  4. 0 1
      Gems/ROS2/Code/Source/RobotImporter/URDF/RobotControlMaker.cpp
  5. 1 7
      Gems/ROS2/Code/Source/SystemComponents/ROS2SystemComponent.cpp
  6. 0 6
      Gems/ROS2/Code/ros2_editor_files.cmake
  7. 0 78
      Gems/ROS2/Code/ros2_files.cmake
  8. 0 14
      Gems/ROS2/Code/ros2_header_files.cmake
  9. 0 1
      Gems/ROS2/Code/ros2_tests_files.cmake
  10. 61 0
      Gems/ROS2Controllers/.clang-format
  11. 0 0
      Gems/ROS2Controllers/.gitignore
  12. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/AckermannControl.svg
  13. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/AckermannVehicleModel.svg
  14. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/FingerGripperComponent.svg
  15. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/GripperActionServerComponent.svg
  16. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/JointsArticulationControllerComponent.svg
  17. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/JointsManipulationEditorComponent.svg
  18. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/JointsPIDControllerComponent.svg
  19. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/JointsTrajectoryComponent.svg
  20. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/ManualMotorController.svg
  21. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/PidMotorController.svg
  22. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/ROS2RobotControl.svg
  23. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/RigidBodyTwistControl.svg
  24. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/SkidSteeringTwistControl.svg
  25. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/SkidSteeringVehicleModel.svg
  26. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/VacuumGripperComponent.svg
  27. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/AckermannControl.svg
  28. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/AckermannVehicleModel.svg
  29. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/FingerGripperComponent.svg
  30. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/GripperActionServerComponent.svg
  31. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/JointsArticulationControllerComponent.svg
  32. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/JointsManipulationEditorComponent.svg
  33. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/JointsPIDControllerComponent.svg
  34. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/JointsTrajectoryComponent.svg
  35. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/ManualMotorController.svg
  36. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/PidMotorController.svg
  37. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/ROS2RobotControl.svg
  38. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/RigidBodyTwistControl.svg
  39. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/SkidSteeringTwistControl.svg
  40. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/SkidSteeringVehicleModel.svg
  41. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/VacuumGripperComponent.svg
  42. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/WheelController.svg
  43. 0 0
      Gems/ROS2Controllers/Assets/Editor/Icons/Components/WheelController.svg
  44. 13 0
      Gems/ROS2Controllers/CMakeLists.txt
  45. 253 0
      Gems/ROS2Controllers/Code/CMakeLists.txt
  46. 0 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Controllers/PidConfiguration.h
  47. 0 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Gripper/GripperRequestBus.h
  48. 1 1
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/Controllers/JointsPositionControllerRequests.h
  49. 0 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/JointInfo.h
  50. 1 1
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/JointsManipulationRequests.h
  51. 2 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/JointsTrajectoryRequests.h
  52. 1 1
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/MotorizedJoints/JointMotorControllerComponent.h
  53. 0 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/MotorizedJoints/JointMotorControllerConfiguration.h
  54. 1 1
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/MotorizedJoints/ManualMotorControllerComponent.h
  55. 0 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/MotorizedJoints/PidMotorControllerBus.h
  56. 3 3
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/MotorizedJoints/PidMotorControllerComponent.h
  57. 40 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/ROS2ControllersTypeIds.h
  58. 0 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/RobotControl/Ackermann/AckermannBus.h
  59. 0 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/RobotControl/Ackermann/AckermannCommandStruct.h
  60. 0 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/RobotControl/ControlConfiguration.h
  61. 0 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/RobotControl/ControlSubscriptionHandler.h
  62. 0 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/RobotControl/Twist/TwistBus.h
  63. 0 0
      Gems/ROS2Controllers/Code/Include/ROS2Controllers/VehicleDynamics/VehicleInputControlBus.h
  64. 11 0
      Gems/ROS2Controllers/Code/Platform/Android/PAL_android.cmake
  65. 10 0
      Gems/ROS2Controllers/Code/Platform/Android/ros2controllers_api_files.cmake
  66. 15 0
      Gems/ROS2Controllers/Code/Platform/Android/ros2controllers_private_files.cmake
  67. 15 0
      Gems/ROS2Controllers/Code/Platform/Android/ros2controllers_shared_files.cmake
  68. 11 0
      Gems/ROS2Controllers/Code/Platform/Linux/PAL_linux.cmake
  69. 10 0
      Gems/ROS2Controllers/Code/Platform/Linux/ros2controllers_api_files.cmake
  70. 10 0
      Gems/ROS2Controllers/Code/Platform/Linux/ros2controllers_editor_api_files.cmake
  71. 15 0
      Gems/ROS2Controllers/Code/Platform/Linux/ros2controllers_private_files.cmake
  72. 15 0
      Gems/ROS2Controllers/Code/Platform/Linux/ros2controllers_shared_files.cmake
  73. 11 0
      Gems/ROS2Controllers/Code/Platform/Mac/PAL_mac.cmake
  74. 10 0
      Gems/ROS2Controllers/Code/Platform/Mac/ros2controllers_api_files.cmake
  75. 10 0
      Gems/ROS2Controllers/Code/Platform/Mac/ros2controllers_editor_api_files.cmake
  76. 15 0
      Gems/ROS2Controllers/Code/Platform/Mac/ros2controllers_private_files.cmake
  77. 15 0
      Gems/ROS2Controllers/Code/Platform/Mac/ros2controllers_shared_files.cmake
  78. 11 0
      Gems/ROS2Controllers/Code/Platform/Windows/PAL_windows.cmake
  79. 10 0
      Gems/ROS2Controllers/Code/Platform/Windows/ros2controllers_api_files.cmake
  80. 10 0
      Gems/ROS2Controllers/Code/Platform/Windows/ros2controllers_editor_api_files.cmake
  81. 15 0
      Gems/ROS2Controllers/Code/Platform/Windows/ros2controllers_private_files.cmake
  82. 15 0
      Gems/ROS2Controllers/Code/Platform/Windows/ros2controllers_shared_files.cmake
  83. 11 0
      Gems/ROS2Controllers/Code/Platform/iOS/PAL_ios.cmake
  84. 10 0
      Gems/ROS2Controllers/Code/Platform/iOS/ros2controllers_api_files.cmake
  85. 15 0
      Gems/ROS2Controllers/Code/Platform/iOS/ros2controllers_private_files.cmake
  86. 15 0
      Gems/ROS2Controllers/Code/Platform/iOS/ros2controllers_shared_files.cmake
  87. 28 0
      Gems/ROS2Controllers/Code/Source/Clients/ROS2ControllersModule.cpp
  88. 51 0
      Gems/ROS2Controllers/Code/Source/Clients/ROS2ControllersSystemComponent.cpp
  89. 40 0
      Gems/ROS2Controllers/Code/Source/Clients/ROS2ControllersSystemComponent.h
  90. 1 1
      Gems/ROS2Controllers/Code/Source/Gripper/FingerGripperComponent.cpp
  91. 4 3
      Gems/ROS2Controllers/Code/Source/Gripper/FingerGripperComponent.h
  92. 0 0
      Gems/ROS2Controllers/Code/Source/Gripper/GripperActionServer.cpp
  93. 1 1
      Gems/ROS2Controllers/Code/Source/Gripper/GripperActionServer.h
  94. 0 0
      Gems/ROS2Controllers/Code/Source/Gripper/GripperActionServerComponent.cpp
  95. 3 2
      Gems/ROS2Controllers/Code/Source/Gripper/GripperActionServerComponent.h
  96. 0 0
      Gems/ROS2Controllers/Code/Source/Gripper/VacuumGripperComponent.cpp
  97. 3 2
      Gems/ROS2Controllers/Code/Source/Gripper/VacuumGripperComponent.h
  98. 4 3
      Gems/ROS2Controllers/Code/Source/Manipulation/Controllers/JointsArticulationControllerComponent.cpp
  99. 3 2
      Gems/ROS2Controllers/Code/Source/Manipulation/Controllers/JointsArticulationControllerComponent.h
  100. 5 7
      Gems/ROS2Controllers/Code/Source/Manipulation/Controllers/JointsPIDControllerComponent.cpp

+ 0 - 4
Gems/ROS2/Code/Source/ROS2EditorModule.cpp

@@ -8,8 +8,6 @@
 
 
 #include <AzCore/RTTI/RTTIMacros.h>
 #include <AzCore/RTTI/RTTIMacros.h>
 #include <Frame/ROS2FrameSystemComponent.h>
 #include <Frame/ROS2FrameSystemComponent.h>
-#include <Manipulation/JointsManipulationEditorComponent.h>
-#include <Manipulation/JointsPositionsEditorComponent.h>
 #include <QtCore/qglobal.h>
 #include <QtCore/qglobal.h>
 #include <ROS2/Frame/ROS2FrameEditorComponent.h>
 #include <ROS2/Frame/ROS2FrameEditorComponent.h>
 #include <ROS2ModuleInterface.h>
 #include <ROS2ModuleInterface.h>
@@ -44,8 +42,6 @@ namespace ROS2
                   ROS2SpawnerEditorComponent::CreateDescriptor(),
                   ROS2SpawnerEditorComponent::CreateDescriptor(),
                   ROS2SpawnPointEditorComponent::CreateDescriptor(),
                   ROS2SpawnPointEditorComponent::CreateDescriptor(),
                   SdfAssetBuilderSystemComponent::CreateDescriptor(),
                   SdfAssetBuilderSystemComponent::CreateDescriptor(),
-                  JointsManipulationEditorComponent::CreateDescriptor(),
-                  JointsPositionsEditorComponent::CreateDescriptor(),
                   ROS2FrameSystemComponent::CreateDescriptor(),
                   ROS2FrameSystemComponent::CreateDescriptor(),
                   ROS2FrameEditorComponent::CreateDescriptor() });
                   ROS2FrameEditorComponent::CreateDescriptor() });
         }
         }

+ 0 - 37
Gems/ROS2/Code/Source/ROS2ModuleInterface.h

@@ -9,31 +9,12 @@
 
 
 #include <AzCore/Memory/SystemAllocator.h>
 #include <AzCore/Memory/SystemAllocator.h>
 #include <AzCore/Module/Module.h>
 #include <AzCore/Module/Module.h>
-#include <Gripper/FingerGripperComponent.h>
-#include <Gripper/GripperActionServerComponent.h>
-#include <Gripper/VacuumGripperComponent.h>
-#include <Manipulation/Controllers/JointsArticulationControllerComponent.h>
-#include <Manipulation/Controllers/JointsPIDControllerComponent.h>
-#include <Manipulation/JointsManipulationComponent.h>
-#include <Manipulation/JointsPositionsComponent.h>
-#include <Manipulation/JointsTrajectoryComponent.h>
 #include <ROS2/Frame/ROS2FrameComponent.h>
 #include <ROS2/Frame/ROS2FrameComponent.h>
-#include <ROS2/Manipulation/MotorizedJoints/JointMotorControllerComponent.h>
-#include <ROS2/Manipulation/MotorizedJoints/ManualMotorControllerComponent.h>
-#include <ROS2/Manipulation/MotorizedJoints/PidMotorControllerComponent.h>
-#include <RobotControl/Controllers/AckermannController/AckermannControlComponent.h>
-#include <RobotControl/Controllers/RigidBodyController/RigidBodyTwistControlComponent.h>
-#include <RobotControl/Controllers/SkidSteeringController/SkidSteeringControlComponent.h>
-#include <RobotControl/ROS2RobotControlComponent.h>
 #include <RobotImporter/ROS2RobotImporterSystemComponent.h>
 #include <RobotImporter/ROS2RobotImporterSystemComponent.h>
 #include <SimulationUtils/FollowingCameraComponent.h>
 #include <SimulationUtils/FollowingCameraComponent.h>
 #include <Spawner/ROS2SpawnPointComponent.h>
 #include <Spawner/ROS2SpawnPointComponent.h>
 #include <Spawner/ROS2SpawnerComponent.h>
 #include <Spawner/ROS2SpawnerComponent.h>
 #include <SystemComponents/ROS2SystemComponent.h>
 #include <SystemComponents/ROS2SystemComponent.h>
-#include <VehicleDynamics/ModelComponents/AckermannModelComponent.h>
-#include <VehicleDynamics/ModelComponents/SkidSteeringModelComponent.h>
-#include <VehicleDynamics/VehicleModelComponent.h>
-#include <VehicleDynamics/WheelControllerComponent.h>
 
 
 namespace ROS2
 namespace ROS2
 {
 {
@@ -51,26 +32,8 @@ namespace ROS2
                     ROS2SystemComponent::CreateDescriptor(),
                     ROS2SystemComponent::CreateDescriptor(),
                     ROS2RobotImporterSystemComponent::CreateDescriptor(),
                     ROS2RobotImporterSystemComponent::CreateDescriptor(),
                     ROS2FrameComponent::CreateDescriptor(),
                     ROS2FrameComponent::CreateDescriptor(),
-                    ROS2RobotControlComponent::CreateDescriptor(),
-                    AckermannControlComponent::CreateDescriptor(),
-                    RigidBodyTwistControlComponent::CreateDescriptor(),
-                    SkidSteeringControlComponent::CreateDescriptor(),
                     ROS2SpawnerComponent::CreateDescriptor(),
                     ROS2SpawnerComponent::CreateDescriptor(),
                     ROS2SpawnPointComponent::CreateDescriptor(),
                     ROS2SpawnPointComponent::CreateDescriptor(),
-                    VehicleDynamics::AckermannVehicleModelComponent::CreateDescriptor(),
-                    VehicleDynamics::WheelControllerComponent::CreateDescriptor(),
-                    VehicleDynamics::SkidSteeringModelComponent::CreateDescriptor(),
-                    JointMotorControllerComponent::CreateDescriptor(),
-                    ManualMotorControllerComponent::CreateDescriptor(),
-                    JointsManipulationComponent::CreateDescriptor(),
-                    JointsPositionsComponent::CreateDescriptor(),
-                    JointsArticulationControllerComponent::CreateDescriptor(),
-                    JointsPIDControllerComponent::CreateDescriptor(),
-                    JointsTrajectoryComponent::CreateDescriptor(),
-                    PidMotorControllerComponent::CreateDescriptor(),
-                    GripperActionServerComponent::CreateDescriptor(),
-                    VacuumGripperComponent::CreateDescriptor(),
-                    FingerGripperComponent::CreateDescriptor(),
                     FollowingCameraComponent::CreateDescriptor(),
                     FollowingCameraComponent::CreateDescriptor(),
                 });
                 });
         }
         }

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

@@ -14,7 +14,6 @@
 #include <RobotImporter/Utils/RobotImporterUtils.h>
 #include <RobotImporter/Utils/RobotImporterUtils.h>
 #include <RobotImporter/Utils/TypeConversions.h>
 #include <RobotImporter/Utils/TypeConversions.h>
 #include <SdfAssetBuilder/SdfAssetBuilderSettings.h>
 #include <SdfAssetBuilder/SdfAssetBuilderSettings.h>
-#include <VehicleDynamics/WheelControllerComponent.h>
 
 
 #include <sdf/Element.hh>
 #include <sdf/Element.hh>
 #include <sdf/Joint.hh>
 #include <sdf/Joint.hh>

+ 0 - 1
Gems/ROS2/Code/Source/RobotImporter/URDF/RobotControlMaker.cpp

@@ -10,7 +10,6 @@
 
 
 #include <AzToolsFramework/Entity/EditorEntityHelpers.h>
 #include <AzToolsFramework/Entity/EditorEntityHelpers.h>
 #include <ROS2/RobotImporter/RobotImporterBus.h>
 #include <ROS2/RobotImporter/RobotImporterBus.h>
-#include <RobotControl/ROS2RobotControlComponent.h>
 #include <RobotImporter/Utils/RobotImporterUtils.h>
 #include <RobotImporter/Utils/RobotImporterUtils.h>
 
 
 namespace ROS2
 namespace ROS2

+ 1 - 7
Gems/ROS2/Code/Source/SystemComponents/ROS2SystemComponent.cpp

@@ -14,10 +14,7 @@
 #include <ROS2/Communication/PublisherConfiguration.h>
 #include <ROS2/Communication/PublisherConfiguration.h>
 #include <ROS2/Communication/QoS.h>
 #include <ROS2/Communication/QoS.h>
 #include <ROS2/Communication/TopicConfiguration.h>
 #include <ROS2/Communication/TopicConfiguration.h>
-#include <ROS2/Utilities/Controllers/PidConfiguration.h>
-#include <VehicleDynamics/VehicleModelComponent.h>
-
-#include <Atom/RPI.Public/Pass/PassSystemInterface.h>
+#include <ROS2/Utilities/ROS2Conversions.h>
 
 
 #include <AzCore/Serialization/EditContext.h>
 #include <AzCore/Serialization/EditContext.h>
 #include <AzCore/Serialization/EditContextConstants.inl>
 #include <AzCore/Serialization/EditContextConstants.inl>
@@ -28,7 +25,6 @@
 #include <AzCore/std/sort.h>
 #include <AzCore/std/sort.h>
 #include <AzCore/std/string/string_view.h>
 #include <AzCore/std/string/string_view.h>
 #include <AzFramework/API/ApplicationAPI.h>
 #include <AzFramework/API/ApplicationAPI.h>
-#include <ROS2/Utilities/ROS2Conversions.h>
 
 
 namespace ROS2
 namespace ROS2
 {
 {
@@ -42,8 +38,6 @@ namespace ROS2
         QoS::Reflect(context);
         QoS::Reflect(context);
         TopicConfiguration::Reflect(context);
         TopicConfiguration::Reflect(context);
         PublisherConfiguration::Reflect(context);
         PublisherConfiguration::Reflect(context);
-        VehicleDynamics::VehicleModelComponent::Reflect(context);
-        ROS2::Controllers::PidConfiguration::Reflect(context);
 
 
         if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
         if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
         {
         {

+ 0 - 6
Gems/ROS2/Code/ros2_editor_files.cmake

@@ -6,12 +6,6 @@
 set(FILES
 set(FILES
     ../Assets/Editor/Images/Icons/ROS2.qrc
     ../Assets/Editor/Images/Icons/ROS2.qrc
     ../Assets/Editor/Images/Icons/ROS_import_icon.svg
     ../Assets/Editor/Images/Icons/ROS_import_icon.svg
-    Source/Manipulation/JointsPositionsEditorComponent.cpp
-    Source/Manipulation/JointsPositionsEditorComponent.h
-    Source/Manipulation/JointsManipulationEditorComponent.cpp
-    Source/Manipulation/JointsManipulationEditorComponent.h
-    Source/Manipulation/JointUtils.cpp
-    Source/Manipulation/JointUtils.h
     Source/RobotImporter/FixURDF/FixURDF.cpp
     Source/RobotImporter/FixURDF/FixURDF.cpp
     Source/RobotImporter/FixURDF/FixURDF.h
     Source/RobotImporter/FixURDF/FixURDF.h
     Source/RobotImporter/Pages/ModifiedURDFWindow.cpp
     Source/RobotImporter/Pages/ModifiedURDFWindow.cpp

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

@@ -20,49 +20,6 @@ set(FILES
         Source/Frame/ROS2FrameComponent.cpp
         Source/Frame/ROS2FrameComponent.cpp
         Source/Frame/ROS2FrameConfiguration.cpp
         Source/Frame/ROS2FrameConfiguration.cpp
         Source/Frame/ROS2Transform.cpp
         Source/Frame/ROS2Transform.cpp
-        Source/Gripper/GripperActionServer.cpp
-        Source/Gripper/GripperActionServer.h
-        Source/Gripper/GripperActionServerComponent.cpp
-        Source/Gripper/GripperActionServerComponent.h
-        Source/Gripper/VacuumGripperComponent.h
-        Source/Gripper/VacuumGripperComponent.cpp
-        Source/Gripper/FingerGripperComponent.h
-        Source/Gripper/FingerGripperComponent.cpp
-        Source/Manipulation/Controllers/JointsArticulationControllerComponent.cpp
-        Source/Manipulation/Controllers/JointsArticulationControllerComponent.h
-        Source/Manipulation/Controllers/JointsPIDControllerComponent.cpp
-        Source/Manipulation/Controllers/JointsPIDControllerComponent.h
-        Source/Manipulation/JointInfo.cpp
-        Source/Manipulation/JointStatePublisher.cpp
-        Source/Manipulation/JointStatePublisher.h
-        Source/Manipulation/JointPositionsSubscriptionHandler.cpp
-        Source/Manipulation/JointPositionsSubscriptionHandler.h
-        Source/Manipulation/JointsPositionsComponent.cpp
-        Source/Manipulation/JointsPositionsComponent.h
-        Source/Manipulation/JointsManipulationComponent.cpp
-        Source/Manipulation/JointsManipulationComponent.h
-        Source/Manipulation/JointsTrajectoryComponent.cpp
-        Source/Manipulation/JointsTrajectoryComponent.h
-        Source/Manipulation/FollowJointTrajectoryActionServer.cpp
-        Source/Manipulation/FollowJointTrajectoryActionServer.h
-        Source/Manipulation/ManipulationUtils.h
-        Source/Manipulation/ManipulationUtils.cpp
-        Source/Manipulation/MotorizedJoints/JointMotorControllerComponent.cpp
-        Source/Manipulation/MotorizedJoints/JointMotorControllerConfiguration.cpp
-        Source/Manipulation/MotorizedJoints/ManualMotorControllerComponent.cpp
-        Source/Manipulation/MotorizedJoints/PidMotorControllerComponent.cpp
-        Source/RobotControl/Ackermann/AckermannSubscriptionHandler.cpp
-        Source/RobotControl/Ackermann/AckermannSubscriptionHandler.h
-        Source/RobotControl/ControlConfiguration.cpp
-        Source/RobotControl/Controllers/AckermannController/AckermannControlComponent.cpp
-        Source/RobotControl/Controllers/AckermannController/AckermannControlComponent.h
-        Source/RobotControl/Controllers/RigidBodyController/RigidBodyTwistControlComponent.cpp
-        Source/RobotControl/Controllers/RigidBodyController/RigidBodyTwistControlComponent.h
-        Source/RobotControl/Controllers/SkidSteeringController/SkidSteeringControlComponent.cpp
-        Source/RobotControl/Controllers/SkidSteeringController/SkidSteeringControlComponent.h
-        Source/RobotControl/ROS2RobotControlComponent.cpp
-        Source/RobotControl/ROS2RobotControlComponent.h
-        Source/RobotControl/Twist/TwistSubscriptionHandler.cpp
         Source/RobotImporter/ROS2RobotImporterSystemComponent.cpp
         Source/RobotImporter/ROS2RobotImporterSystemComponent.cpp
         Source/RobotImporter/ROS2RobotImporterSystemComponent.h
         Source/RobotImporter/ROS2RobotImporterSystemComponent.h
         Source/ROS2ModuleInterface.h
         Source/ROS2ModuleInterface.h
@@ -82,41 +39,6 @@ set(FILES
         Source/Spawner/ROS2SpawnPointComponentController.h
         Source/Spawner/ROS2SpawnPointComponentController.h
         Source/SystemComponents/ROS2SystemComponent.cpp
         Source/SystemComponents/ROS2SystemComponent.cpp
         Source/SystemComponents/ROS2SystemComponent.h
         Source/SystemComponents/ROS2SystemComponent.h
-        Source/Utilities/ArticulationsUtilities.cpp
-        Source/Utilities/ArticulationsUtilities.h
-        Source/Utilities/JointUtilities.cpp
-        Source/Utilities/JointUtilities.h
-        Source/Utilities/Controllers/PidConfiguration.cpp
         Source/Utilities/ROS2Conversions.cpp
         Source/Utilities/ROS2Conversions.cpp
         Source/Utilities/ROS2Names.cpp
         Source/Utilities/ROS2Names.cpp
-        Source/VehicleDynamics/AxleConfiguration.cpp
-        Source/VehicleDynamics/AxleConfiguration.h
-        Source/VehicleDynamics/DriveModel.cpp
-        Source/VehicleDynamics/DriveModel.h
-        Source/VehicleDynamics/DriveModels/AckermannDriveModel.cpp
-        Source/VehicleDynamics/DriveModels/AckermannDriveModel.h
-        Source/VehicleDynamics/DriveModels/SkidSteeringDriveModel.cpp
-        Source/VehicleDynamics/DriveModels/SkidSteeringDriveModel.h
-        Source/VehicleDynamics/ManualControlEventHandler.h
-        Source/VehicleDynamics/Utilities.cpp
-        Source/VehicleDynamics/Utilities.h
-        Source/VehicleDynamics/VehicleConfiguration.cpp
-        Source/VehicleDynamics/VehicleConfiguration.h
-        Source/VehicleDynamics/VehicleInputs.cpp
-        Source/VehicleDynamics/VehicleInputs.h
-        Source/VehicleDynamics/VehicleModelComponent.cpp
-        Source/VehicleDynamics/VehicleModelComponent.h
-        Source/VehicleDynamics/ModelComponents/AckermannModelComponent.cpp
-        Source/VehicleDynamics/ModelComponents/AckermannModelComponent.h
-        Source/VehicleDynamics/ModelComponents/SkidSteeringModelComponent.cpp
-        Source/VehicleDynamics/ModelComponents/SkidSteeringModelComponent.h
-        Source/VehicleDynamics/VehicleModelLimits.cpp
-        Source/VehicleDynamics/VehicleModelLimits.h
-        Source/VehicleDynamics/ModelLimits/AckermannModelLimits.cpp
-        Source/VehicleDynamics/ModelLimits/AckermannModelLimits.h
-        Source/VehicleDynamics/ModelLimits/SkidSteeringModelLimits.cpp
-        Source/VehicleDynamics/ModelLimits/SkidSteeringModelLimits.h
-        Source/VehicleDynamics/WheelControllerComponent.cpp
-        Source/VehicleDynamics/WheelControllerComponent.h
-        Source/VehicleDynamics/WheelDynamicsData.h
 )
 )

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

@@ -16,18 +16,6 @@ set(FILES
         Include/ROS2/Frame/ROS2FrameComponent.h
         Include/ROS2/Frame/ROS2FrameComponent.h
         Include/ROS2/Frame/ROS2FrameConfiguration.h
         Include/ROS2/Frame/ROS2FrameConfiguration.h
         Include/ROS2/Frame/ROS2Transform.h
         Include/ROS2/Frame/ROS2Transform.h
-        Include/ROS2/Gripper/GripperRequestBus.h
-        Include/ROS2/Manipulation/Controllers/JointsPositionControllerRequests.h
-        Include/ROS2/Manipulation/JointInfo.h
-        Include/ROS2/Manipulation/JointsManipulationRequests.h
-        Include/ROS2/Manipulation/JointsTrajectoryRequests.h
-        Include/ROS2/Manipulation/MotorizedJoints/JointMotorControllerComponent.h
-        Include/ROS2/Manipulation/MotorizedJoints/JointMotorControllerConfiguration.h
-        Include/ROS2/Manipulation/MotorizedJoints/ManualMotorControllerComponent.h
-        Include/ROS2/Manipulation/MotorizedJoints/PidMotorControllerBus.h
-        Include/ROS2/Manipulation/MotorizedJoints/PidMotorControllerComponent.h
-        Include/ROS2/RobotControl/ControlConfiguration.h
-        Include/ROS2/RobotControl/ControlSubscriptionHandler.h
         Include/ROS2/RobotImporter/SDFormatModelPluginImporterHook.h
         Include/ROS2/RobotImporter/SDFormatModelPluginImporterHook.h
         Include/ROS2/RobotImporter/SDFormatSensorImporterHook.h
         Include/ROS2/RobotImporter/SDFormatSensorImporterHook.h
         Include/ROS2/ROS2Bus.h
         Include/ROS2/ROS2Bus.h
@@ -38,8 +26,6 @@ set(FILES
         Include/ROS2/Sensor/Events/TickBasedSource.h
         Include/ROS2/Sensor/Events/TickBasedSource.h
         Include/ROS2/Spawner/SpawnerBus.h
         Include/ROS2/Spawner/SpawnerBus.h
         Include/ROS2/Spawner/SpawnerBusHandler.h
         Include/ROS2/Spawner/SpawnerBusHandler.h
-        Include/ROS2/Utilities/Controllers/PidConfiguration.h
         Include/ROS2/Utilities/ROS2Conversions.h
         Include/ROS2/Utilities/ROS2Conversions.h
         Include/ROS2/Utilities/ROS2Names.h
         Include/ROS2/Utilities/ROS2Names.h
-        Include/ROS2/VehicleDynamics/VehicleInputControlBus.h
 )
 )

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

@@ -5,5 +5,4 @@
 
 
 set(FILES
 set(FILES
     Tests/ROS2Test.cpp
     Tests/ROS2Test.cpp
-    Tests/PIDTest.cpp
 )
 )

+ 61 - 0
Gems/ROS2Controllers/.clang-format

@@ -0,0 +1,61 @@
+Language: Cpp
+
+AccessModifierOffset: -4
+AlignAfterOpenBracket: AlwaysBreak
+AlignConsecutiveAssignments: false
+AlignConsecutiveDeclarations: false
+AlignEscapedNewlines: Right
+AlignOperands: false
+AlignTrailingComments: false
+AllowAllArgumentsOnNextLine: true
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowShortFunctionsOnASingleLine: None
+AllowShortLambdasOnASingleLine: None
+AlwaysBreakAfterReturnType: None
+AlwaysBreakTemplateDeclarations: true
+BinPackArguments: false
+BinPackParameters: false
+BreakBeforeBraces: Custom
+BraceWrapping:
+    AfterClass: true
+    AfterControlStatement: true
+    AfterEnum: true
+    AfterFunction: true
+    AfterNamespace: true
+    BeforeLambdaBody: true
+    AfterStruct: true
+    BeforeElse: true
+    SplitEmptyFunction: true
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializers: BeforeComma
+BreakInheritanceList: BeforeComma
+ColumnLimit: 140
+ConstructorInitializerIndentWidth: 4
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: false
+FixNamespaceComments: true
+IncludeBlocks: Preserve
+IndentCaseBlocks: true
+IndentCaseLabels: false
+IndentPPDirectives: None
+IndentWidth: 4
+KeepEmptyLinesAtTheStartOfBlocks: false
+MaxEmptyLinesToKeep: 1
+NamespaceIndentation: All
+PenaltyReturnTypeOnItsOwnLine: 1000
+PointerAlignment: Left
+SortIncludes: true
+SpaceAfterLogicalNot: false
+SpaceAfterTemplateKeyword: false
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeCpp11BracedList: false
+SpaceBeforeCtorInitializerColon: true
+SpaceBeforeInheritanceColon: true
+SpaceBeforeParens: ControlStatements
+SpaceBeforeRangeBasedForLoopColon: true
+SpaceInEmptyParentheses: false
+SpacesInAngles: false
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+Standard: c++17
+UseTab: Never

+ 0 - 0
Gems/ROS2Controllers/.gitignore


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/AckermannControl.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/AckermannControl.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/AckermannVehicleModel.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/AckermannVehicleModel.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/FingerGripperComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/FingerGripperComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/GripperActionServerComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/GripperActionServerComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/JointsArticulationControllerComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/JointsArticulationControllerComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/JointsManipulationEditorComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/JointsManipulationEditorComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/JointsPIDControllerComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/JointsPIDControllerComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/JointsTrajectoryComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/JointsTrajectoryComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/ManualMotorController.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/ManualMotorController.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/PidMotorController.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/PidMotorController.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/ROS2RobotControl.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/ROS2RobotControl.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/RigidBodyTwistControl.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/RigidBodyTwistControl.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/SkidSteeringTwistControl.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/SkidSteeringTwistControl.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/SkidSteeringVehicleModel.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/SkidSteeringVehicleModel.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/VacuumGripperComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/VacuumGripperComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/AckermannControl.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/AckermannControl.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/AckermannVehicleModel.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/AckermannVehicleModel.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/FingerGripperComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/FingerGripperComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/GripperActionServerComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/GripperActionServerComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/JointsArticulationControllerComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/JointsArticulationControllerComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/JointsManipulationEditorComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/JointsManipulationEditorComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/JointsPIDControllerComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/JointsPIDControllerComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/JointsTrajectoryComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/JointsTrajectoryComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/ManualMotorController.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/ManualMotorController.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/PidMotorController.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/PidMotorController.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/ROS2RobotControl.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/ROS2RobotControl.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/RigidBodyTwistControl.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/RigidBodyTwistControl.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/SkidSteeringTwistControl.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/SkidSteeringTwistControl.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/SkidSteeringVehicleModel.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/SkidSteeringVehicleModel.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/VacuumGripperComponent.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/VacuumGripperComponent.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/Viewport/WheelController.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/Viewport/WheelController.svg


+ 0 - 0
Gems/ROS2/Assets/Editor/Icons/Components/WheelController.svg → Gems/ROS2Controllers/Assets/Editor/Icons/Components/WheelController.svg


+ 13 - 0
Gems/ROS2Controllers/CMakeLists.txt

@@ -0,0 +1,13 @@
+#
+# 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
+#
+#
+
+o3de_gem_setup("ROS2Controllers")
+
+ly_add_external_target_path(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty)
+
+add_subdirectory(Code)

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

@@ -0,0 +1,253 @@
+#
+# 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
+#
+#
+
+# Currently we are in the Code folder: ${CMAKE_CURRENT_LIST_DIR}
+# Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}
+# Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform
+#       in which case it will see if that platform is present here or in the restricted folder.
+#       i.e. It could here in our gem : Gems/ROS2Controllers/Code/Platform/<platorm_name>  or
+#            <restricted_folder>/<platform_name>/Gems/ROS2Controllers/Code
+o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
+
+# Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the
+# traits for this platform. Traits for a platform are defines for things like whether or not something in this gem
+# is supported by this platform.
+include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
+
+# Check to see if building the Gem Modules are supported for the current platform
+if(NOT PAL_TRAIT_ROS2CONTROLLERS_SUPPORTED)
+    return()
+endif()
+
+# The ${gem_name}.API target declares the common interface that users of this gem should depend on in their targets
+ly_add_target(
+    NAME ${gem_name}.API INTERFACE
+    NAMESPACE Gem
+    FILES_CMAKE
+        ros2controllers_api_files.cmake
+        ${pal_dir}/ros2controllers_api_files.cmake
+    INCLUDE_DIRECTORIES
+        INTERFACE
+            Include
+    BUILD_DEPENDENCIES
+        INTERFACE
+           AZ::AzCore
+)
+
+# The ${gem_name}.Private.Object target is an internal target
+# It should not be used outside of this Gems CMakeLists.txt
+ly_add_target(
+    NAME ${gem_name}.Private.Object STATIC
+    NAMESPACE Gem
+    FILES_CMAKE
+        ros2controllers_private_files.cmake
+        ${pal_dir}/ros2controllers_private_files.cmake
+    TARGET_PROPERTIES
+        O3DE_PRIVATE_TARGET TRUE
+    INCLUDE_DIRECTORIES
+        PRIVATE
+            Include
+            Source
+    BUILD_DEPENDENCIES
+        PUBLIC
+            AZ::AzCore
+            AZ::AzFramework
+            Gem::ROS2.Static
+)
+
+# Here add ${gem_name} target, it depends on the Private Object library and Public API interface
+ly_add_target(
+    NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
+    NAMESPACE Gem
+    FILES_CMAKE
+        ros2controllers_shared_files.cmake
+        ${pal_dir}/ros2controllers_shared_files.cmake
+    INCLUDE_DIRECTORIES
+        PUBLIC
+            Include
+        PRIVATE
+            Source
+    BUILD_DEPENDENCIES
+        PUBLIC
+            Gem::${gem_name}.API
+        PRIVATE
+            Gem::${gem_name}.Private.Object
+)
+
+# Include the gem name into the Client Module source file
+# for use with the AZ_DECLARE_MODULE_CLASS macro
+# This is to allow renaming of the gem to also cause
+# the CreateModuleClass_Gem_<gem-name> function which
+# is used to bootstrap the gem in monolithic builds to link to the new gem name
+ly_add_source_properties(
+SOURCES
+    Source/Clients/ROS2ControllersModule.cpp
+PROPERTY COMPILE_DEFINITIONS
+    VALUES
+        O3DE_GEM_NAME=${gem_name}
+        O3DE_GEM_VERSION=${gem_version})
+
+# By default, we will specify that the above target ${gem_name} would be used by
+# Client and Server type targets when this gem is enabled.  If you don't want it
+# active in Clients or Servers by default, delete one of both of the following lines:
+ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
+ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
+ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})
+
+# For the Client and Server variants of ${gem_name} Gem, an alias to the ${gem_name}.API target will be made
+ly_create_alias(NAME ${gem_name}.Clients.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
+ly_create_alias(NAME ${gem_name}.Servers.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
+ly_create_alias(NAME ${gem_name}.Unified.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
+
+# Add in CMake dependencies for each gem dependency listed in this gem's gem.json file
+# for the Clients, Servers, Unified gem variants
+o3de_add_variant_dependencies_for_gem_dependencies(GEM_NAME ${gem_name} VARIANTS Clients Servers Unified)
+
+# If we are on a host platform, we want to add the host tools targets like the ${gem_name}.Editor MODULE target
+if(PAL_TRAIT_BUILD_HOST_TOOLS)
+    # The ${gem_name}.Editor.API target can be used by other gems that want to interact with the ${gem_name}.Editor module
+    ly_add_target(
+        NAME ${gem_name}.Editor.API INTERFACE
+        NAMESPACE Gem
+        FILES_CMAKE
+            ros2controllers_editor_api_files.cmake
+            ${pal_dir}/ros2controllers_editor_api_files.cmake
+        INCLUDE_DIRECTORIES
+            INTERFACE
+                Include
+        BUILD_DEPENDENCIES
+            INTERFACE
+                AZ::AzToolsFramework
+    )
+
+    # The ${gem_name}.Editor.Private.Object target is an internal target
+    # which is only to be used by this gems CMakeLists.txt and any subdirectories
+    # Other gems should not use this target
+    ly_add_target(
+        NAME ${gem_name}.Editor.Private.Object STATIC
+        NAMESPACE Gem
+        FILES_CMAKE
+            ros2controllers_editor_private_files.cmake
+        TARGET_PROPERTIES
+            O3DE_PRIVATE_TARGET TRUE
+        INCLUDE_DIRECTORIES
+            PRIVATE
+                Include
+                Source
+        BUILD_DEPENDENCIES
+            PUBLIC
+                AZ::AzToolsFramework
+                ${gem_name}.Private.Object
+    )
+
+    ly_add_target(
+        NAME ${gem_name}.Editor GEM_MODULE
+        NAMESPACE Gem
+        AUTOMOC
+        FILES_CMAKE
+            ros2controllers_editor_shared_files.cmake
+        INCLUDE_DIRECTORIES
+            PRIVATE
+                Source
+            PUBLIC
+                Include
+        BUILD_DEPENDENCIES
+            PUBLIC
+                Gem::${gem_name}.Editor.API
+            PRIVATE
+                Gem::${gem_name}.Editor.Private.Object
+    )
+
+    # Include the gem name into the Editor Module source file
+    # for use with the AZ_DECLARE_MODULE_CLASS macro
+    # This is to allow renaming of the gem to also cause
+    # the CreateModuleClass_Gem_<gem-name> function which
+    # is used to bootstrap the gem in monolithic builds to link to the new gem name
+    ly_add_source_properties(
+    SOURCES
+        Source/Tools/ROS2ControllersEditorModule.cpp
+    PROPERTY COMPILE_DEFINITIONS
+        VALUES
+            O3DE_GEM_NAME=${gem_name}
+            O3DE_GEM_VERSION=${gem_version})
+
+    # By default, we will specify that the above target ${gem_name} would be used by
+    # Tool and Builder type targets when this gem is enabled.  If you don't want it
+    # active in Tools or Builders by default, delete one of both of the following lines:
+    ly_create_alias(NAME ${gem_name}.Tools    NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
+    ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
+
+    # For the Tools and Builders variants of ${gem_name} Gem, an alias to the ${gem_name}.Editor API target will be made
+    ly_create_alias(NAME ${gem_name}.Tools.API NAMESPACE Gem TARGETS Gem::${gem_name}.Editor.API)
+    ly_create_alias(NAME ${gem_name}.Builders.API NAMESPACE Gem TARGETS Gem::${gem_name}.Editor.API)
+
+    # Add in CMake dependencies for each gem dependency listed in this gem's gem.json file
+    # for the Tools and Builders gem variants
+    o3de_add_variant_dependencies_for_gem_dependencies(GEM_NAME ${gem_name} VARIANTS Tools Builders)
+endif()
+
+################################################################################
+# Tests
+################################################################################
+# See if globally, tests are supported
+if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
+    # We globally support tests, see if we support tests on this platform for ${gem_name}.Tests
+    if(PAL_TRAIT_ROS2CONTROLLERS_TEST_SUPPORTED)
+        # We support ${gem_name}.Tests on this platform, add dependency on the Private Object target
+        ly_add_target(
+            NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
+            NAMESPACE Gem
+            FILES_CMAKE
+                ros2controllers_tests_files.cmake
+            INCLUDE_DIRECTORIES
+                PRIVATE
+                    Tests
+                    Source
+                    Include
+            BUILD_DEPENDENCIES
+                PRIVATE
+                    AZ::AzTest
+                    AZ::AzFramework
+                    Gem::${gem_name}.Private.Object
+        )
+
+        # Add ${gem_name}.Tests to googletest
+        ly_add_googletest(
+            NAME Gem::${gem_name}.Tests
+        )
+    endif()
+
+    # If we are a host platform we want to add tools test like editor tests here
+    if(PAL_TRAIT_BUILD_HOST_TOOLS)
+        # We are a host platform, see if Editor tests are supported on this platform
+        if(PAL_TRAIT_ROS2CONTROLLERS_EDITOR_TEST_SUPPORTED)
+            # We support ${gem_name}.Editor.Tests on this platform, add ${gem_name}.Editor.Tests target which depends on
+            # private ${gem_name}.Editor.Private.Object target
+            ly_add_target(
+                NAME ${gem_name}.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
+                NAMESPACE Gem
+                FILES_CMAKE
+                    ros2controllers_editor_tests_files.cmake
+                INCLUDE_DIRECTORIES
+                    PRIVATE
+                        Tests
+                        Source
+                        Include
+                BUILD_DEPENDENCIES
+                    PRIVATE
+                        AZ::AzTest
+                        Gem::${gem_name}.Editor.Private.Object
+            )
+
+            # Add ${gem_name}.Editor.Tests to googletest
+            ly_add_googletest(
+                NAME Gem::${gem_name}.Editor.Tests
+            )
+        endif()
+    endif()
+endif()

+ 0 - 0
Gems/ROS2/Code/Include/ROS2/Utilities/Controllers/PidConfiguration.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Controllers/PidConfiguration.h


+ 0 - 0
Gems/ROS2/Code/Include/ROS2/Gripper/GripperRequestBus.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Gripper/GripperRequestBus.h


+ 1 - 1
Gems/ROS2/Code/Include/ROS2/Manipulation/Controllers/JointsPositionControllerRequests.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/Controllers/JointsPositionControllerRequests.h

@@ -10,7 +10,7 @@
 #include <AzCore/Component/EntityId.h>
 #include <AzCore/Component/EntityId.h>
 #include <AzCore/EBus/EBus.h>
 #include <AzCore/EBus/EBus.h>
 #include <AzCore/std/string/string.h>
 #include <AzCore/std/string/string.h>
-#include <ROS2/Manipulation/JointInfo.h>
+#include <ROS2Controllers/Manipulation/JointInfo.h>
 
 
 namespace ROS2
 namespace ROS2
 {
 {

+ 0 - 0
Gems/ROS2/Code/Include/ROS2/Manipulation/JointInfo.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/JointInfo.h


+ 1 - 1
Gems/ROS2/Code/Include/ROS2/Manipulation/JointsManipulationRequests.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/JointsManipulationRequests.h

@@ -11,7 +11,7 @@
 #include <AzCore/Outcome/Outcome.h>
 #include <AzCore/Outcome/Outcome.h>
 #include <AzCore/std/containers/vector.h>
 #include <AzCore/std/containers/vector.h>
 #include <AzCore/std/string/string.h>
 #include <AzCore/std/string/string.h>
-#include <ROS2/Manipulation/JointInfo.h>
+#include <ROS2Controllers/Manipulation/JointInfo.h>
 
 
 namespace ROS2
 namespace ROS2
 {
 {

+ 2 - 0
Gems/ROS2/Code/Include/ROS2/Manipulation/JointsTrajectoryRequests.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/JointsTrajectoryRequests.h

@@ -14,8 +14,10 @@
 
 
 namespace ROS2
 namespace ROS2
 {
 {
+    // clang-format off
     //! Interface for commanding a system of joints such as robotic arm (manipulator) through FollowJointTrajectory actions.
     //! Interface for commanding a system of joints such as robotic arm (manipulator) through FollowJointTrajectory actions.
     //@see <a href="https://github.com/ros-controls/control_msgs/blob/humble/control_msgs/action/FollowJointTrajectory.action">FollowJointTrajectory</a>
     //@see <a href="https://github.com/ros-controls/control_msgs/blob/humble/control_msgs/action/FollowJointTrajectory.action">FollowJointTrajectory</a>
+    // clang-format on
     class JointsTrajectoryRequests : public AZ::EBusTraits
     class JointsTrajectoryRequests : public AZ::EBusTraits
     {
     {
     public:
     public:

+ 1 - 1
Gems/ROS2/Code/Include/ROS2/Manipulation/MotorizedJoints/JointMotorControllerComponent.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/MotorizedJoints/JointMotorControllerComponent.h

@@ -12,7 +12,7 @@
 #include <AzCore/Component/TickBus.h>
 #include <AzCore/Component/TickBus.h>
 #include <AzCore/Serialization/SerializeContext.h>
 #include <AzCore/Serialization/SerializeContext.h>
 #include <ImGuiBus.h>
 #include <ImGuiBus.h>
-#include <ROS2/Manipulation/MotorizedJoints/JointMotorControllerConfiguration.h>
+#include <ROS2Controllers/Manipulation/MotorizedJoints/JointMotorControllerConfiguration.h>
 #include <builtin_interfaces/msg/time.hpp>
 #include <builtin_interfaces/msg/time.hpp>
 
 
 namespace ROS2
 namespace ROS2

+ 0 - 0
Gems/ROS2/Code/Include/ROS2/Manipulation/MotorizedJoints/JointMotorControllerConfiguration.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/MotorizedJoints/JointMotorControllerConfiguration.h


+ 1 - 1
Gems/ROS2/Code/Include/ROS2/Manipulation/MotorizedJoints/ManualMotorControllerComponent.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/MotorizedJoints/ManualMotorControllerComponent.h

@@ -8,7 +8,7 @@
 #pragma once
 #pragma once
 
 
 #include <AzCore/Serialization/SerializeContext.h>
 #include <AzCore/Serialization/SerializeContext.h>
-#include <ROS2/Manipulation/MotorizedJoints/JointMotorControllerComponent.h>
+#include <ROS2Controllers/Manipulation/MotorizedJoints/JointMotorControllerComponent.h>
 
 
 namespace ROS2
 namespace ROS2
 {
 {

+ 0 - 0
Gems/ROS2/Code/Include/ROS2/Manipulation/MotorizedJoints/PidMotorControllerBus.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/MotorizedJoints/PidMotorControllerBus.h


+ 3 - 3
Gems/ROS2/Code/Include/ROS2/Manipulation/MotorizedJoints/PidMotorControllerComponent.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/Manipulation/MotorizedJoints/PidMotorControllerComponent.h

@@ -9,9 +9,9 @@
 
 
 #include <AzCore/Serialization/SerializeContext.h>
 #include <AzCore/Serialization/SerializeContext.h>
 #include <AzFramework/Entity/EntityDebugDisplayBus.h>
 #include <AzFramework/Entity/EntityDebugDisplayBus.h>
-#include <ROS2/Manipulation/MotorizedJoints/JointMotorControllerComponent.h>
-#include <ROS2/Manipulation/MotorizedJoints/PidMotorControllerBus.h>
-#include <ROS2/Utilities/Controllers/PidConfiguration.h>
+#include <ROS2Controllers/Controllers/PidConfiguration.h>
+#include <ROS2Controllers/Manipulation/MotorizedJoints/JointMotorControllerComponent.h>
+#include <ROS2Controllers/Manipulation/MotorizedJoints/PidMotorControllerBus.h>
 
 
 namespace ROS2
 namespace ROS2
 {
 {

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

@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root
+ * of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
+
+#pragma once
+
+namespace ROS2Controllers
+{
+    // System Component TypeIds
+    inline constexpr const char* ROS2ControllersSystemComponentTypeId = "{D9A7C3B8-383C-4225-B529-1DAF1B2720F0}";
+    inline constexpr const char* ROS2ControllersEditorSystemComponentTypeId = "{F72C1A7F-EC8F-4503-B353-B8D4A41E4E4E}";
+
+    // Module derived classes TypeIds
+    inline constexpr const char* ROS2ControllersModuleInterfaceTypeId = "{CFEFB216-071E-4732-8871-5E10E6064AB3}";
+    inline constexpr const char* ROS2ControllersModuleTypeId = "{B5535E60-9AB5-46E0-97E1-3375DAFA2DC9}";
+    // The Editor Module by default is mutually exclusive with the Client Module
+    // so they use the Same TypeId
+    inline constexpr const char* ROS2ControllersEditorModuleTypeId = ROS2ControllersModuleTypeId;
+
+    // Interface TypeIds
+    inline constexpr const char* ROS2ControllersRequestsTypeId = "{2E0AB230-743E-4BCA-8194-D1BC7C9341EA}";
+
+    // Controllers Components TypeIds
+    inline constexpr const char* FingerGripperComponentTypeId = "{AE5F8EC2-26EE-11EE-BE56-0242AC120002}";
+    inline constexpr const char* GripperActionServerComponentTypeId = "{6A4417AC-1D85-4AB0-A116-1E77D40FC816}";
+    inline constexpr const char* VacuumGripperComponentTypeId = "{A29EB4FA-0F6F-11EE-BE56-0242AC120002}";
+    inline constexpr const char* JointsArticulationControllerComponentTypeId = "{243E9F07-5F84-4F83-9E6D-D1DA04D7CEF9}";
+    inline constexpr const char* JointsPIDControllerComponentTypeId = "{41A31EDB-90B0-412E-BBFA-D35D45546A8E}";
+    inline constexpr const char* JointsManipulationComponentTypeId = "{3DA9ABFC-0028-4E3E-8D04-4E4440D2E319}";
+    inline constexpr const char* JointsManipulationEditorComponentTypeId = "{BF2F77FD-92FB-4730-92C7-DDEE54F508BF}";
+    inline constexpr const char* JointsPositionsComponentTypeId = "{21335907-767E-4B2C-81C0-6F0B410B6D87}";
+    inline constexpr const char* JointsPositionsEditorComponentTypeId = "{6FEF3251-F910-4BF7-A4E6-1CF4F73DAAf8}";
+    inline constexpr const char* JointsTrajectoryComponentTypeId = "{429DE04C-6B6D-4B2D-9D6C-3681F23CBF90}";
+
+} // namespace ROS2Controllers

+ 0 - 0
Gems/ROS2/Code/Include/ROS2/RobotControl/Ackermann/AckermannBus.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/RobotControl/Ackermann/AckermannBus.h


+ 0 - 0
Gems/ROS2/Code/Include/ROS2/RobotControl/Ackermann/AckermannCommandStruct.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/RobotControl/Ackermann/AckermannCommandStruct.h


+ 0 - 0
Gems/ROS2/Code/Include/ROS2/RobotControl/ControlConfiguration.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/RobotControl/ControlConfiguration.h


+ 0 - 0
Gems/ROS2/Code/Include/ROS2/RobotControl/ControlSubscriptionHandler.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/RobotControl/ControlSubscriptionHandler.h


+ 0 - 0
Gems/ROS2/Code/Include/ROS2/RobotControl/Twist/TwistBus.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/RobotControl/Twist/TwistBus.h


+ 0 - 0
Gems/ROS2/Code/Include/ROS2/VehicleDynamics/VehicleInputControlBus.h → Gems/ROS2Controllers/Code/Include/ROS2Controllers/VehicleDynamics/VehicleInputControlBus.h


+ 11 - 0
Gems/ROS2Controllers/Code/Platform/Android/PAL_android.cmake

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

+ 10 - 0
Gems/ROS2Controllers/Code/Platform/Android/ros2controllers_api_files.cmake

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

+ 15 - 0
Gems/ROS2Controllers/Code/Platform/Android/ros2controllers_private_files.cmake

@@ -0,0 +1,15 @@
+#
+# 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
+#
+#
+
+# Platform specific files for Android
+# i.e. ../Source/Android/ROS2ControllersAndroid.cpp
+#      ../Source/Android/ROS2ControllersAndroid.h
+#      ../Include/Android/ROS2ControllersAndroid.h
+
+set(FILES
+)

+ 15 - 0
Gems/ROS2Controllers/Code/Platform/Android/ros2controllers_shared_files.cmake

@@ -0,0 +1,15 @@
+#
+# 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
+#
+#
+
+# Platform specific files for Android
+# i.e. ../Source/Android/ROS2ControllersAndroid.cpp
+#      ../Source/Android/ROS2ControllersAndroid.h
+#      ../Include/Android/ROS2ControllersAndroid.h
+
+set(FILES
+)

+ 11 - 0
Gems/ROS2Controllers/Code/Platform/Linux/PAL_linux.cmake

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

+ 10 - 0
Gems/ROS2Controllers/Code/Platform/Linux/ros2controllers_api_files.cmake

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

+ 10 - 0
Gems/ROS2Controllers/Code/Platform/Linux/ros2controllers_editor_api_files.cmake

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

+ 15 - 0
Gems/ROS2Controllers/Code/Platform/Linux/ros2controllers_private_files.cmake

@@ -0,0 +1,15 @@
+#
+# 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
+#
+#
+
+# Platform specific files for Linux
+# i.e. ../Source/Linux/ROS2ControllersLinux.cpp
+#      ../Source/Linux/ROS2ControllersLinux.h
+#      ../Include/Linux/ROS2ControllersLinux.h
+
+set(FILES
+)

+ 15 - 0
Gems/ROS2Controllers/Code/Platform/Linux/ros2controllers_shared_files.cmake

@@ -0,0 +1,15 @@
+#
+# 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
+#
+#
+
+# Platform specific files for Linux
+# i.e. ../Source/Linux/ROS2ControllersLinux.cpp
+#      ../Source/Linux/ROS2ControllersLinux.h
+#      ../Include/Linux/ROS2ControllersLinux.h
+
+set(FILES
+)

+ 11 - 0
Gems/ROS2Controllers/Code/Platform/Mac/PAL_mac.cmake

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

+ 10 - 0
Gems/ROS2Controllers/Code/Platform/Mac/ros2controllers_api_files.cmake

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

+ 10 - 0
Gems/ROS2Controllers/Code/Platform/Mac/ros2controllers_editor_api_files.cmake

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

+ 15 - 0
Gems/ROS2Controllers/Code/Platform/Mac/ros2controllers_private_files.cmake

@@ -0,0 +1,15 @@
+#
+# 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
+#
+#
+
+# Platform specific files for Mac
+# i.e. ../Source/Mac/ROS2ControllersMac.cpp
+#      ../Source/Mac/ROS2ControllersMac.h
+#      ../Include/Mac/ROS2ControllersMac.h
+
+set(FILES
+)

+ 15 - 0
Gems/ROS2Controllers/Code/Platform/Mac/ros2controllers_shared_files.cmake

@@ -0,0 +1,15 @@
+#
+# 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
+#
+#
+
+# Platform specific files for Mac
+# i.e. ../Source/Mac/ROS2ControllersMac.cpp
+#      ../Source/Mac/ROS2ControllersMac.h
+#      ../Include/Mac/ROS2ControllersMac.h
+
+set(FILES
+)

+ 11 - 0
Gems/ROS2Controllers/Code/Platform/Windows/PAL_windows.cmake

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

+ 10 - 0
Gems/ROS2Controllers/Code/Platform/Windows/ros2controllers_api_files.cmake

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

+ 10 - 0
Gems/ROS2Controllers/Code/Platform/Windows/ros2controllers_editor_api_files.cmake

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

+ 15 - 0
Gems/ROS2Controllers/Code/Platform/Windows/ros2controllers_private_files.cmake

@@ -0,0 +1,15 @@
+#
+# 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
+#
+#
+
+# Platform specific files for Windows
+# i.e. ../Source/Windows/ROS2ControllersWindows.cpp
+#      ../Source/Windows/ROS2ControllersWindows.h
+#      ../Include/Windows/ROS2ControllersWindows.h
+
+set(FILES
+)

+ 15 - 0
Gems/ROS2Controllers/Code/Platform/Windows/ros2controllers_shared_files.cmake

@@ -0,0 +1,15 @@
+#
+# 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
+#
+#
+
+# Platform specific files for Windows
+# i.e. ../Source/Windows/ROS2ControllersWindows.cpp
+#      ../Source/Windows/ROS2ControllersWindows.h
+#      ../Include/Windows/ROS2ControllersWindows.h
+
+set(FILES
+)

+ 11 - 0
Gems/ROS2Controllers/Code/Platform/iOS/PAL_ios.cmake

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

+ 10 - 0
Gems/ROS2Controllers/Code/Platform/iOS/ros2controllers_api_files.cmake

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

+ 15 - 0
Gems/ROS2Controllers/Code/Platform/iOS/ros2controllers_private_files.cmake

@@ -0,0 +1,15 @@
+#
+# 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
+#
+#
+
+# Platform specific files for iOS
+# i.e. ../Source/iOS/ROS2ControllersiOS.cpp
+#      ../Source/iOS/ROS2ControllersiOS.h
+#      ../Include/iOS/ROS2ControllersiOS.h
+
+set(FILES
+)

+ 15 - 0
Gems/ROS2Controllers/Code/Platform/iOS/ros2controllers_shared_files.cmake

@@ -0,0 +1,15 @@
+#
+# 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
+#
+#
+
+# Platform specific files for iOS
+# i.e. ../Source/iOS/ROS2ControllersiOS.cpp
+#      ../Source/iOS/ROS2ControllersiOS.h
+#      ../Include/iOS/ROS2ControllersiOS.h
+
+set(FILES
+)

+ 28 - 0
Gems/ROS2Controllers/Code/Source/Clients/ROS2ControllersModule.cpp

@@ -0,0 +1,28 @@
+/*
+ * 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 "ROS2ControllersSystemComponent.h"
+#include <ROS2Controllers/ROS2ControllersTypeIds.h>
+#include <ROS2ControllersModuleInterface.h>
+
+namespace ROS2Controllers
+{
+    class ROS2ControllersModule : public ROS2ControllersModuleInterface
+    {
+    public:
+        AZ_RTTI(ROS2ControllersModule, ROS2ControllersModuleTypeId, ROS2ControllersModuleInterface);
+        AZ_CLASS_ALLOCATOR(ROS2ControllersModule, AZ::SystemAllocator);
+    };
+} // namespace ROS2Controllers
+
+#if defined(O3DE_GEM_NAME)
+AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), ROS2Controllers::ROS2ControllersModule)
+#else
+AZ_DECLARE_MODULE_CLASS(Gem_ROS2Controllers, ROS2Controllers::ROS2ControllersModule)
+#endif

+ 51 - 0
Gems/ROS2Controllers/Code/Source/Clients/ROS2ControllersSystemComponent.cpp

@@ -0,0 +1,51 @@
+/*
+ * 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 "ROS2ControllersSystemComponent.h"
+
+#include <ROS2Controllers/ROS2ControllersTypeIds.h>
+
+#include <AzCore/Serialization/SerializeContext.h>
+#include <ROS2Controllers/Controllers/PidConfiguration.h>
+#include <VehicleDynamics/VehicleModelComponent.h>
+
+namespace ROS2Controllers
+{
+    AZ_COMPONENT_IMPL(ROS2ControllersSystemComponent, "ROS2ControllersSystemComponent", ROS2ControllersSystemComponentTypeId);
+
+    void ROS2ControllersSystemComponent::Reflect(AZ::ReflectContext* context)
+    {
+        // Reflect structs not strictly owned by any single component
+        ROS2::Controllers::PidConfiguration::Reflect(context);
+        ROS2::VehicleDynamics::VehicleModelComponent::Reflect(context);
+
+        if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
+        {
+            serializeContext->Class<ROS2ControllersSystemComponent, AZ::Component>()->Version(0);
+        }
+    }
+
+    void ROS2ControllersSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
+    {
+        provided.push_back(AZ_CRC_CE("ROS2ControllersService"));
+    }
+
+    void ROS2ControllersSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
+    {
+        incompatible.push_back(AZ_CRC_CE("ROS2ControllersService"));
+    }
+
+    void ROS2ControllersSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
+    {
+    }
+
+    void ROS2ControllersSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
+    {
+    }
+} // namespace ROS2Controllers

+ 40 - 0
Gems/ROS2Controllers/Code/Source/Clients/ROS2ControllersSystemComponent.h

@@ -0,0 +1,40 @@
+/*
+ * 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/Component.h>
+
+namespace ROS2Controllers
+{
+    class ROS2ControllersSystemComponent
+        : public AZ::Component
+    {
+    public:
+        AZ_COMPONENT_DECL(ROS2ControllersSystemComponent);
+
+        static void Reflect(AZ::ReflectContext* context);
+
+        static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
+        static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
+        static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
+        static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
+
+        ROS2ControllersSystemComponent() = default;
+        ~ROS2ControllersSystemComponent() = default;
+
+    protected:
+        ////////////////////////////////////////////////////////////////////////
+        // AZ::Component interface implementation
+        void Activate() override {};
+        void Deactivate() override {};
+        ////////////////////////////////////////////////////////////////////////
+    };
+
+} // namespace ROS2Controllers

+ 1 - 1
Gems/ROS2/Code/Source/Gripper/FingerGripperComponent.cpp → Gems/ROS2Controllers/Code/Source/Gripper/FingerGripperComponent.cpp

@@ -15,7 +15,7 @@
 
 
 #include <AzFramework/Physics/PhysicsSystem.h>
 #include <AzFramework/Physics/PhysicsSystem.h>
 #include <ROS2/Frame/ROS2FrameComponent.h>
 #include <ROS2/Frame/ROS2FrameComponent.h>
-#include <ROS2/Manipulation/JointsManipulationRequests.h>
+#include <ROS2Controllers/Manipulation/JointsManipulationRequests.h>
 #include <Utilities/JointUtilities.h>
 #include <Utilities/JointUtilities.h>
 #include <imgui/imgui.h>
 #include <imgui/imgui.h>
 
 

+ 4 - 3
Gems/ROS2/Code/Source/Gripper/FingerGripperComponent.h → Gems/ROS2Controllers/Code/Source/Gripper/FingerGripperComponent.h

@@ -12,8 +12,9 @@
 #include <AzCore/Component/TickBus.h>
 #include <AzCore/Component/TickBus.h>
 #include <AzFramework/Physics/Common/PhysicsEvents.h>
 #include <AzFramework/Physics/Common/PhysicsEvents.h>
 #include <ImGuiBus.h>
 #include <ImGuiBus.h>
-#include <ROS2/Gripper/GripperRequestBus.h>
-#include <ROS2/Manipulation/JointsManipulationRequests.h>
+#include <ROS2Controllers/Gripper/GripperRequestBus.h>
+#include <ROS2Controllers/Manipulation/JointsManipulationRequests.h>
+#include <ROS2Controllers/ROS2ControllersTypeIds.h>
 #include <Utilities/ArticulationsUtilities.h>
 #include <Utilities/ArticulationsUtilities.h>
 
 
 namespace ROS2
 namespace ROS2
@@ -26,7 +27,7 @@ namespace ROS2
         , public AZ::TickBus::Handler
         , public AZ::TickBus::Handler
     {
     {
     public:
     public:
-        AZ_COMPONENT(FingerGripperComponent, "{ae5f8ec2-26ee-11ee-be56-0242ac120002}", AZ::Component);
+        AZ_COMPONENT(FingerGripperComponent, ROS2Controllers::FingerGripperComponentTypeId, AZ::Component);
         FingerGripperComponent() = default;
         FingerGripperComponent() = default;
         ~FingerGripperComponent() = default;
         ~FingerGripperComponent() = default;
 
 

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


+ 1 - 1
Gems/ROS2/Code/Source/Gripper/GripperActionServer.h → Gems/ROS2Controllers/Code/Source/Gripper/GripperActionServer.h

@@ -10,7 +10,7 @@
 
 
 #include <AzCore/Component/Component.h>
 #include <AzCore/Component/Component.h>
 #include <AzCore/Component/TickBus.h>
 #include <AzCore/Component/TickBus.h>
-#include <ROS2/Gripper/GripperRequestBus.h>
+#include <ROS2Controllers/Gripper/GripperRequestBus.h>
 #include <control_msgs/action/gripper_command.hpp>
 #include <control_msgs/action/gripper_command.hpp>
 #include <rclcpp/rclcpp.hpp>
 #include <rclcpp/rclcpp.hpp>
 #include <rclcpp_action/rclcpp_action.hpp>
 #include <rclcpp_action/rclcpp_action.hpp>

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


+ 3 - 2
Gems/ROS2/Code/Source/Gripper/GripperActionServerComponent.h → Gems/ROS2Controllers/Code/Source/Gripper/GripperActionServerComponent.h

@@ -11,7 +11,8 @@
 #include "GripperActionServer.h"
 #include "GripperActionServer.h"
 #include <AzCore/Component/Component.h>
 #include <AzCore/Component/Component.h>
 #include <AzCore/Component/TickBus.h>
 #include <AzCore/Component/TickBus.h>
-#include <ROS2/Gripper/GripperRequestBus.h>
+#include <ROS2Controllers/Gripper/GripperRequestBus.h>
+#include <ROS2Controllers/ROS2ControllersTypeIds.h>
 #include <control_msgs/action/gripper_command.hpp>
 #include <control_msgs/action/gripper_command.hpp>
 #include <rclcpp/rclcpp.hpp>
 #include <rclcpp/rclcpp.hpp>
 
 
@@ -26,7 +27,7 @@ namespace ROS2
     public:
     public:
         using GripperCommand = control_msgs::action::GripperCommand;
         using GripperCommand = control_msgs::action::GripperCommand;
         using GoalHandleGripperCommand = rclcpp_action::ServerGoalHandle<control_msgs::action::GripperCommand>;
         using GoalHandleGripperCommand = rclcpp_action::ServerGoalHandle<control_msgs::action::GripperCommand>;
-        AZ_COMPONENT(GripperActionServerComponent, "{6A4417AC-1D85-4AB0-A116-1E77D40FC816}", AZ::Component);
+        AZ_COMPONENT(GripperActionServerComponent, ROS2Controllers::GripperActionServerComponentTypeId, AZ::Component);
         GripperActionServerComponent() = default;
         GripperActionServerComponent() = default;
         ~GripperActionServerComponent() = default;
         ~GripperActionServerComponent() = default;
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);

+ 0 - 0
Gems/ROS2/Code/Source/Gripper/VacuumGripperComponent.cpp → Gems/ROS2Controllers/Code/Source/Gripper/VacuumGripperComponent.cpp


+ 3 - 2
Gems/ROS2/Code/Source/Gripper/VacuumGripperComponent.h → Gems/ROS2Controllers/Code/Source/Gripper/VacuumGripperComponent.h

@@ -16,7 +16,8 @@
 #include <AzFramework/Physics/RigidBodyBus.h>
 #include <AzFramework/Physics/RigidBodyBus.h>
 #include <ImGuiBus.h>
 #include <ImGuiBus.h>
 #include <LmbrCentral/Scripting/TagComponentBus.h>
 #include <LmbrCentral/Scripting/TagComponentBus.h>
-#include <ROS2/Gripper/GripperRequestBus.h>
+#include <ROS2Controllers/Gripper/GripperRequestBus.h>
+#include <ROS2Controllers/ROS2ControllersTypeIds.h>
 
 
 namespace ROS2
 namespace ROS2
 {
 {
@@ -34,7 +35,7 @@ namespace ROS2
     {
     {
     public:
     public:
         static constexpr AZ::Crc32 GrippableTag = AZ_CRC_CE("Grippable");
         static constexpr AZ::Crc32 GrippableTag = AZ_CRC_CE("Grippable");
-        AZ_COMPONENT(VacuumGripperComponent, "{a29eb4fa-0f6f-11ee-be56-0242ac120002}", AZ::Component);
+        AZ_COMPONENT(VacuumGripperComponent, ROS2Controllers::VacuumGripperComponentTypeId, AZ::Component);
         VacuumGripperComponent() = default;
         VacuumGripperComponent() = default;
         ~VacuumGripperComponent() = default;
         ~VacuumGripperComponent() = default;
 
 

+ 4 - 3
Gems/ROS2/Code/Source/Manipulation/Controllers/JointsArticulationControllerComponent.cpp → Gems/ROS2Controllers/Code/Source/Manipulation/Controllers/JointsArticulationControllerComponent.cpp

@@ -31,8 +31,8 @@ namespace ROS2
     {
     {
         if (!joint.m_isArticulation)
         if (!joint.m_isArticulation)
         {
         {
-            return AZ::Failure(AZStd::string::format(
-                "Joint %s is not an articulation link, use JointsPIDControllerComponent instead", jointName.c_str()));
+            return AZ::Failure(
+                AZStd::string::format("Joint %s is not an articulation link, use JointsPIDControllerComponent instead", jointName.c_str()));
         }
         }
 
 
         PhysX::ArticulationJointRequestBus::Event(
         PhysX::ArticulationJointRequestBus::Event(
@@ -69,7 +69,8 @@ namespace ROS2
                     ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game"))
                     ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game"))
                     ->Attribute(AZ::Edit::Attributes::Category, "ROS2")
                     ->Attribute(AZ::Edit::Attributes::Category, "ROS2")
                     ->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/JointsArticulationControllerComponent.svg")
                     ->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/JointsArticulationControllerComponent.svg")
-                    ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Editor/Icons/Components/Viewport/JointsArticulationControllerComponent.svg");
+                    ->Attribute(
+                        AZ::Edit::Attributes::ViewportIcon, "Editor/Icons/Components/Viewport/JointsArticulationControllerComponent.svg");
             }
             }
         }
         }
     }
     }

+ 3 - 2
Gems/ROS2/Code/Source/Manipulation/Controllers/JointsArticulationControllerComponent.h → Gems/ROS2Controllers/Code/Source/Manipulation/Controllers/JointsArticulationControllerComponent.h

@@ -9,7 +9,8 @@
 #pragma once
 #pragma once
 
 
 #include <AzCore/Component/Component.h>
 #include <AzCore/Component/Component.h>
-#include <ROS2/Manipulation/Controllers/JointsPositionControllerRequests.h>
+#include <ROS2Controllers/Manipulation/Controllers/JointsPositionControllerRequests.h>
+#include <ROS2Controllers/ROS2ControllersTypeIds.h>
 
 
 namespace ROS2
 namespace ROS2
 {
 {
@@ -21,7 +22,7 @@ namespace ROS2
     public:
     public:
         JointsArticulationControllerComponent() = default;
         JointsArticulationControllerComponent() = default;
         ~JointsArticulationControllerComponent() = default;
         ~JointsArticulationControllerComponent() = default;
-        AZ_COMPONENT(JointsArticulationControllerComponent, "{243E9F07-5F84-4F83-9E6D-D1DA04D7CEF9}", AZ::Component);
+        AZ_COMPONENT(JointsArticulationControllerComponent, ROS2Controllers::JointsArticulationControllerComponentTypeId, AZ::Component);
 
 
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
         static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
         static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);

+ 5 - 7
Gems/ROS2/Code/Source/Manipulation/Controllers/JointsPIDControllerComponent.cpp → Gems/ROS2Controllers/Code/Source/Manipulation/Controllers/JointsPIDControllerComponent.cpp

@@ -32,16 +32,14 @@ namespace ROS2
     }
     }
 
 
     AZ::Outcome<void, AZStd::string> JointsPIDControllerComponent::PositionControl(
     AZ::Outcome<void, AZStd::string> JointsPIDControllerComponent::PositionControl(
-        const AZStd::string& jointName,
-        JointInfo joint,
-        JointPosition currentPosition,
-        JointPosition targetPosition,
-        float deltaTime)
+        const AZStd::string& jointName, JointInfo joint, JointPosition currentPosition, JointPosition targetPosition, float deltaTime)
     {
     {
         if (joint.m_isArticulation)
         if (joint.m_isArticulation)
         {
         {
-            return AZ::Failure(AZStd::string::format("Joint %s is articulation link, JointsPIDControllerComponent only handles classic Hinge joints. Use "
-                               "JointsArticulationControllerComponent instead", jointName.c_str()));
+            return AZ::Failure(AZStd::string::format(
+                "Joint %s is articulation link, JointsPIDControllerComponent only handles classic Hinge joints. Use "
+                "JointsArticulationControllerComponent instead",
+                jointName.c_str()));
         }
         }
 
 
         bool jointPIDdefined = m_pidConfiguration.find(jointName) != m_pidConfiguration.end();
         bool jointPIDdefined = m_pidConfiguration.find(jointName) != m_pidConfiguration.end();

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác