03-13-2025, 09:01 AM (This post was last modified: 03-16-2025, 07:28 PM by Albert.)
Hello,
I have recently been working on an exercise in RoboDK where I have created a Simulation that follows a path from AlphaCAM (NC Code).
I generated the Python Script from RoboDK but when I try to run it on a physical robot (UFactory xArm6) the path that the robot follows is nothing like the simulation.
It may be better to start by trying a smaller program, for example, a joint movement and then a linear movement. This is likely due to inconsistencies with the active tool and/or coordinate system.
Can you provide us with the sample RoboDK project? What does the movement on the robot look like? We can better take a look.
I did then, start to take steps backwards and make smaller movements, even a simple rectangular shape. The attached below is the simplified program I created and then tried to generate the python program and run it on the physical robot that we have. It still follows MoveJ commnads, but when it encounters MoveL & MoveC, it begins to curl.
The simulation runs fine, it is just when we try to run the python script on a physical robot it doesn't follow the path correctly.
I just noticed that the controller does not support changing the reference frame (coordinate system), or at least our post processor does not account for it in the robot controller. You can see this by reading the code generated from RoboDK.
Can you try creating targets with respect to the robot base? Do you have the option to manually set your coordinate system on the robot controller? In your case, the location of your Frame 2 is here:
Code:
robot ref frame set to 300.000, 0.000, 80.000, -0.000, 0.000, -0.000
(output from your generated robot program)
Do you see any warnings printed in the console when you run the program?
I changed it with respect to the robot base, and I changed the robot base coordinate system on the robot controller to 0 0 0 0 0 0. It still tends to curl the physical robot. There are no errors in the console when I run the script.
Let's review the kinematics then. To check if the kinematics of the robot are correctly modelled, could you provide us with some points in the joint space, check if the simulation matches the real position of the robot, and the corresponding Cartesian values seen by the robot?
For example:
The robot at the home position with all axes at 0 deg should be in the same position shown in the image. Can you confirm?
Then, the Cartesian values using the robot base and the robot flange (Flange dummy in your project) should be as shown in the image as well:
XYZ=[207 0, 112.0] mm and uvw=[180, 0, 0]
If not, what values do you see?
If it is correct, you can then move one axis by 10 deg and repeat the same procedure until we verify all axes.
It could also be that the Rotation representation or Euler angle format is incorrect in RoboDK and we should not use the XYZuvw format but another Euler format.
The robots home position with all axes at 0 are the same yes. We have since created our own post processor to deal with the issues but the physical robot still doesn't follow the path as it would in the simulation.