ROS2EditorModule.cpp 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <AzCore/RTTI/RTTIMacros.h>
  9. #include <Frame/ROS2FrameSystemComponent.h>
  10. #include <Manipulation/JointsManipulationEditorComponent.h>
  11. #include <Manipulation/JointsPositionsEditorComponent.h>
  12. #include <QtCore/qglobal.h>
  13. #include <ROS2/Frame/ROS2FrameEditorComponent.h>
  14. #include <ROS2ModuleInterface.h>
  15. #include <RobotImporter/ROS2RobotImporterEditorSystemComponent.h>
  16. #include <SdfAssetBuilder/SdfAssetBuilderSystemComponent.h>
  17. #include <Spawner/ROS2SpawnPointEditorComponent.h>
  18. #include <Spawner/ROS2SpawnerEditorComponent.h>
  19. #include <SystemComponents/ROS2EditorSystemComponent.h>
  20. void InitROS2Resources()
  21. {
  22. // Registration of Qt (ROS2.qrc) resources
  23. Q_INIT_RESOURCE(ROS2);
  24. }
  25. namespace ROS2
  26. {
  27. class ROS2EditorModule : public ROS2ModuleInterface
  28. {
  29. public:
  30. AZ_RTTI(ROS2EditorModule, "{3DDFC98F-D1CC-4658-BAF8-2CC34A9D39F3}", ROS2ModuleInterface);
  31. AZ_CLASS_ALLOCATOR(ROS2EditorModule, AZ::SystemAllocator);
  32. ROS2EditorModule()
  33. {
  34. InitROS2Resources();
  35. m_descriptors.insert(
  36. m_descriptors.end(),
  37. { ROS2EditorSystemComponent::CreateDescriptor(),
  38. ROS2RobotImporterEditorSystemComponent::CreateDescriptor(),
  39. ROS2SpawnerEditorComponent::CreateDescriptor(),
  40. ROS2SpawnPointEditorComponent::CreateDescriptor(),
  41. SdfAssetBuilderSystemComponent::CreateDescriptor(),
  42. JointsManipulationEditorComponent::CreateDescriptor(),
  43. JointsPositionsEditorComponent::CreateDescriptor(),
  44. ROS2FrameSystemComponent::CreateDescriptor(),
  45. ROS2FrameEditorComponent::CreateDescriptor() });
  46. }
  47. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  48. {
  49. return AZ::ComponentTypeList{
  50. azrtti_typeid<ROS2EditorSystemComponent>(),
  51. azrtti_typeid<ROS2RobotImporterEditorSystemComponent>(),
  52. azrtti_typeid<SdfAssetBuilderSystemComponent>(),
  53. azrtti_typeid<ROS2FrameSystemComponent>(),
  54. };
  55. }
  56. };
  57. } // namespace ROS2
  58. AZ_DECLARE_MODULE_CLASS(Gem_ROS2, ROS2::ROS2EditorModule)