Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to correctly setup targets?
#11
I have the same kind of problem.

I know which robot configuration (F/N U/D T/B) I have to apply to my FANUC robot targets. I am unable to set it up with the robodk api.

Resulting in bad robot moving.

for reference
https://github.com/RoboDK/RoboDK-API/issues/56
#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 = []

# Iterate through 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.
  




Users browsing this thread:
1 Guest(s)