ROS2SpawnPointComponent.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #ifndef WITH_GAZEBO_MSGS
  10. static_assert(false, "This file should not be included in the build, without WITH_GAZEBO_MSGS defined.");
  11. #endif
  12. #include "Spawner/ROS2SpawnPointComponentController.h"
  13. #include <AzCore/Component/Component.h>
  14. #include <AzCore/Math/Transform.h>
  15. #include <AzFramework/Components/ComponentAdapter.h>
  16. #include <ROS2/Spawner/SpawnerInfo.h>
  17. namespace ROS2
  18. {
  19. using ROS2SpawnPointComponentBase =
  20. AzFramework::Components::ComponentAdapter<ROS2SpawnPointComponentController, ROS2SpawnPointComponentConfig>;
  21. //! SpawnPoint indicates a place which is suitable to spawn a robot.
  22. class ROS2SpawnPointComponent : public ROS2SpawnPointComponentBase
  23. {
  24. public:
  25. AZ_COMPONENT(ROS2SpawnPointComponent, "{422c0495-5bbf-4207-ac17-8e607c6d3b30}", AZ::Component);
  26. ROS2SpawnPointComponent() = default;
  27. ROS2SpawnPointComponent(const ROS2SpawnPointComponentConfig& config);
  28. ~ROS2SpawnPointComponent() = default;
  29. static void Reflect(AZ::ReflectContext* context);
  30. //////////////////////////////////////////////////////////////////////////
  31. // ROS2SpawnPointComponentBase overrides
  32. void Activate() override;
  33. void Deactivate() override;
  34. //////////////////////////////////////////////////////////////////////////
  35. AZStd::pair<AZStd::string, SpawnPointInfo> GetInfo() const;
  36. };
  37. } // namespace ROS2