WheelOdometryConfigurationRequestBus.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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/EBus/EBus.h>
  10. #include <AzCore/Math/Vector3.h>
  11. #include <AzCore/RTTI/RTTI.h>
  12. #include <ROS2Sensors/Odometry/ROS2OdometryCovariance.h>
  13. #include <ROS2Sensors/Odometry/WheelOdometrySensorConfiguration.h>
  14. namespace ROS2Sensors
  15. {
  16. //! Interface that allows to get and set WheelOdometry sensor's configuration.
  17. class WheelOdometryConfigurationRequest : public AZ::EBusTraits
  18. {
  19. public:
  20. using BusIdType = AZ::EntityId;
  21. static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById;
  22. //! Returns the current configuration of the component.
  23. virtual const WheelOdometrySensorConfiguration GetConfiguration() = 0;
  24. //! Sets the configuration of the component.
  25. //! Each component should handle the configuration change without fully reinitializing the ROS2 publisher.
  26. //! This will allow to change the configuration of the component at runtime.
  27. //! @param configuration The new configuration to set.
  28. virtual void SetConfiguration(const WheelOdometrySensorConfiguration& configuration) = 0;
  29. //! Get the pose covariance.
  30. virtual ROS2OdometryCovariance GetPoseCovariance() = 0;
  31. //! Set the pose covariance.
  32. virtual void SetPoseCovariance(const ROS2OdometryCovariance& covariance) = 0;
  33. //! Get the twist covariance.
  34. virtual ROS2OdometryCovariance GetTwistCovariance() = 0;
  35. //! Set the twist covariance.
  36. virtual void SetTwistCovariance(const ROS2OdometryCovariance& covariance) = 0;
  37. };
  38. using WheelOdometryConfigurationRequestBus = AZ::EBus<WheelOdometryConfigurationRequest>;
  39. } // namespace ROS2Sensors