PickingStructs.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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/Component/EntityId.h>
  10. #include <AzCore/Math/Aabb.h>
  11. namespace AppleKraken
  12. {
  13. //! Important states of the Kraken effector (manipulator with a vacuum nozzle)
  14. enum class EffectorState
  15. {
  16. IDLE = 0, //!< Idle state / position, suitable for robot moving around the environment.
  17. PREPARED = 10, //!< State and position which are ready for picking tasks.
  18. PICKING = 20, //!< The effector is on its way to pick fruit.
  19. RETRIEVING = 30, //!< The effector is retrieving a fruit to storage position.
  20. INVALID = -1 //!< Invalid state. Requires an additional context that could help user understand what happened. @see PickingState.
  21. };
  22. //! A structure holding a state of effector, including optional progress and descriptive information.
  23. struct PickingState
  24. {
  25. EffectorState m_effectorState = EffectorState::IDLE; //!< Current state of effector.
  26. float m_taskProgress = 0.0f; //!< Optional field signalling progress within current state (picking/retrieving).
  27. AZStd::string m_description; //!< Optional descriptive field to inform the user.
  28. };
  29. //! A task to pick a single apple.
  30. struct PickAppleTask
  31. {
  32. AZ::EntityId m_appleEntityId; //!< EntityId of the apple. Can be Invalid if the information is not available (check IsValid()).
  33. AZ::Aabb m_appleBoundingBox; //!< Bounding box of the apple to pick.
  34. };
  35. } // namespace AppleKraken