artist.field.kinematics_rigid_body ================================== .. py:module:: artist.field.kinematics_rigid_body Classes ------- .. autoapisummary:: artist.field.kinematics_rigid_body.RigidBody Module Contents --------------- .. py:class:: RigidBody(number_of_heliostats: int, heliostat_positions: torch.Tensor, initial_orientations: torch.Tensor, translation_deviation_parameters: torch.Tensor, rotation_deviation_parameters: torch.Tensor, actuator_parameters_non_optimizable: torch.Tensor, actuator_parameters_optimizable: torch.Tensor = torch.tensor([]), device: torch.device | None = None) Bases: :py:obj:`artist.field.kinematics.Kinematics` Initialize a rigid body kinematics. The rigid body kinematics determines transformation matrices that are applied to the heliostat surfaces in order to align them. The heliostats then reflect the incoming light according to the provided aim points. The rigid body kinematics works for heliostats equipped with two actuators that turn the heliostat surfaces. Furthermore, initial orientation offsets and deviation parameters determine the specific behavior of the kinematics. The kinematics deviations are split into translation and rotation parameters. There are three translation parameters for each joint and for the concentrator. One translation deviation in the east, north and up direction respectively. For joint one and two there are also rotation deviations. For joint one in the north and up direction and for joint two in the east and north direction. Parameters ---------- number_of_heliostats : int The number of heliostats using this rigid body kinematics. heliostat_positions : torch.Tensor The positions of all heliostats. Shape is ``[number_of_heliostats, 4]``. initial_orientations : torch.Tensor The initial orientation offsets of all heliostats. Shape is ``[number_of_heliostats, 4]``. translation_deviation_parameters : torch.Tensor Kinematics translation deviation parameter. Shape is ``[number_of_heliostats, 9]``. rotation_deviation_parameters : torch.Tensor Kinematics rotation deviation parameter. Shape is ``[number_of_heliostats, 4]``. actuator_parameters_non_optimizable : torch.Tensor The non-optimizable actuator parameters. Shape is ``[number_of_heliostats, 7, 2]`` for linear actuators or ``[number_of_heliostats, 4, 2]`` for ideal actuators. actuator_parameters_optimizable : torch.Tensor The optimizable actuator parameters. Shape is ``[number_of_heliostats, 2, 2]`` for linear actuators or ``[]`` for ideal actuators (default is ``torch.tensor([])``). device : torch.device | None The device on which to perform computations or load tensors and models (default is None). If None, ``ARTIST`` will automatically select the most appropriate device (CUDA or CPU) based on availability and OS. .. py:attribute:: number_of_heliostats .. py:attribute:: heliostat_positions .. py:attribute:: initial_orientations .. py:attribute:: motor_positions .. py:attribute:: translation_deviation_parameters .. py:attribute:: rotation_deviation_parameters .. py:attribute:: number_of_active_heliostats :value: 0 .. py:attribute:: active_heliostat_positions .. py:attribute:: active_initial_orientations .. py:attribute:: active_translation_deviation_parameters .. py:attribute:: active_rotation_deviation_parameters .. py:attribute:: active_motor_positions .. py:attribute:: artist_standard_orientation .. py:attribute:: actuators .. py:method:: _compute_orientations_from_motor_positions(motor_positions: torch.Tensor, device: torch.device | None = None) -> torch.Tensor Compute orientation matrices from given motor positions without initial orientation offsets. Parameters ---------- motor_positions : torch.Tensor The motor positions. Shape is ``[number_of_active_heliostats, 2]``. device : torch.device | None The device on which to perform computations or load tensors and models (default is None). If None, ``ARTIST`` will automatically select the most appropriate device (CUDA or CPU) based on availability and OS. Returns ------- torch.Tensor The orientation matrices. Shape is ``[number_of_active_heliostats, 4, 4]``. .. py:method:: _apply_initial_orientation_offsets(orientations: torch.Tensor, device: torch.device | None = None) -> torch.Tensor Apply the initial orientation offsets to the given orientation matrices. Parameters ---------- orientations : torch.Tensor The orientation matrices. Shape is ``[number_of_active_heliostats, 4, 4]``. device : torch.device | None The device on which to perform computations or load tensors and models (default is None). If None, ``ARTIST`` will automatically select the most appropriate device (CUDA or CPU) based on availability and OS. Returns ------- torch.Tensor The orientation matrices with the initial orientation offset. Shape is ``[number_of_active_heliostats, 4, 4]``. .. py:method:: incident_ray_directions_to_orientations(incident_ray_directions: torch.Tensor, aim_points: torch.Tensor, device: torch.device | None = None, max_num_iterations: int = 2, min_eps: float = 0.0001) -> torch.Tensor Compute orientation matrices given incident ray directions. Parameters ---------- incident_ray_directions : torch.Tensor The directions of the incident rays as seen from the heliostats. Shape is ``[number_of_active_heliostats, 4]``. aim_points : torch.Tensor The aim points for the active heliostats. Shape is ``[number_of_active_heliostats, 4]``. max_num_iterations : int Maximum number of iterations (default is 2). min_eps : float Convergence criterion (default is 0.0001). device : torch.device | None The device on which to perform computations or load tensors and models (default is None). If None, ``ARTIST`` will automatically select the most appropriate device (CUDA or CPU) based on availability and OS. Returns ------- torch.Tensor The orientation matrices. Shape is ``[number_of_active_heliostats, 4, 4]``. .. py:method:: motor_positions_to_orientations(motor_positions: torch.Tensor, device: torch.device | None = None) -> torch.Tensor Compute orientation matrices given the motor positions. Parameters ---------- motor_positions : torch.Tensor The motor positions. Shape is ``[number_of_active_heliostats, 2]``. device : torch.device | None The device on which to perform computations or load tensors and models (default is None). If None, ``ARTIST`` will automatically select the most appropriate device (CUDA or CPU) based on availability and OS. Returns ------- torch.Tensor The orientation matrices. Shape is ``[number_of_active_heliostats, 4, 4]``.