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

Change Robot Linked of a target via API (seems not possible ?)

#1
Hello, I have tried to change the robot linked to a target via python API but with no results. It seems that target.setParent(robot) just moves the target in the station tree under robot but it does not link the robot to the target.  

Currently I create new targets under specific robot reference frames with:
new_target = RDK.AddTarget("Current_Position",robot_ref_frame), but the target remains linked with one robot (the first robot from the station). 

Is there any chance or workaround to change the linked robot of a target by API ?

Many Thanks,
Cozmin, UPB
#2
You should use the setLink function to link a target to a specific robot (not the setParent).
#3
Thank you Albert.

For others who encounter this problem, try to upgrade RoboDK.
I have upgraded from 5.3 to 5.6 and now setLink(robot) works.

Best regards,
Cozmin
#4
Great, thank you for your feedback.
  




Users browsing this thread:
1 Guest(s)