Skip to content

Commit

Permalink
Fix disabled_kinematics test
Browse files Browse the repository at this point in the history
- DeprecationWarning: Support for built-in functions called with non-Warp array types
  • Loading branch information
etaoxing committed Feb 21, 2025
1 parent 659e18c commit 72513bb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions warp/tests/sim/disabled_kinematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ def build_ant(num_envs):
dof_start = i * dof_count

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

# joints
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]
Expand All @@ -45,9 +47,9 @@ def build_complex_joint_mechanism(chain_length):
ax1 = wp.normalize(wp.vec3(4.0, -1.0, 2.0))
ax2 = wp.normalize(wp.vec3(-3.0, 4.0, -1.0))
# declare some transforms with nonzero translation and orientation
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))
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))
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))
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))
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))
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))

parent = -1
for _i in range(chain_length):
Expand Down

0 comments on commit 72513bb

Please sign in to comment.