ROS2EditorModule.cpp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 <Camera/ROS2CameraSensorEditorComponent.h>
  10. #include <Camera/ROS2EditorCameraSystemComponent.h>
  11. #include <Frame/ROS2FrameSystemComponent.h>
  12. #include <Lidar/LidarRegistrarEditorSystemComponent.h>
  13. #include <Manipulation/JointsManipulationEditorComponent.h>
  14. #include <Manipulation/JointsPositionsEditorComponent.h>
  15. #include <QtCore/qglobal.h>
  16. #include <ROS2/Frame/ROS2FrameEditorComponent.h>
  17. #include <ROS2ModuleInterface.h>
  18. #include <RobotImporter/ROS2RobotImporterEditorSystemComponent.h>
  19. #include <SdfAssetBuilder/SdfAssetBuilderSystemComponent.h>
  20. #include <Spawner/ROS2SpawnPointEditorComponent.h>
  21. #include <Spawner/ROS2SpawnerEditorComponent.h>
  22. #include <SystemComponents/ROS2EditorSystemComponent.h>
  23. void InitROS2Resources()
  24. {
  25. // Registration of Qt (ROS2.qrc) resources
  26. Q_INIT_RESOURCE(ROS2);
  27. }
  28. namespace ROS2
  29. {
  30. class ROS2EditorModule : public ROS2ModuleInterface
  31. {
  32. public:
  33. AZ_RTTI(ROS2EditorModule, "{3DDFC98F-D1CC-4658-BAF8-2CC34A9D39F3}", ROS2ModuleInterface);
  34. AZ_CLASS_ALLOCATOR(ROS2EditorModule, AZ::SystemAllocator);
  35. ROS2EditorModule()
  36. {
  37. InitROS2Resources();
  38. m_descriptors.insert(
  39. m_descriptors.end(),
  40. { ROS2EditorSystemComponent::CreateDescriptor(),
  41. ROS2EditorCameraSystemComponent::CreateDescriptor(),
  42. LidarRegistrarEditorSystemComponent::CreateDescriptor(),
  43. ROS2RobotImporterEditorSystemComponent::CreateDescriptor(),
  44. ROS2CameraSensorEditorComponent::CreateDescriptor(),
  45. ROS2SpawnerEditorComponent::CreateDescriptor(),
  46. ROS2SpawnPointEditorComponent::CreateDescriptor(),
  47. SdfAssetBuilderSystemComponent::CreateDescriptor(),
  48. JointsManipulationEditorComponent::CreateDescriptor(),
  49. JointsPositionsEditorComponent::CreateDescriptor(),
  50. ROS2FrameSystemComponent::CreateDescriptor(),
  51. ROS2FrameEditorComponent::CreateDescriptor() });
  52. }
  53. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  54. {
  55. return AZ::ComponentTypeList{
  56. azrtti_typeid<ROS2EditorSystemComponent>(), azrtti_typeid<ROS2EditorCameraSystemComponent>(),
  57. azrtti_typeid<LidarRegistrarEditorSystemComponent>(), azrtti_typeid<ROS2RobotImporterEditorSystemComponent>(),
  58. azrtti_typeid<SdfAssetBuilderSystemComponent>(), azrtti_typeid<ROS2FrameSystemComponent>(),
  59. };
  60. }
  61. };
  62. } // namespace ROS2
  63. AZ_DECLARE_MODULE_CLASS(Gem_ROS2, ROS2::ROS2EditorModule)