ROS2SpawnPointComponent.cpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. #ifndef WITH_GAZEBO_MSGS
  9. static_assert(false, "This file should not be included in the build, without WITH_GAZEBO_MSGS defined.");
  10. #endif
  11. #include "ROS2SpawnPointComponent.h"
  12. #include "Spawner/ROS2SpawnPointComponentController.h"
  13. #include <AzCore/Component/Entity.h>
  14. #include <AzCore/Serialization/EditContext.h>
  15. #include <AzCore/Serialization/EditContextConstants.inl>
  16. #include <AzCore/Serialization/SerializeContext.h>
  17. #include <AzFramework/Components/TransformComponent.h>
  18. namespace ROS2
  19. {
  20. ROS2SpawnPointComponent::ROS2SpawnPointComponent(const ROS2SpawnPointComponentConfig& config)
  21. : ROS2SpawnPointComponentBase(config)
  22. {
  23. }
  24. void ROS2SpawnPointComponent::Activate()
  25. {
  26. ROS2SpawnPointComponentBase::Activate();
  27. }
  28. void ROS2SpawnPointComponent::Deactivate()
  29. {
  30. ROS2SpawnPointComponentBase::Deactivate();
  31. }
  32. void ROS2SpawnPointComponent::Reflect(AZ::ReflectContext* context)
  33. {
  34. ROS2SpawnPointComponentBase::Reflect(context);
  35. if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
  36. {
  37. serialize->Class<ROS2SpawnPointComponent, ROS2SpawnPointComponentBase>()->Version(1);
  38. }
  39. }
  40. AZStd::pair<AZStd::string, SpawnPointInfo> ROS2SpawnPointComponent::GetInfo() const
  41. {
  42. return m_controller.GetInfo();
  43. }
  44. } // namespace ROS2