Skip to content

Commit

Permalink
Refactor tests and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Phylliade committed Jul 28, 2024
1 parent 4b9d46e commit 9e4b2f8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/ikpy/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.3.4'
__version__ = '3.4'
26 changes: 14 additions & 12 deletions tests/test_dh_UR10.py → tests/test_chain_dh.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,17 @@ def create_dh_robot(robot):
chain = Chain(links, name=robot.robot_name)
return chain

robot = UR10()
chain = create_dh_robot(robot)
frame = [[1.112918581, -0.209413742, 0.19382176], [0.0, 1.0, 0.0]]
target_position, target_orientation = frame
joint_angles = chain.inverse_kinematics(target_position=target_position, target_orientation=target_orientation, orientation_mode="Z")

print(joint_angles)

fig, ax = plot.init_3d_figure()
chain.plot(robot.home_config, ax)
chain.plot(joint_angles, ax)
plt.show()

def test_dh_chain():
robot = UR10()
chain = create_dh_robot(robot)
frame = [[1.112918581, -0.209413742, 0.19382176], [0.0, 1.0, 0.0]]
target_position, target_orientation = frame
joint_angles = chain.inverse_kinematics(target_position=target_position, target_orientation=target_orientation, orientation_mode="Z")

print(joint_angles)

fig, ax = plot.init_3d_figure()
chain.plot(robot.home_config, ax)
chain.plot(joint_angles, ax)
plt.savefig("out/UR10.png")

0 comments on commit 9e4b2f8

Please sign in to comment.