mirror of https://github.com/Nonannet/copapy.git
numpy dependency removed for rev kin test
This commit is contained in:
parent
2b2f854ee4
commit
1c230f365f
|
|
@ -1,11 +1,10 @@
|
||||||
import numpy as np
|
|
||||||
import copapy as cp
|
import copapy as cp
|
||||||
|
|
||||||
# Arm lengths
|
# Arm lengths
|
||||||
l1, l2 = 1.8, 2.0
|
l1, l2 = 1.8, 2.0
|
||||||
|
|
||||||
# Target position
|
# Target position
|
||||||
target = np.array([0.7, 0.7])
|
target = cp.vector([0.7, 0.7])
|
||||||
|
|
||||||
# Learning rate for iterative adjustment
|
# Learning rate for iterative adjustment
|
||||||
alpha = 0.1
|
alpha = 0.1
|
||||||
|
|
@ -41,7 +40,8 @@ def test_two_arms():
|
||||||
|
|
||||||
print(f"Joint angles: {tg.read_value(theta)}")
|
print(f"Joint angles: {tg.read_value(theta)}")
|
||||||
print(f"Joint position: {tg.read_value(joint)}")
|
print(f"Joint position: {tg.read_value(joint)}")
|
||||||
print(f"End-effector position: {tg.read_value(effector)} quadratic error = {tg.read_value(error)}")
|
print(f"End-effector position: {tg.read_value(effector)}")
|
||||||
|
print(f"quadratic error = {tg.read_value(error)}")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue