Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

How to correctly setup targets?

#12
I replied to the thread on GitHub with an example to pick a joint solution based on a desired configuration. I'm also pasting the example here:

Code:
# Retrieve all solutions for a given pose:
all_solutions = robot.SolveIK_All(pose, toolpose, framepose)
joints = []

#迭代刺ough each solution
for j in all_solutions:
# Retrieve flags as a list for each solution
conf_RLF = robot.JointsConfig(j).list()

# Breakdown of flags:
rear = conf_RLF[0] # 1 if Rear , 0 if Front
lower = conf_RLF[1] # 1 if Lower, 0 if Upper (elbow)
flip = conf_RLF[2] # 1 if Flip , 0 if Non flip (Flip is usually when Joint 5 is negative)

# Look for a solution with Front and Elbow up configuration
#if conf_RLF[0:2] == [0,0]:
if rear == 0 and lower == 0:
print("Solution found!")
joints = j
break


We'll be updating the documentation in the upcoming days to also show this example.


Messages In This Thread
How to correctly setup targets? - byNox- 11-13-2019, 02:28 PM
RE: How to correctly setup targets? - byAlbert- 11-13-2019, 03:01 PM
RE: How to correctly setup targets? - byNox- 11-14-2019, 07:48 AM
RE: How to correctly setup targets? - byAlbert- 11-18-2019, 12:42 PM
RE: How to correctly setup targets? - byJeremy- 10-13-2020, 02:08 PM
RE: How to correctly setup targets? - byJeremy- 10-15-2020, 12:57 PM
RE: How to correctly setup targets? - byJeremy- 10-16-2020, 01:59 PM
RE: How to correctly setup targets? - bysancelot- 10-29-2020, 08:59 AM
RE: How to correctly setup targets? - byAlbert- 10-30-2020, 01:35 PM
RE: How to correctly setup targets? - byAlbert- 07-31-2022, 07:54 AM



Users browsing this thread:
1 Guest(s)