crx_kinematics_py.utils.geometry module

crx_kinematics_py.utils.geometry.construct_plane(dir1, dir2)
crx_kinematics_py.utils.geometry.find_third_triangle_corner(AB, AC, BC)
Given a triangle where
  1. The lengths of each side are known,

  2. The first corner is at (0, 0)

  3. The second corner is at (AB, 0)

Returns the position (x, y) of the third triangle. Note that flipping the sign of y also is a valid solution, hence both solutions are returned

C = (x, y)

/ / A ———- B = (AB, 0)

https://math.stackexchange.com/a/544025

crx_kinematics_py.utils.geometry.find_zeros(sample_signal_up, sample_signal_down, sample_signal_x, fn)

Step 5 of Abbes and Poisson (2024). Given sampled dot products (e.g. Figure 7), find accurately the roots.

crx_kinematics_py.utils.geometry.get_dual_ik_solution(ik_solution)

Quote from Step 7: For CRX cobots, when a solution [J] (6 joint parameters) is valid for a Desired-Pose, it is easy to verify that the other corresponding solution, called the dual solution, is also valid.

crx_kinematics_py.utils.geometry.harmonize_towards_zero(joint_values)

https://stackoverflow.com/questions/28313558/how-to-wrap-a-number-into-a-range

crx_kinematics_py.utils.geometry.isometry_inv(T)

Returns the inverse of a 4x4 matrix representation of an isometry (rigid transformation). This is essentially a faster version of the more general np.linalg.inv.

Example: >>> T = tr.random_rotation_matrix() >>> T[:3, 3] = tr.random_vector(3) >>> T_inv = isometry_inv(T) >>> np.allclose(T_inv, np.linalg.inv(T)) True

crx_kinematics_py.utils.geometry.normalized(arr)
crx_kinematics_py.utils.geometry.vector_projection(a, b)

Returns the vector projection of a onto b. https://en.wikipedia.org/wiki/Vector_projection

crx_kinematics_py.utils.geometry.vector_rejection(a, b)

Returns the vector rejection of a from b. In other words, the orthogonal component of a that is perpendicular to b. https://en.wikipedia.org/wiki/Vector_projection