artist.field.kinematics
Kinematics modules in ARTIST.
Classes
Initialize the kinematics. |
Module Contents
- class artist.field.kinematics.Kinematics
Bases:
torch.nn.ModuleInitialize the kinematics.
The abstract kinematics implements a template for the construction of inheriting kinematics which currently can only be rigid body kinematics. The kinematics is concerned with the mechanics and motion of the heliostats and their actuators. The abstract base class defines two methods to determine orientation matrices, which all kinematics need to overwrite.
- abstractmethod incident_ray_directions_to_orientations(incident_ray_directions: torch.Tensor, aim_points: torch.Tensor, device: torch.device | None = None) torch.Tensor
Compute orientation matrices given incident ray directions.
Parameters
- incident_ray_directionstorch.Tensor
The directions of the incident rays as seen from the heliostats. Shape is
[number_of_active_heliostats, 4].- aim_pointstorch.Tensor
The aim points for the active heliostats. Shape is
[number_of_active_heliostats, 4].- devicetorch.device
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill automatically select the most appropriate device (CUDA or CPU) based on availability and OS.
Raises
- NotImplementedError
Whenever called (abstract base class method).
- abstractmethod motor_positions_to_orientations(motor_positions: torch.Tensor, device: torch.device | None = None) torch.Tensor
Compute orientation matrices given the motor positions.
Parameters
- motor_positionstorch.Tensor
The motor positions. Shape is
[number_of_active_heliostats, 2].- devicetorch.device
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill automatically select the most appropriate device (CUDA or CPU) based on availability and OS.
Raises
- NotImplementedError
Whenever called (abstract base class method).
- forward(incident_ray_directions: torch.Tensor, aim_points: torch.Tensor, device: torch.device | None = None) torch.Tensor
Specify the forward operation of the kinematics, i.e., calculate orientation matrices given the incident ray directions.
Parameters
- incident_ray_directionstorch.Tensor
The directions of the incident rays as seen from the heliostats. Shape is
[number_of_active_heliostats, 4].- aim_pointstorch.Tensor
The aim points for the active heliostats. Shape is
[number_of_active_heliostats, 4].- devicetorch.device
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill 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].