ROS2ModuleInterface.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 <Camera/PostProcessing/ROS2ImageEncodingConversionComponent.h>
  12. #include <Camera/ROS2CameraSensorComponent.h>
  13. #include <Camera/ROS2CameraSystemComponent.h>
  14. #include <GNSS/ROS2GNSSSensorComponent.h>
  15. #include <Gripper/FingerGripperComponent.h>
  16. #include <Gripper/GripperActionServerComponent.h>
  17. #include <Gripper/VacuumGripperComponent.h>
  18. #include <Imu/ROS2ImuSensorComponent.h>
  19. #include <Lidar/ClassSegmentationConfigurationComponent.h>
  20. #include <Lidar/LidarRegistrarSystemComponent.h>
  21. #include <Lidar/ROS2Lidar2DSensorComponent.h>
  22. #include <Lidar/ROS2LidarSensorComponent.h>
  23. #include <Manipulation/Controllers/JointsArticulationControllerComponent.h>
  24. #include <Manipulation/Controllers/JointsPIDControllerComponent.h>
  25. #include <Manipulation/JointsManipulationComponent.h>
  26. #include <Manipulation/JointsPositionsComponent.h>
  27. #include <Manipulation/JointsTrajectoryComponent.h>
  28. #include <Odometry/ROS2OdometrySensorComponent.h>
  29. #include <Odometry/ROS2WheelOdometry.h>
  30. #include <ROS2/Frame/ROS2FrameComponent.h>
  31. #include <ROS2/Manipulation/MotorizedJoints/JointMotorControllerComponent.h>
  32. #include <ROS2/Manipulation/MotorizedJoints/ManualMotorControllerComponent.h>
  33. #include <ROS2/Manipulation/MotorizedJoints/PidMotorControllerComponent.h>
  34. #include <RobotControl/Controllers/AckermannController/AckermannControlComponent.h>
  35. #include <RobotControl/Controllers/RigidBodyController/RigidBodyTwistControlComponent.h>
  36. #include <RobotControl/Controllers/SkidSteeringController/SkidSteeringControlComponent.h>
  37. #include <RobotControl/ROS2RobotControlComponent.h>
  38. #include <RobotImporter/ROS2RobotImporterSystemComponent.h>
  39. #include <SimulationUtils/FollowingCameraComponent.h>
  40. #include <SystemComponents/ROS2SystemComponent.h>
  41. #include <VehicleDynamics/ModelComponents/AckermannModelComponent.h>
  42. #include <VehicleDynamics/ModelComponents/SkidSteeringModelComponent.h>
  43. #include <VehicleDynamics/VehicleModelComponent.h>
  44. #include <VehicleDynamics/WheelControllerComponent.h>
  45. #ifdef WITH_GAZEBO_MSGS
  46. #include <Spawner/ROS2SpawnPointComponent.h>
  47. #include <Spawner/ROS2SpawnerComponent.h>
  48. #include <ContactSensor/ROS2ContactSensorComponent.h>
  49. #endif
  50. namespace ROS2
  51. {
  52. class ROS2ModuleInterface : public AZ::Module
  53. {
  54. public:
  55. AZ_RTTI(ROS2ModuleInterface, "{8b5567cb-1de9-49af-9cd4-9750d4abcd6b}", AZ::Module);
  56. AZ_CLASS_ALLOCATOR(ROS2ModuleInterface, AZ::SystemAllocator);
  57. ROS2ModuleInterface()
  58. {
  59. m_descriptors.insert(
  60. m_descriptors.end(),
  61. {
  62. ROS2SystemComponent::CreateDescriptor(),
  63. ROS2SystemCameraComponent::CreateDescriptor(),
  64. ROS2SensorComponentBase<TickBasedSource>::CreateDescriptor(),
  65. ROS2SensorComponentBase<PhysicsBasedSource>::CreateDescriptor(),
  66. LidarRegistrarSystemComponent::CreateDescriptor(),
  67. ROS2RobotImporterSystemComponent::CreateDescriptor(),
  68. ROS2ImuSensorComponent::CreateDescriptor(),
  69. ROS2GNSSSensorComponent::CreateDescriptor(),
  70. ROS2LidarSensorComponent::CreateDescriptor(),
  71. ROS2Lidar2DSensorComponent::CreateDescriptor(),
  72. ROS2OdometrySensorComponent::CreateDescriptor(),
  73. ROS2WheelOdometryComponent::CreateDescriptor(),
  74. ROS2FrameComponent::CreateDescriptor(),
  75. ROS2RobotControlComponent::CreateDescriptor(),
  76. ROS2CameraSensorComponent::CreateDescriptor(),
  77. ROS2ImageEncodingConversionComponent::CreateDescriptor(),
  78. AckermannControlComponent::CreateDescriptor(),
  79. RigidBodyTwistControlComponent::CreateDescriptor(),
  80. SkidSteeringControlComponent::CreateDescriptor(),
  81. ROS2CameraSensorComponent::CreateDescriptor(),
  82. VehicleDynamics::AckermannVehicleModelComponent::CreateDescriptor(),
  83. VehicleDynamics::WheelControllerComponent::CreateDescriptor(),
  84. VehicleDynamics::SkidSteeringModelComponent::CreateDescriptor(),
  85. JointMotorControllerComponent::CreateDescriptor(),
  86. ManualMotorControllerComponent::CreateDescriptor(),
  87. JointsManipulationComponent::CreateDescriptor(),
  88. JointsPositionsComponent::CreateDescriptor(),
  89. JointsArticulationControllerComponent::CreateDescriptor(),
  90. JointsPIDControllerComponent::CreateDescriptor(),
  91. JointsTrajectoryComponent::CreateDescriptor(),
  92. PidMotorControllerComponent::CreateDescriptor(),
  93. GripperActionServerComponent::CreateDescriptor(),
  94. VacuumGripperComponent::CreateDescriptor(),
  95. FingerGripperComponent::CreateDescriptor(),
  96. FollowingCameraComponent::CreateDescriptor(),
  97. ClassSegmentationConfigurationComponent::CreateDescriptor(),
  98. #ifdef WITH_GAZEBO_MSGS
  99. ROS2SpawnerComponent::CreateDescriptor(),
  100. ROS2SpawnPointComponent::CreateDescriptor(),
  101. ROS2ContactSensorComponent::CreateDescriptor(),
  102. #endif
  103. });
  104. }
  105. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  106. {
  107. return AZ::ComponentTypeList{
  108. azrtti_typeid<ROS2SystemComponent>(),
  109. azrtti_typeid<ROS2SystemCameraComponent>(),
  110. azrtti_typeid<LidarRegistrarSystemComponent>(),
  111. azrtti_typeid<ROS2RobotImporterSystemComponent>(),
  112. };
  113. }
  114. };
  115. } // namespace ROS2