This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def transform_matrix_tensor(theta, d, a, alpha): | |
# tensor version of transform matrix | |
matrix = [[tf.cos(theta), tf.multiply(-tf.sin(theta), tf.cos(alpha)), tf.multiply(tf.sin(theta), tf.sin(alpha)), tf.multiply(a, tf.cos(theta))], | |
[tf.sin(theta), tf.multiply(tf.cos(theta), tf.cos(alpha)), tf.multiply(-tf.cos(theta), tf.sin(alpha)), tf.multiply(a, tf.sin(theta))], | |
[tf.zeros_like(theta), tf.sin(alpha), tf.cos(alpha), d], | |
[tf.zeros_like(theta), tf.zeros_like(theta), tf.zeros_like(theta), tf.ones_like(theta)]] | |
return matrix | |
def forward_kinematics_loss_2(y_true, y_pred): | |
# y_true is the xy position |
NewerOlder