Skip to content

Commit 72513bb

Browse files
committed
Fix disabled_kinematics test
- DeprecationWarning: Support for built-in functions called with non-Warp array types
1 parent 659e18c commit 72513bb

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

warp/tests/sim/disabled_kinematics.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ def build_ant(num_envs):
2626
dof_start = i * dof_count
2727

2828
# base
29-
builder.joint_q[coord_start : coord_start + 3] = [i * 2.0, 0.70, 0.0]
30-
builder.joint_q[coord_start + 3 : coord_start + 7] = wp.quat_from_axis_angle((1.0, 0.0, 0.0), -math.pi * 0.5)
29+
p = [i * 2.0, 0.70, 0.0]
30+
q = wp.quat_from_axis_angle(wp.vec3(1.0, 0.0, 0.0), -math.pi * 0.5)
31+
builder.joint_q[coord_start : coord_start + 3] = p
32+
builder.joint_q[coord_start + 3 : coord_start + 7] = q
3133

3234
# joints
3335
builder.joint_q[coord_start + 7 : coord_start + coord_count] = [0.0, 1.0, 0.0, -1.0, 0.0, -1.0, 0.0, 1.0]
@@ -45,9 +47,9 @@ def build_complex_joint_mechanism(chain_length):
4547
ax1 = wp.normalize(wp.vec3(4.0, -1.0, 2.0))
4648
ax2 = wp.normalize(wp.vec3(-3.0, 4.0, -1.0))
4749
# declare some transforms with nonzero translation and orientation
48-
tf0 = wp.transform(wp.vec3(1.0, 2.0, 3.0), wp.quat_from_axis_angle((1.0, 0.0, 0.0), math.pi * 0.25))
49-
tf1 = wp.transform(wp.vec3(4.0, 5.0, 6.0), wp.quat_from_axis_angle((0.0, 1.0, 0.0), math.pi * 0.5))
50-
tf2 = wp.transform(wp.vec3(7.0, 8.0, 9.0), wp.quat_from_axis_angle((0.0, 0.0, 1.0), math.pi * 0.75))
50+
tf0 = wp.transform(wp.vec3(1.0, 2.0, 3.0), wp.quat_from_axis_angle(wp.vec3(1.0, 0.0, 0.0), math.pi * 0.25))
51+
tf1 = wp.transform(wp.vec3(4.0, 5.0, 6.0), wp.quat_from_axis_angle(wp.vec3(0.0, 1.0, 0.0), math.pi * 0.5))
52+
tf2 = wp.transform(wp.vec3(7.0, 8.0, 9.0), wp.quat_from_axis_angle(wp.vec3(0.0, 0.0, 1.0), math.pi * 0.75))
5153

5254
parent = -1
5355
for _i in range(chain_length):

0 commit comments

Comments
 (0)