ROS2ModuleInterface.h 1.5 KB

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