(
problem,
m1: Type[None],
T1_0,
R1_0,
T1,
R1,
val: Tuple[float, float, float],
scale: float = 1,
)
| 527 | |
| 528 | |
| 529 | def fixed_rotation_cost( |
| 530 | problem, |
| 531 | m1: Type[None], |
| 532 | T1_0, |
| 533 | R1_0, |
| 534 | T1, |
| 535 | R1, |
| 536 | val: Tuple[float, float, float], |
| 537 | scale: float = 1, |
| 538 | ): |
| 539 | |
| 540 | q = gp_Quaternion() |
| 541 | q.SetEulerAngles(gp_Extrinsic_XYZ, *val) |
| 542 | q_dm = ca.DM((q.W(), q.X(), q.Y(), q.Z())) |
| 543 | |
| 544 | dummy = 1 - ca.dot(ca.vertcat(*Quaternion(R1_0 + R1)), q_dm) ** 2 |
| 545 | |
| 546 | return dummy |
| 547 | |
| 548 | |
| 549 | # dictionary of individual constraint cost functions |
nothing calls this directly
no test coverage detected