From c9134eb2d9e9975b7123ce0d76f35e5121ea71ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pe=C5=82ka?= Date: Thu, 19 Mar 2026 17:19:54 +0100 Subject: [PATCH 1/4] mp/scripttools/2605 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Pełka --- .../Code/Source/Clients/PublisherSystemComponent.cpp | 1 + .../Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.h | 3 --- .../Code/Source/Clients/SubscriberSystemComponent.h | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.cpp b/Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.cpp index 4422a46f..ab804883 100644 --- a/Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.cpp +++ b/Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.h b/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.h index abc1a76b..9e48fc79 100644 --- a/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.h +++ b/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.h @@ -5,10 +5,7 @@ #include "rclcpp/rclcpp.hpp" #include #include -#include #include - -#include #include #include #include diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Clients/SubscriberSystemComponent.h b/Gems/ROS2ScriptIntegration/Code/Source/Clients/SubscriberSystemComponent.h index c2f35aee..e065ef58 100644 --- a/Gems/ROS2ScriptIntegration/Code/Source/Clients/SubscriberSystemComponent.h +++ b/Gems/ROS2ScriptIntegration/Code/Source/Clients/SubscriberSystemComponent.h @@ -6,6 +6,8 @@ #include #include #include +#include +#include #include #include #include From 5aae09bef157d38fd1e2305db82e96719b25eae3 Mon Sep 17 00:00:00 2001 From: Jan Hanca Date: Tue, 24 Mar 2026 15:04:16 +0100 Subject: [PATCH 2/4] Remove unused files Signed-off-by: Jan Hanca --- .../ROS2ScriptIntegrationBus.h | 32 -------- .../ROS2ScriptIntegrationTypeIds.h | 16 ++-- .../ROS2ScriptPublisherBus.h | 4 +- .../ROS2ScriptSubscriberBus.h | 6 +- .../Clients/PublisherSystemComponent.cpp | 1 + .../Source/Clients/PublisherSystemComponent.h | 6 -- .../Clients/ROS2ScriptIntegrationModule.cpp | 1 - .../ROS2ScriptIntegrationSystemComponent.cpp | 76 ------------------- .../ROS2ScriptIntegrationSystemComponent.h | 45 ----------- .../Clients/SubscriberSystemComponent.cpp | 1 + .../Clients/SubscriberSystemComponent.h | 2 - .../ROS2ScriptIntegrationModuleInterface.cpp | 3 - .../ROS2ScriptIntegrationEditorModule.cpp | 3 - ...ScriptIntegrationEditorSystemComponent.cpp | 66 ---------------- ...S2ScriptIntegrationEditorSystemComponent.h | 35 --------- .../ros2scriptintegration_api_files.cmake | 1 - ...riptintegration_editor_private_files.cmake | 2 - .../ros2scriptintegration_private_files.cmake | 2 - Gems/ROS2ScriptIntegration/gem.json | 2 +- README.md | 4 +- 20 files changed, 19 insertions(+), 289 deletions(-) delete mode 100644 Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptIntegrationBus.h delete mode 100644 Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.cpp delete mode 100644 Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.h delete mode 100644 Gems/ROS2ScriptIntegration/Code/Source/Tools/ROS2ScriptIntegrationEditorSystemComponent.cpp delete mode 100644 Gems/ROS2ScriptIntegration/Code/Source/Tools/ROS2ScriptIntegrationEditorSystemComponent.h diff --git a/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptIntegrationBus.h b/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptIntegrationBus.h deleted file mode 100644 index 26955082..00000000 --- a/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptIntegrationBus.h +++ /dev/null @@ -1,32 +0,0 @@ - -#pragma once - -#include - -#include -#include - -namespace ROS2ScriptIntegration -{ - class ROS2ScriptIntegrationRequests - { - public: - AZ_RTTI(ROS2ScriptIntegrationRequests, ROS2ScriptIntegrationRequestsTypeId); - virtual ~ROS2ScriptIntegrationRequests() = default; - // Put your public methods here - }; - - class ROS2ScriptIntegrationBusTraits : public AZ::EBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - ////////////////////////////////////////////////////////////////////////// - }; - - using ROS2ScriptIntegrationRequestBus = AZ::EBus; - using ROS2ScriptIntegrationInterface = AZ::Interface; - -} // namespace ROS2ScriptIntegration diff --git a/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptIntegrationTypeIds.h b/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptIntegrationTypeIds.h index 584940c2..3b6ab1ea 100644 --- a/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptIntegrationTypeIds.h +++ b/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptIntegrationTypeIds.h @@ -3,10 +3,6 @@ namespace ROS2ScriptIntegration { - // System Component TypeIds - inline constexpr const char* ROS2ScriptIntegrationSystemComponentTypeId = "{9F27705B-7F94-47D6-BC9D-67C1541A68E2}"; - inline constexpr const char* ROS2ScriptIntegrationEditorSystemComponentTypeId = "{60221622-30B3-4561-A082-9E306D2D252A}"; - // Module derived classes TypeIds inline constexpr const char* ROS2ScriptIntegrationModuleInterfaceTypeId = "{30EAAB05-7D98-4B7D-A461-8E5EEAF24F6A}"; inline constexpr const char* ROS2ScriptIntegrationModuleTypeId = "{2BE7A2BA-862D-42F0-B4F4-8C4746C08632}"; @@ -14,12 +10,14 @@ namespace ROS2ScriptIntegration // so they use the Same TypeId inline constexpr const char* ROS2ScriptIntegrationEditorModuleTypeId = ROS2ScriptIntegrationModuleTypeId; - inline constexpr const char* PublisherSystemComponentTypeId = "{6ee12dfa-5a6c-4223-b067-f798d9127840}"; - inline constexpr const char* SubscriberSystemComponentTypeId = "{a30c445b-9a51-4036-871d-9f3b2917de58}"; - inline constexpr const char* PublisherEditorSystemComponentTypeId = "{e31ac401-f40e-442a-8072-19d6c1f523f2}"; - inline constexpr const char* SubscriberEditorSystemComponentTypeId = "{f4dba5a4-23da-463a-8d20-5866e897366f}"; + inline constexpr const char* PublisherSystemComponentTypeId = "{6EE12DFA-5A6C-4223-B067-F798D9127840}"; + inline constexpr const char* SubscriberSystemComponentTypeId = "{A30C445B-9A51-4036-871D-9F3B2917DE58}"; + inline constexpr const char* PublisherEditorSystemComponentTypeId = "{E31AC401-F40E-442A-8072-19D6C1F523F2}"; + inline constexpr const char* SubscriberEditorSystemComponentTypeId = "{F4DBA5A4-23DA-463A-8D20-5866E897366F}"; // Interface TypeIds - inline constexpr const char* ROS2ScriptIntegrationRequestsTypeId = "{BF116726-F2D1-44A2-ADE9-FB0047E6749D}"; + inline constexpr const char* ROS2ScriptPublisherRequestsTypeId = "{B8356874-F7BA-4436-8D98-A342D7C720D9}"; + inline constexpr const char* ROS2ScriptSubscriberRequestsTypeId = "{71935101-17DE-4636-97F8-DEA68938706D}"; + inline constexpr const char* ROS2ScriptSubscriberNotificationsTypeId = "{A64EBBC0-3C6E-44F5-8A58-EA921AFA1C15}"; } // namespace ROS2ScriptIntegration diff --git a/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptPublisherBus.h b/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptPublisherBus.h index 2e925a0f..63c98075 100644 --- a/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptPublisherBus.h +++ b/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptPublisherBus.h @@ -1,5 +1,7 @@ #pragma once +#include "ROS2ScriptIntegrationTypeIds.h" + #include #include #include @@ -22,7 +24,7 @@ namespace ROS2ScriptIntegration class PublisherRequests : public AZ::EBusTraits { public: - AZ_RTTI(PublisherRequests, "{b8356874-f7ba-4436-8d98-a342d7c720d9}"); + AZ_RTTI(PublisherRequests, ROS2ScriptPublisherRequestsTypeId); static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; virtual void PublishStdMsgString(const AZStd::string& topicName, const AZStd::string& value) = 0; diff --git a/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptSubscriberBus.h b/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptSubscriberBus.h index 463c4bd1..f2a7e1bc 100644 --- a/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptSubscriberBus.h +++ b/Gems/ROS2ScriptIntegration/Code/Include/ROS2ScriptIntegration/ROS2ScriptSubscriberBus.h @@ -1,5 +1,7 @@ #pragma once +#include "ROS2ScriptIntegrationTypeIds.h" + #include #include #include @@ -27,7 +29,7 @@ namespace ROS2ScriptIntegration class SubscriberRequests : public AZ::EBusTraits { public: - AZ_RTTI(SubscriberRequests, "{71935101-17de-4636-97f8-dea68938706d}"); + AZ_RTTI(SubscriberRequests, ROS2ScriptSubscriberRequestsTypeId); static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; @@ -51,7 +53,7 @@ namespace ROS2ScriptIntegration class SubscriberNotifications : public AZ::EBusTraits { public: - AZ_RTTI(SubscriberNotifications, "{a64ebbc0-3c6e-44f5-8a58-ea921afa1c15}"); + AZ_RTTI(SubscriberNotifications, ROS2ScriptSubscriberNotificationsTypeId); using BusIdType = AZStd::string; static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.cpp b/Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.cpp index ab804883..1beb2a86 100644 --- a/Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.cpp +++ b/Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.h b/Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.h index ff6748c7..2612a047 100644 --- a/Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.h +++ b/Gems/ROS2ScriptIntegration/Code/Source/Clients/PublisherSystemComponent.h @@ -4,13 +4,7 @@ #include "rclcpp/publisher.hpp" #include "rclcpp/rclcpp.hpp" #include -#include -#include -#include -#include -#include #include -#include namespace ROS2ScriptIntegration { diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationModule.cpp b/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationModule.cpp index 5caac72f..2b7fc35a 100644 --- a/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationModule.cpp +++ b/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationModule.cpp @@ -1,5 +1,4 @@ -#include "ROS2ScriptIntegrationSystemComponent.h" #include #include diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.cpp b/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.cpp deleted file mode 100644 index 2a47fb54..00000000 --- a/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.cpp +++ /dev/null @@ -1,76 +0,0 @@ - -#include "ROS2ScriptIntegrationSystemComponent.h" -#include -#include - -#include -#include - -namespace ROS2ScriptIntegration -{ - AZ_COMPONENT_IMPL( - ROS2ScriptIntegrationSystemComponent, "ROS2ScriptIntegrationSystemComponent", ROS2ScriptIntegrationSystemComponentTypeId); - - void ROS2ScriptIntegrationSystemComponent::Reflect(AZ::ReflectContext* context) - { - SubscriberNotificationHandler::Reflect(context); - - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class()->Version(0); - } - } - - void ROS2ScriptIntegrationSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC_CE("ROS2ScriptIntegrationService")); - } - - void ROS2ScriptIntegrationSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC_CE("ROS2ScriptIntegrationService")); - } - - void ROS2ScriptIntegrationSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) - { - required.push_back(AZ_CRC_CE("ROS2Service")); - required.push_back(AZ_CRC_CE("ROS2ScriptIntegrationPublisherService")); - required.push_back(AZ_CRC_CE("ROS2ScriptIntegrationSubscriberService")); - } - - void ROS2ScriptIntegrationSystemComponent::GetDependentServices( - [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) - { - } - - ROS2ScriptIntegrationSystemComponent::ROS2ScriptIntegrationSystemComponent() - { - if (ROS2ScriptIntegrationInterface::Get() == nullptr) - { - ROS2ScriptIntegrationInterface::Register(this); - } - } - - ROS2ScriptIntegrationSystemComponent::~ROS2ScriptIntegrationSystemComponent() - { - if (ROS2ScriptIntegrationInterface::Get() == this) - { - ROS2ScriptIntegrationInterface::Unregister(this); - } - } - - void ROS2ScriptIntegrationSystemComponent::Init() - { - } - - void ROS2ScriptIntegrationSystemComponent::Activate() - { - ROS2ScriptIntegrationRequestBus::Handler::BusConnect(); - } - - void ROS2ScriptIntegrationSystemComponent::Deactivate() - { - ROS2ScriptIntegrationRequestBus::Handler::BusDisconnect(); - } - -} // namespace ROS2ScriptIntegration diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.h b/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.h deleted file mode 100644 index 9e48fc79..00000000 --- a/Gems/ROS2ScriptIntegration/Code/Source/Clients/ROS2ScriptIntegrationSystemComponent.h +++ /dev/null @@ -1,45 +0,0 @@ - -#pragma once - -#include "rclcpp/publisher.hpp" -#include "rclcpp/rclcpp.hpp" -#include -#include -#include -#include -#include -#include - -namespace ROS2ScriptIntegration -{ - class ROS2ScriptIntegrationSystemComponent - : public AZ::Component - , protected ROS2ScriptIntegrationRequestBus::Handler - { - public: - AZ_COMPONENT_DECL(ROS2ScriptIntegrationSystemComponent); - - 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); - - ROS2ScriptIntegrationSystemComponent(); - - ~ROS2ScriptIntegrationSystemComponent(); - - protected: - // AZ::Component overrides ... - void Init() override; - - void Activate() override; - - void Deactivate() override; - }; - -} // namespace ROS2ScriptIntegration diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Clients/SubscriberSystemComponent.cpp b/Gems/ROS2ScriptIntegration/Code/Source/Clients/SubscriberSystemComponent.cpp index 6dd46c3c..70d96497 100644 --- a/Gems/ROS2ScriptIntegration/Code/Source/Clients/SubscriberSystemComponent.cpp +++ b/Gems/ROS2ScriptIntegration/Code/Source/Clients/SubscriberSystemComponent.cpp @@ -28,6 +28,7 @@ namespace ROS2ScriptIntegration void SubscriberSystemComponent::Reflect(AZ::ReflectContext* context) { SubscriberRequests::Reflect(context); + SubscriberNotificationHandler::Reflect(context); if (auto serializeContext = azrtti_cast(context)) { diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Clients/SubscriberSystemComponent.h b/Gems/ROS2ScriptIntegration/Code/Source/Clients/SubscriberSystemComponent.h index e065ef58..b1861464 100644 --- a/Gems/ROS2ScriptIntegration/Code/Source/Clients/SubscriberSystemComponent.h +++ b/Gems/ROS2ScriptIntegration/Code/Source/Clients/SubscriberSystemComponent.h @@ -8,8 +8,6 @@ #include #include #include -#include -#include #include namespace ROS2ScriptIntegration diff --git a/Gems/ROS2ScriptIntegration/Code/Source/ROS2ScriptIntegrationModuleInterface.cpp b/Gems/ROS2ScriptIntegration/Code/Source/ROS2ScriptIntegrationModuleInterface.cpp index 91804325..c382bf2d 100644 --- a/Gems/ROS2ScriptIntegration/Code/Source/ROS2ScriptIntegrationModuleInterface.cpp +++ b/Gems/ROS2ScriptIntegration/Code/Source/ROS2ScriptIntegrationModuleInterface.cpp @@ -5,7 +5,6 @@ #include #include -#include #include namespace ROS2ScriptIntegration @@ -26,7 +25,6 @@ namespace ROS2ScriptIntegration m_descriptors.insert( m_descriptors.end(), { - ROS2ScriptIntegrationSystemComponent::CreateDescriptor(), PublisherSystemComponent::CreateDescriptor(), SubscriberSystemComponent::CreateDescriptor(), }); @@ -35,7 +33,6 @@ namespace ROS2ScriptIntegration AZ::ComponentTypeList ROS2ScriptIntegrationModuleInterface::GetRequiredSystemComponents() const { return AZ::ComponentTypeList{ - azrtti_typeid(), azrtti_typeid(), azrtti_typeid(), }; diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Tools/ROS2ScriptIntegrationEditorModule.cpp b/Gems/ROS2ScriptIntegration/Code/Source/Tools/ROS2ScriptIntegrationEditorModule.cpp index 8c5b4035..517db175 100644 --- a/Gems/ROS2ScriptIntegration/Code/Source/Tools/ROS2ScriptIntegrationEditorModule.cpp +++ b/Gems/ROS2ScriptIntegration/Code/Source/Tools/ROS2ScriptIntegrationEditorModule.cpp @@ -1,6 +1,5 @@ #include "PublisherEditorSystemComponent.h" -#include "ROS2ScriptIntegrationEditorSystemComponent.h" #include "SubscriberEditorSystemComponent.h" #include #include @@ -23,7 +22,6 @@ namespace ROS2ScriptIntegration m_descriptors.insert( m_descriptors.end(), { - ROS2ScriptIntegrationEditorSystemComponent::CreateDescriptor(), PublisherEditorSystemComponent::CreateDescriptor(), SubscriberEditorSystemComponent::CreateDescriptor(), }); @@ -36,7 +34,6 @@ namespace ROS2ScriptIntegration AZ::ComponentTypeList GetRequiredSystemComponents() const override { return AZ::ComponentTypeList{ - azrtti_typeid(), azrtti_typeid(), azrtti_typeid(), }; diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Tools/ROS2ScriptIntegrationEditorSystemComponent.cpp b/Gems/ROS2ScriptIntegration/Code/Source/Tools/ROS2ScriptIntegrationEditorSystemComponent.cpp deleted file mode 100644 index 19586e03..00000000 --- a/Gems/ROS2ScriptIntegration/Code/Source/Tools/ROS2ScriptIntegrationEditorSystemComponent.cpp +++ /dev/null @@ -1,66 +0,0 @@ - -#include "ROS2ScriptIntegrationEditorSystemComponent.h" -#include - -#include - -namespace ROS2ScriptIntegration -{ - AZ_COMPONENT_IMPL( - ROS2ScriptIntegrationEditorSystemComponent, - "ROS2ScriptIntegrationEditorSystemComponent", - ROS2ScriptIntegrationEditorSystemComponentTypeId, - BaseSystemComponent); - - void ROS2ScriptIntegrationEditorSystemComponent::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class()->Version(0); - } - } - - ROS2ScriptIntegrationEditorSystemComponent::ROS2ScriptIntegrationEditorSystemComponent() = default; - - ROS2ScriptIntegrationEditorSystemComponent::~ROS2ScriptIntegrationEditorSystemComponent() = default; - - void ROS2ScriptIntegrationEditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - BaseSystemComponent::GetProvidedServices(provided); - provided.push_back(AZ_CRC_CE("ROS2ScriptIntegrationEditorService")); - } - - void ROS2ScriptIntegrationEditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - BaseSystemComponent::GetIncompatibleServices(incompatible); - incompatible.push_back(AZ_CRC_CE("ROS2ScriptIntegrationEditorService")); - } - - void ROS2ScriptIntegrationEditorSystemComponent::GetRequiredServices( - [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) - { - BaseSystemComponent::GetRequiredServices(required); - required.push_back(AZ_CRC_CE("PublisherEditorService")); - required.push_back(AZ_CRC_CE("SubscriberEditorService")); - } - - void ROS2ScriptIntegrationEditorSystemComponent::GetDependentServices( - [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) - { - BaseSystemComponent::GetDependentServices(dependent); - } - - void ROS2ScriptIntegrationEditorSystemComponent::Activate() - { - ROS2ScriptIntegrationSystemComponent::Activate(); - - AzToolsFramework::EditorEvents::Bus::Handler::BusConnect(); - } - - void ROS2ScriptIntegrationEditorSystemComponent::Deactivate() - { - AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect(); - ROS2ScriptIntegrationSystemComponent::Deactivate(); - } - -} // namespace ROS2ScriptIntegration diff --git a/Gems/ROS2ScriptIntegration/Code/Source/Tools/ROS2ScriptIntegrationEditorSystemComponent.h b/Gems/ROS2ScriptIntegration/Code/Source/Tools/ROS2ScriptIntegrationEditorSystemComponent.h deleted file mode 100644 index 2e1c8284..00000000 --- a/Gems/ROS2ScriptIntegration/Code/Source/Tools/ROS2ScriptIntegrationEditorSystemComponent.h +++ /dev/null @@ -1,35 +0,0 @@ - -#pragma once - -#include - -#include - -namespace ROS2ScriptIntegration -{ - /// System component for ROS2ScriptIntegration editor - class ROS2ScriptIntegrationEditorSystemComponent - : public ROS2ScriptIntegrationSystemComponent - , protected AzToolsFramework::EditorEvents::Bus::Handler - { - using BaseSystemComponent = ROS2ScriptIntegrationSystemComponent; - - public: - AZ_COMPONENT_DECL(ROS2ScriptIntegrationEditorSystemComponent); - - static void Reflect(AZ::ReflectContext* context); - - ROS2ScriptIntegrationEditorSystemComponent(); - ~ROS2ScriptIntegrationEditorSystemComponent(); - - private: - 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); - - // AZ::Component - void Activate() override; - void Deactivate() override; - }; -} // namespace ROS2ScriptIntegration diff --git a/Gems/ROS2ScriptIntegration/Code/ros2scriptintegration_api_files.cmake b/Gems/ROS2ScriptIntegration/Code/ros2scriptintegration_api_files.cmake index 138a1846..291fa9fc 100644 --- a/Gems/ROS2ScriptIntegration/Code/ros2scriptintegration_api_files.cmake +++ b/Gems/ROS2ScriptIntegration/Code/ros2scriptintegration_api_files.cmake @@ -1,6 +1,5 @@ set(FILES - Include/ROS2ScriptIntegration/ROS2ScriptIntegrationBus.h Include/ROS2ScriptIntegration/ROS2ScriptIntegrationTypeIds.h Include/ROS2ScriptIntegration/ROS2ScriptPublisherBus.h Include/ROS2ScriptIntegration/ROS2ScriptSubscriberBus.h diff --git a/Gems/ROS2ScriptIntegration/Code/ros2scriptintegration_editor_private_files.cmake b/Gems/ROS2ScriptIntegration/Code/ros2scriptintegration_editor_private_files.cmake index 18e830e0..fa178e7e 100644 --- a/Gems/ROS2ScriptIntegration/Code/ros2scriptintegration_editor_private_files.cmake +++ b/Gems/ROS2ScriptIntegration/Code/ros2scriptintegration_editor_private_files.cmake @@ -1,7 +1,5 @@ set(FILES - Source/Tools/ROS2ScriptIntegrationEditorSystemComponent.cpp - Source/Tools/ROS2ScriptIntegrationEditorSystemComponent.h Source/Tools/SubscriberEditorSystemComponent.cpp Source/Tools/SubscriberEditorSystemComponent.h Source/Tools/PublisherEditorSystemComponent.cpp diff --git a/Gems/ROS2ScriptIntegration/Code/ros2scriptintegration_private_files.cmake b/Gems/ROS2ScriptIntegration/Code/ros2scriptintegration_private_files.cmake index cef8b283..9a374738 100644 --- a/Gems/ROS2ScriptIntegration/Code/ros2scriptintegration_private_files.cmake +++ b/Gems/ROS2ScriptIntegration/Code/ros2scriptintegration_private_files.cmake @@ -2,8 +2,6 @@ set(FILES Source/ROS2ScriptIntegrationModuleInterface.cpp Source/ROS2ScriptIntegrationModuleInterface.h - Source/Clients/ROS2ScriptIntegrationSystemComponent.cpp - Source/Clients/ROS2ScriptIntegrationSystemComponent.h Source/Clients/ROS2ScriptSubscriberBus.cpp Source/Clients/ROS2ScriptPublisherBus.cpp Source/Clients/PublisherSystemComponent.cpp diff --git a/Gems/ROS2ScriptIntegration/gem.json b/Gems/ROS2ScriptIntegration/gem.json index 64eab34a..56a228bc 100644 --- a/Gems/ROS2ScriptIntegration/gem.json +++ b/Gems/ROS2ScriptIntegration/gem.json @@ -1,6 +1,6 @@ { "gem_name": "ROS2ScriptIntegration", - "version": "2.1.0", + "version": "3.0.0", "display_name": "ROS2ScriptIntegration", "license": "Apache-2.0", "license_url": "https://opensource.org/licenses/Apache-2.0", diff --git a/README.md b/README.md index c4626c5d..d595c7e3 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Note that this is not a "Canonical" part of O3DE - those gems are third-party co | [**RobotecSplineTools**](#robotecsplinetools) | not verified | | [**RobotecWatchdogTools**](#robotecwatchdogtools) | not verified | | [**ROS2PoseControl**](#ros2posecontrol) | not verified | -| [**ROS2ScriptIntegration**](#ros2scriptintegration) | not verified | +| [**ROS2ScriptIntegration**](#ros2scriptintegration) | compatible | | [**SensorDebug**](#sensordebug) | not verified | | [**Smoothing**](#smoothing) | not verified | | [**ViewportStreamer**](#viewportstreamer) | not verified | @@ -504,4 +504,4 @@ The component needs: It should be attached to Dynamic rigid body. The component will compute Jacobian matrix (w.r.t wheel locatio, radius and model) of the robot locomotion. Jacobian will be used to find wheels rotation speed. -More in dedicated [readme.md](Gems/WheelAnimTool/readme.md) \ No newline at end of file +More in dedicated [readme.md](Gems/WheelAnimTool/readme.md) From 92be88124a14ce2792af513168247665c1c509a7 Mon Sep 17 00:00:00 2001 From: Jan Hanca Date: Wed, 25 Mar 2026 08:05:45 +0100 Subject: [PATCH 3/4] Fix README Signed-off-by: Jan Hanca --- README.md | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index d595c7e3..ed30772e 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ CSV file format for coordinates in WGS84 system: alt lat lon name 0 12.5896238486642 30.1930592634115 ball 0 12.5896467730289 30.1931152819367 ball -0 12.5896704915715 30.193170552104 ball +0 12.5896704915715 30.193170552104 ball 0 12.5896945425591 30.1932257788658 ball 0 12.5897180240288 30.1932813604207 ball 0 12.5897414039641 30.1933370085065 ball @@ -73,12 +73,12 @@ It has two std_msgs/msg/String topics: \o3de_console_in ``` -Currently `o3de_console_in` is usable only. +Currently, `o3de_console_in` is usable only. The gem functionality is available only in Profile/Debug. # ImGuiProvider -This gem adds support for displaying user defined ImGui GUI. Users can define their own gui using `ImGuiProvider::ImGuiProviderNotificationBus`. User's component should be handler of the `ImGuiProvider::ImGuiProviderNotificationBus::Handler` and define method `OnImGuiUpdate`. Mentioned method should contain all code related to displayed GUI. Acquiring ImGui context and its releasing is handled by the Gem and its system component. User's component should connect to `ImGuiProvider::ImGuiProviderNotificationBus` using `ImGuiProvider::ImGuiFeaturePath` aka `AZ::IO::Path`. Each segment of path represents one depth in the toolbar. +This gem adds support for displaying user defined ImGui GUI. Users can define their own GUI using `ImGuiProvider::ImGuiProviderNotificationBus`. User's component should be handler of the `ImGuiProvider::ImGuiProviderNotificationBus::Handler` and define method `OnImGuiUpdate`. Mentioned method should contain all code related to displayed GUI. Acquiring ImGui context, and it's releasing is handled by the Gem and its system component. User's component should connect to `ImGuiProvider::ImGuiProviderNotificationBus` using `ImGuiProvider::ImGuiFeaturePath` aka `AZ::IO::Path`. Each segment of path represents one depth in the toolbar. Below example on how to register new feature during component activation: @@ -116,7 +116,7 @@ Besides `OnImGuiUpdate` used for updating displayed GUI, notification bus define `AZStd::optional GetActiveGuiId()` - returns optional with ImGuiProvider::ImGuiFeaturePath. Optional is empty if there is no active GUI. -`void SetActiveGUI(ImGuiFeaturePath guiId)` - sets GUI with given id as active. Doesn't check if given guiId exists. +`void SetActiveGUI(ImGuiFeaturePath guiId)` - sets GUI with given ID as active. Doesn't check if given guiId exists. # ImGuizmo @@ -138,17 +138,17 @@ _Note_ Only one gizmo can be rendered at the time! # LevelModificationTools -The level modification tool contains a component called PrefabVariantEditorComponent. +The level modification tool contains a component called `PrefabVariantEditorComponent`. This component allows the change a variant of loaded prefab during game mode. -It exposes PrefabVariantRequestsBus to Script Canvas or LUA. +It exposes `PrefabVariantRequestsBus` to Script Canvas or LUA. # Pointcloud A Gem that introduces point clouds to O3DE. It offers: -- PointcloudFeatureProcessor with public API -- Pointcloud product asset +- `PointcloudFeatureProcessor` with public API +- `Pointcloud` product asset - A public API for configuration (`PointcloudConfigurationBus`) At this moment it accepts [PLY]() as a source asset. @@ -158,7 +158,7 @@ Pointcloud asset was obtained from [potree](https://github.com/potree/potree). # RandomizeUtils -This gem allows to randomize prefab on spawning. +This gem allows randomizing prefab on spawning. It has a component called `RandomizePoseComponent` that modifies an entity during activation. It allows: @@ -181,15 +181,15 @@ Configuration: - Name - the name that is associated with the spawnable. This parameter is passed as `spawnable_name` in the GeoJSON message. - Spawnable - prefab (spawnable) associated with the `Name`. -- Position std. dev - maximum value of the position standard deviation [metres]. +- Position std. dev - maximum value of the position standard deviation [meters]. - Rotation std. dev - maximum value of the rotation standard deviation [degrees]. - Scale std. dev - maximum value of the scale standard deviation. - Place on terrain - switch indicating whether the spawner should perform scene query raytrace to place the spawnable on the terrain (or any other collider). -- Raytrace starting height - WGS84 altitude. If `Place on terrain` is set to false, this value will be used as a fixed Z-axis value for the spawn. Otherwise the raytrace will start at this height (converted from WGS84 altitude to Z-axis value using the `GeoReference Level Editor Component`). +- Raytrace starting height - WGS84 altitude. If `Place on terrain` is set to false, this value will be used as a fixed Z-axis value for the spawn. Otherwise, the raytrace will start at this height (converted from WGS84 altitude to Z-axis value using the `GeoReference Level Editor Component`). - Default seed - seed for randomization. - Show labels in Editor - switch to enable/disable labels in the Editor for spawned prefabs. -To get all the necessary information, the supported GeoJSON format is extended by a two additional fields (although this format is still correct with a GeoJSON standard) - `spawnable_name` and `id`. The `spawnable_name` is used to match spawn coordinates to a prefab name in a `Spawnable Asset Configuration`. The `id` is used to delete/modify the spawned object. +To get all the necessary information, the supported GeoJSON format is extended by two additional fields (although this format is still correct with a GeoJSON standard) - `spawnable_name` and `id`. The `spawnable_name` is used to match spawn coordinates to a prefab name in a `Spawnable Asset Configuration`. The `id` is used to delete/modify the spawned object. Example of supported GeoJSON: ``` @@ -245,7 +245,7 @@ Available functions: # RobotecGeoJSONSpawnerROS2 -Gem provides a component that connects RobotecGeoJSONSpawner with ROS 2. This component provides 4 topics and 1 service that allows to control RobotecGeoJSONSpawner with ROS 2 messages. +Gem provides a component that connects `RobotecGeoJSONSpawner` with ROS 2. This component provides 4 topics and 1 service that allows to control `RobotecGeoJSONSpawner` with ROS 2 messages. ![](doc/GeoJSONSpawnerROS2Interface.png) @@ -254,7 +254,7 @@ Topics: - `geojson/spawn_with_asset_path [std_msgs::msg:String]` - topic that allows to spawn entities using a passed path to asset with GeoJSON. - `geojson/spawn_with_raw_string [std_msgs::msg:String]` - topic that allows to spawn entities using a passed raw string with a GeoJSON. - `geojson/modify [std_msgs::msg::String]` - topic that allows to modify spawned entities using the id passed with a spawn request. Usage example: - Lets suppose that user spawned prefabs using such GeoJSON: + Let's suppose that user spawned prefabs using such GeoJSON: ``` { @@ -289,7 +289,7 @@ Topics: } ``` -Suppose the user wants to move the Feature Object assigned to ID 0. To do this, remove the Feature Object with ID 1 from the original json, then apply the necessary corrections to the coordinates of the Feature Object with ID 0 and send the GeoJSON thus prepared to the topic `geojson/modify`. +Suppose the user wants to move the Feature Object assigned to ID 0. To do this, remove the Feature Object with ID 1 from the original JSON, then apply the necessary corrections to the coordinates of the Feature Object with ID 0 and send the GeoJSON thus prepared to the topic `geojson/modify`. ``` { @@ -311,11 +311,11 @@ Suppose the user wants to move the Feature Object assigned to ID 0. To do this, ``` -- `geojson/delete_all [std_msgs::msg::Empty]` - topic that despawns all entities spawned with RobotecGeoJSONSpawner. -- `geojson/delete_by_id [std_msgs/msg/Int32MultiArray]` - topic that despawns all entities associated with a given ids. +- `geojson/delete_all [std_msgs::msg::Empty]` - topic that despawns all entities spawned with `RobotecGeoJSONSpawner`. +- `geojson/delete_by_id [std_msgs/msg/Int32MultiArray]` - topic that despawns all entities associated with a given ID. Service: -`geojson/get_spawned_groups_ids [std_srvs/srv/Trigger]` - service that returns all spawned ids together with the number of prefabs associated with each id. +`geojson/get_spawned_groups_ids [std_srvs/srv/Trigger]` - service that returns all spawned IDs together with the number of prefabs associated with each ID. ## Usage examples: @@ -375,7 +375,7 @@ ros2 topic pub /geojson/modify std_msgs/msg/String "data: '{ }'" --once ``` -### Delete by id +### Delete by ID ``` ros2 topic pub /geojson/delete_by_id std_msgs/msg/Int32MultiArray "{data: [0]}" --once @@ -387,7 +387,7 @@ ros2 topic pub /geojson/delete_by_id std_msgs/msg/Int32MultiArray "{data: [0]}" ros2 topic pub /geojson/delete_all std_msgs/msg/Empty "{}" --once ``` -### Get spawned groups ids +### Get spawned groups IDs ``` ros2 service call /geojson/get_spawned_groups_ids std_srvs/srv/Trigger @@ -400,8 +400,8 @@ A toolset for joystick-controlled cameras and spline animation tools. # RobotecSpectatorCamera -A component that allows to look at an entity from 3rd person perspective and to switch camera mode to the free flying mode (to switch mode press the `C` key). It also allows to enable/disable following the target's rotation and to add a vertical offset to change the `look at` point of the target entity. -The Spectator camera component can be configured to centre the cursor when moving the camera (this gives the full range of rotation regardless of the available screen space) or to let the cursor move freely on the screen when moving the camera (this reduces the range of rotation, e.g. in third person mode a full rotation may require a few repeats of the (RMB press ->Rotate camera ->RMB release ->Move cursor to previous start position ->Repeat) cycle). By default this option is set to false (cursor is not centered). This option can be configured via the `setreg` file or by passing `--regset` flag in the command line. Example: +A component that allows to look at an entity from 3rd person perspective and to switch camera mode to the free flying mode (to switch mode press the `C` key). It also allows enabling/disabling following the target's rotation and to add a vertical offset to change the `look at` point of the target entity. +The Spectator camera component can be configured to center the cursor when moving the camera (this gives the full range of rotation regardless of the available screen space) or to let the cursor move freely on the screen when moving the camera (this reduces the range of rotation, e.g. in third person mode a full rotation may require a few repeats of the (RMB press ->Rotate camera ->RMB release ->Move cursor to previous start position ->Repeat) cycle). By default, this option is set to false (cursor is not centered). This option can be configured via the `setreg` file or by passing `--regset` flag in the command line. Example: - `.setreg`: @@ -475,7 +475,7 @@ The utility gem enabling controlling robots in simulation as puppets with Pose m # ROS2ScriptIntegration Simple, but extremely useful tool that exposes ROS 2 subscription/publication to Script Canvas and LUA. -Refer to [readme](https://github.com/RobotecAI/robotec-o3de-tools/tree/main/Gems/ROS2ScriptIntegration#readme). +Refer to [readme](Gems/ROS2ScriptIntegration/README.md). # SensorDebug @@ -502,6 +502,6 @@ The component needs: - wheel radius in meters - wheel axis to animate. -It should be attached to Dynamic rigid body. The component will compute Jacobian matrix (w.r.t wheel locatio, radius and model) of the robot locomotion. +It should be attached to Dynamic rigid body. The component will compute Jacobian matrix (w.r.t wheel location, radius and model) of the robot locomotion. Jacobian will be used to find wheels rotation speed. More in dedicated [readme.md](Gems/WheelAnimTool/readme.md) From 168d02253d566fe4e67e1fb9df9250a8d3709226 Mon Sep 17 00:00:00 2001 From: Jan Hanca Date: Wed, 25 Mar 2026 08:13:03 +0100 Subject: [PATCH 4/4] Fix formatting Signed-off-by: Jan Hanca --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ed30772e..8d9396ac 100644 --- a/README.md +++ b/README.md @@ -53,13 +53,13 @@ CSV file format for coordinates in WGS84 system: ```csv alt lat lon name -0 12.5896238486642 30.1930592634115 ball -0 12.5896467730289 30.1931152819367 ball -0 12.5896704915715 30.193170552104 ball -0 12.5896945425591 30.1932257788658 ball -0 12.5897180240288 30.1932813604207 ball -0 12.5897414039641 30.1933370085065 ball -0 12.5897646831551 30.1933927129084 ball +0 12.5896238486642 30.1930592634115 ball +0 12.5896467730289 30.1931152819367 ball +0 12.5896704915715 30.193170552104 ball +0 12.5896945425591 30.1932257788658 ball +0 12.5897180240288 30.1932813604207 ball +0 12.5897414039641 30.1933370085065 ball +0 12.5897646831551 30.1933927129084 ball ```