ROS2ModuleInterface.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #pragma once
  9. #include <AzCore/Memory/SystemAllocator.h>
  10. #include <AzCore/Module/Module.h>
  11. #include <ROS2/Frame/ROS2FrameComponent.h>
  12. #include <RobotImporter/ROS2RobotImporterSystemComponent.h>
  13. #include <SimulationUtils/FollowingCameraComponent.h>
  14. #include <Spawner/ROS2SpawnPointComponent.h>
  15. #include <Spawner/ROS2SpawnerComponent.h>
  16. #include <SystemComponents/ROS2SystemComponent.h>
  17. namespace ROS2
  18. {
  19. class ROS2ModuleInterface : public AZ::Module
  20. {
  21. public:
  22. AZ_RTTI(ROS2ModuleInterface, "{8b5567cb-1de9-49af-9cd4-9750d4abcd6b}", AZ::Module);
  23. AZ_CLASS_ALLOCATOR(ROS2ModuleInterface, AZ::SystemAllocator);
  24. ROS2ModuleInterface()
  25. {
  26. m_descriptors.insert(
  27. m_descriptors.end(),
  28. {
  29. ROS2SystemComponent::CreateDescriptor(),
  30. ROS2RobotImporterSystemComponent::CreateDescriptor(),
  31. ROS2FrameComponent::CreateDescriptor(),
  32. ROS2SpawnerComponent::CreateDescriptor(),
  33. ROS2SpawnPointComponent::CreateDescriptor(),
  34. FollowingCameraComponent::CreateDescriptor(),
  35. });
  36. }
  37. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  38. {
  39. return AZ::ComponentTypeList{
  40. azrtti_typeid<ROS2SystemComponent>(),
  41. azrtti_typeid<ROS2RobotImporterSystemComponent>(),
  42. };
  43. }
  44. };
  45. } // namespace ROS2