artist.field.kinematics_rigid_body
Attributes
A logger for the rigid body kinematics. |
Classes
Initialize a rigid body kinematics. |
Module Contents
- artist.field.kinematics_rigid_body.log
A logger for the rigid body kinematics.
- class artist.field.kinematics_rigid_body.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:
artist.field.kinematics.KinematicsInitialize 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_heliostatsint
The number of heliostats using this rigid body kinematics.
- heliostat_positionstorch.Tensor
The positions of all heliostats. Shape is
[number_of_heliostats, 4].- initial_orientationstorch.Tensor
The initial orientation offsets of all heliostats. Shape is
[number_of_heliostats, 4].- translation_deviation_parameterstorch.Tensor
Kinematics translation deviation parameter. Shape is
[number_of_heliostats, 9].- rotation_deviation_parameterstorch.Tensor
Kinematics rotation deviation parameter. Shape is
[number_of_heliostats, 4].- actuator_parameters_non_optimizabletorch.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_optimizabletorch.Tensor
The optimizable actuator parameters. Shape is
[number_of_heliostats, 2, 2]for linear actuators or[]for ideal actuators (default istorch.tensor([])).- devicetorch.device | None
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.
- number_of_heliostats
- heliostat_positions
- initial_orientations
- motor_positions
- translation_deviation_parameters
- rotation_deviation_parameters
- number_of_active_heliostats = 0
- active_heliostat_positions
- active_initial_orientations
- active_translation_deviation_parameters
- active_rotation_deviation_parameters
- active_motor_positions
- actuators: artist.field.actuators.Actuators
- kinematics_standard_orientation
- initial_orientation_offsets
- homogeneous_origin
- _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.
This is the forward kinematics.
Parameters
- motor_positionstorch.Tensor
The motor positions. Shape is
[number_of_active_heliostats, 2].- devicetorch.device | None
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].
- _compute_motor_positions_from_normal(normals: torch.Tensor, epsilon: float = 1e-08, device: torch.device | None = None) torch.Tensor
Compute the motor positions from a normal vector.
This is the inverse kinematics. First the joint angles are computed from the desired normal vector. Then the motor positions are computed from the joint angles. The inverse kinematics produces two solutions, the valid solution is chosen according to resulting motor positions which must lie within the minimum and maximum allowed motor positions defined in the actuator parameters.
Parameters
- normalstorch.Tensor
Concentrator normals. Shape is
[number_of_active_heliostats, 4].- epsilonfloat
Small value to avoid divisions by zero (default is 1e-8).
- devicetorch.device | None
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 joint angles. Shape is
[number_of_active_heliostats, 2].
- 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 | None
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].
- incident_ray_directions_to_orientations(incident_ray_directions: torch.Tensor, aim_points: torch.Tensor, device: torch.device | None = None, max_num_iterations: int = 4, min_eps: float = 0.0001) 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 | None
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.- max_num_iterationsint
Maximum number of iterations (default is 4).
- min_epsfloat
Convergence criterion (default is 0.0001).
Returns
- torch.Tensor
The orientation matrices. Shape is
[number_of_active_heliostats, 4, 4].