update the comparison results.
This commit is contained in:
@ -107,9 +107,9 @@ def demo_position_control():
|
||||
|
||||
result = np.array([[0,0],[0,0]], dtype=np.int32) # qp_fk, qp_ik, rm_fk, rm_ik
|
||||
|
||||
solve_sum = 0
|
||||
|
||||
|
||||
for i in range(1000):
|
||||
for i in range(2000):
|
||||
print(f'\n-------------- in i = {i} ----------------')
|
||||
joint_rand = np.random.uniform(ub/180*pi, lb/180*pi)
|
||||
print(f'the predefined joints are {joint_rand}')
|
||||
@ -135,8 +135,8 @@ def demo_position_control():
|
||||
joint_rand_init = np.random.uniform(ub/180*pi, lb/180*pi)
|
||||
print(f'the guess is {joint_rand_init}')
|
||||
joint_solution, success, error, ite = robot_kine_qp.inverse_kinematics(
|
||||
t_p[0:3], target_rpy=t_p[3:6], initial_guess=joint_rand_init,
|
||||
max_iter=500, debug=False, tool=tool_name)
|
||||
t_p[0:3], target_rpy=t_p[3:6], initial_guess=joint_rand_init,
|
||||
max_iter=500, debug=False, tool=tool_name)
|
||||
print(f'joint_solution = {joint_solution}, success = {success}, error = {error}, ite = {ite}')
|
||||
|
||||
if success:
|
||||
@ -163,7 +163,11 @@ def demo_position_control():
|
||||
else:
|
||||
print(f'== fail in the rm ik, ret = {ret}y, q = {q}')
|
||||
|
||||
if success or ret == 0:
|
||||
solve_sum += 1
|
||||
|
||||
print(f'result is {result}')
|
||||
print(f'solve_sum is {solve_sum}')
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user