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

Difficulty using MoveL_Test and MoveJ_Test

#1
Hello, 

I'm struggling to properly use MoveL_Test. I know the linear move is feasible in the simulation and on-line. (I've successfully run the move many times on-line), but MoveL_Test returns -2. Would you please help me understand how I'm calling this method incorrectly?

Code:
# Get current robot joints:
j1 = robot.Joints().tolist()
# Get target pose w.r.t the robot base:
pose = target.PoseWrt(item=robot.Parent())
result = robot.MoveL_Test(j1=j1, pose=pose, minstep_mm=1)


Attached Files Thumbnail(s)
Screenshot 2025-05-01 091200.png   
#2
You should provide the pose of the active tool with respect to the active reference (not the robot base) to the MoveL_Test function.

Assuming the target is already attached to the right coordinate system you don't need to use the PoseWrt function. So you should be able to do something like this:
Code:
# Get current robot joints:
j1 = list(robot.Joints())
# Get the target pose:
pose = target.Pose()
result = robot.MoveL_Test(j1=j1, pose=pose, minstep_mm=1)
#3
Thanks Albert. The documentation for MoveL_Test says that the robot "will be placed at the destination pose if a collision is not detected". However, the robot (6-axis) is moved to [0, 0, 0, 0, 0, 0], which is NOT what the robot joints should be at the target.
#4
Can you provide the RoboDK station project? And the joints and target to reproduce this issue?

Just the robot with the tool, target and coordinate system is enough. We can take a deeper look and fix this if it is a bug.
#5
(05-02-2025, 07:57 AM)Albert Wrote: Can you provide the RoboDK station project? And the joints and target to reproduce this issue?

Just the robot with the tool, target and coordinate system is enough. We can take a deeper look and fix this if it is a bug.

Hi Albert,

Here is a snippet of code and I have attached the associated station file.
Code:
rdk = Robolink()
robot = rdk.Item("Fanuc-M-20iD-35-Web-A1", ITEM_TYPE_ROBOT)
frame = rdk.Item("TranWeb2_Assm-A1", ITEM_TYPE_FRAME)
tool = rdk.Item("Tool 3", ITEM_TYPE_TOOL)
robot.setPoseFrame(frame=frame)
robot.setPoseTool(tool=tool)
j1 = robot.Joints().tolist()
target = rdk.Item("PK_TranWeb2_Assm-A1_App1", ITEM_TYPE_TARGET)
result = robot.MoveL_Test(j1=j1, pose=target.Pose(), minstep_mm=1)
end_joints = [round(joint, 1) for joint in robot.Joints().tolist()]
if result == 0:
    print(f"Successfully moved robot to target. End joints: {end_joints}")
elif result == -1:
    print(f"Cannot make a linear move to target. End joints: {end_joints}")
elif result == -2:
    print(f"Cannot move to target. End joints: {end_joints}")
else:
    pass




.rdk   test_station.rdk (Size: 1.5 MB / Downloads: 81)
  




Users browsing this thread:
1 Guest(s)