/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #pragma once #include #include #include #include #include namespace ROS2Sensors { //! Structure containing all information required to create the camera sensor. struct CameraSensorDescription { //! Type of camera channel. enum class CameraChannelType { RGB = 0, DEPTH = 1 }; //! Constructor to create the description //! @param cameraName - name of the camera; used to differentiate cameras in a multi-camera setup. //! @param effectiveNamespace - namespace for camera frames and topics. //! @param configuration - configuration structure for the camera, defining its characteristics. //! @param sensorConfiguration - generic configuration for this sensor. CameraSensorDescription( const AZStd::string& cameraName, const AZStd::string& effectiveNamespace, const CameraSensorConfiguration& configuration, const ROS2::SensorConfiguration& sensorConfiguration); const CameraSensorConfiguration m_cameraConfiguration; //!< Configuration of the camera. const ROS2::SensorConfiguration m_sensorConfiguration; //!< Generic sensor configuration. const AZStd::string m_cameraName; //!< Camera name to differentiate cameras in a multi-camera setup. const AZStd::string m_cameraNamespace; //!< Effective camera namespace for frames and topics. const AZ::Matrix4x4 m_viewToClipMatrix; //!< Camera view to clip space transform matrix; derived from other parameters. const AZ::Matrix3x3 m_cameraIntrinsics; //!< Camera intrinsics; derived from other parameters. private: void ValidateParameters() const; }; } // namespace ROS2Sensors