Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use the command MoveL_Test
#1
I want to know if linear movement between two targets is possible. For this I have created a function where I use the command moveL_Test and SolveFK. Unfortunately in all the L movements that the robot performs the result is -2 but the robot can perform L movements. 

Please could you check my function and tell me what I should correct. 

PHP Code:
def move_L_test(target_pallet_i):
 
   TCP_ITEM RDK.Item('TCP A'ITEM_TYPE_TOOL)
 
   
    pose_1 
CalculatePoseFrame2Object(frame_robotTCP_ITEM)
 
   ti_1 RDK.AddTarget("position_1"frame_robot)
 
   ti_1.setPose(pose_1)
 
   startpoint ti_1.Joints()
 
   
    ti_2 
RDK.AddTarget("position_2"frame_pallet)
 
   ti_2.setPose(target_pallet_i)
 
   pose_2 CalculatePoseFrame2Object(frame_robotti_2)
 
   joints robot.SolveFK(pose_2,robot.PoseTool())
 
   
    issues 
robot.MoveL_Test(startpointjoints)
 
   
    RDK
.ShowMessage(str(issues))
 
   
    ti_1
.Delete()
 
   ti_2.Delete() 
#2
You're using forward kinematics SolveFK(), where you should be using inverse kinematics SolveIK(). The first returns the robot (flange or tool) pose given its joint values, the latter returns a set of joint values given a robot (flange or tool) pose.

Also be mindful that "pose_1" will be the pose of the tool "TCP_ITEM" (w.r.t the "frame_robot"), which is not necessarily the pose of the TCP.

Best regards,

Maarten
#3
Hallo Maarten, 

thank you for your reply, I corrected the function now it works quite as I expected. The function gives back -1 when the linear movement is not possible but when it is possible it gives me back the value 5 (the box, the saug greifer and the base of the robot attached to the extender is also red) do you know what does it mean the value 5? and why the color red? I did not activate collision. 

PHP Code:
def move_L_test(target_pallet_i):
 
   
    ti_2 
RDK.AddTarget("position_2"frame_pallet)
 
   ti_2.setPose(target_pallet_i)
 
   pose_2 CalculatePoseFrame2Object(frame_palletti_2)
 
   pose robot.SolveIK(pose_2,robot.PoseTool())
 
   
    issues 
robot.MoveL_Test(robot.Joints(), pose_2)
 
   
    RDK
.ShowMessage(str(issues))
 
   
    ti_2
.Delete() 

Thanks
Libia
  




Users browsing this thread:
1 Guest(s)