@@ -406,15 +406,9 @@ def test_single_dof_pendulum(setup_sim):
406406 vz = - joint_vel * pend_length * torch .cos (joint_pos )
407407 gt_linear_vel_w = torch .cat ([vx , vy , vz ], dim = - 1 )
408408
409- ax = (
410- - joint_ang_acc_w_y * pend_length * torch .sin (joint_pos )
411- - joint_vel ** 2 * pend_length * torch .cos (joint_pos )
412- )
409+ ax = - joint_ang_acc_w_y * pend_length * torch .sin (joint_pos ) - joint_vel ** 2 * pend_length * torch .cos (joint_pos )
413410 ay = torch .zeros (2 , 1 , device = scene .device )
414- az = (
415- - joint_ang_acc_w_y * pend_length * torch .cos (joint_pos )
416- + joint_vel ** 2 * pend_length * torch .sin (joint_pos )
417- )
411+ az = - joint_ang_acc_w_y * pend_length * torch .cos (joint_pos ) + joint_vel ** 2 * pend_length * torch .sin (joint_pos )
418412 gt_linear_acc_w = torch .cat ([ax , ay , az ], dim = - 1 )
419413
420414 # skip first step where initial velocity is zero
@@ -562,15 +556,9 @@ def test_indirect_attachment(setup_sim):
562556 vz = - joint_vel * pend_length * torch .cos (joint_pos )
563557 gt_linear_vel_w = torch .cat ([vx , vy , vz ], dim = - 1 )
564558
565- ax = (
566- - joint_ang_acc_w_y * pend_length * torch .sin (joint_pos )
567- - joint_vel ** 2 * pend_length * torch .cos (joint_pos )
568- )
559+ ax = - joint_ang_acc_w_y * pend_length * torch .sin (joint_pos ) - joint_vel ** 2 * pend_length * torch .cos (joint_pos )
569560 ay = torch .zeros (2 , 1 , device = scene .device )
570- az = (
571- - joint_ang_acc_w_y * pend_length * torch .cos (joint_pos )
572- + joint_vel ** 2 * pend_length * torch .sin (joint_pos )
573- )
561+ az = - joint_ang_acc_w_y * pend_length * torch .cos (joint_pos ) + joint_vel ** 2 * pend_length * torch .sin (joint_pos )
574562 gt_linear_acc_w = torch .cat ([ax , ay , az ], dim = - 1 )
575563
576564 # skip first step where initial velocity is zero
0 commit comments