Trajectories: screws.trajectory¶
Trajectory generation: time scalings and point-to-point paths. MR chapter 9.
Portions derived from the Modern Robotics code library, Copyright (c) 2018 Huan Weng, Bill Hunt, Jarvis Schultz, Mikhail Todes (MIT).
cubic_time_scaling ¶
cubic_time_scaling(T_final, t)
s(t) = 3 (t/T)^2 - 2 (t/T)^3: rest-to-rest with zero end velocities. MR 9.2.1, eq. 9.9; notes 9.2.
Source code in screws/trajectory.py
25 26 27 28 | |
quintic_time_scaling ¶
quintic_time_scaling(T_final, t)
s(t) = 10 (t/T)^3 - 15 (t/T)^4 + 6 (t/T)^5: zero end velocities and accelerations. MR 9.2.1, eq. 9.12.
Source code in screws/trajectory.py
31 32 33 34 | |
joint_trajectory ¶
joint_trajectory(
theta_start, theta_end, T_final, N, scaling="quintic"
)
A straight line in joint space, N rows from theta_start to theta_end over T_final seconds.
Row k is at time k T_final / (N - 1). MR 9.2, eq. 9.7; notes 9.2.
Source code in screws/trajectory.py
50 51 52 53 54 55 56 | |
screw_trajectory ¶
screw_trajectory(
X_start, X_end, T_final, N, scaling="quintic"
)
A screw motion from X_start to X_end: X(s) = X_start exp(log(X_start^{-1} X_end) s).
N transformations; the body follows one constant screw axis. MR 9.2.3, eq. 9.14; notes 9.2.
Source code in screws/trajectory.py
59 60 61 62 63 64 65 66 | |
cartesian_trajectory ¶
cartesian_trajectory(
X_start, X_end, T_final, N, scaling="quintic"
)
A straight-line motion of the origin with a rotation interpolated separately.
p(s) = p_start + s (p_end - p_start), R(s) = R_start exp(log(R_start^T R_end) s). MR 9.2.3, eq. 9.15; notes 9.2.
Source code in screws/trajectory.py
69 70 71 72 73 74 75 76 77 78 | |