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

MoveJ to Cartesian target exported as MoveJ to pose target?

#1
I have a target defined in Cartesian space, and a program which makes a Mecademic 500 robot go there via a "MoveJ" joint move. The generated robot program contains these relevant commands:

robot.Run('SetWRF', [0.000, 280.000, 0.000, 0.000, 90.000, -90.000])
robot.Run('MoveJoints', [37.303900, 4.182890, -0.568555, 85.270100, -37.453300, -84.049700])

where MoveJoints sets the six joint angles as stored in the target properties under "Robot joints". When run, the robot moves to the Cartesian target as expected.

Now I move the base of the robot and re-run the program. The simulation in RoboDK updates the joint angles (which now have different values since the base was moved), and the robot again reaches the Cartesian target.

When I again generate a robot program, the values of SetWRF command are changed as expected because the base position of the robot has changed. However the values of the MoveJoints command remain the same values as stored in the target properties under "Robot joints". They do not match the updated joint angles in the RoboDK simulation. Since MoveJoints is a robot pose command independent of SetWRF, the robot will not reach the target, unlike the simulation.

So RoboDK's "MoveJ" command to a Cartesian target seems to be exported as a "MoveJoints" to a pose target instead. The joint angles stored in the target properties under "Robot joints" are maintained, despite the robot should take a different pose to account for its base having moved. What am I missing?

Kind regards,

Maarten
#2
Hi Maarten,

This is a very good question.
I think you are understanding the situation pretty well.
When you are moving the frame, all the cartesian positions of all the targets are recalculated, but it's not the case for all the joint values.
I think it was a performance choice we did at some point as we would have to recalculate the invert kinematic of a potentially very large number of targets at once.

You can update the Robot Joints using two different methods.
1 -右键单击公关ogram -> Recalculate targets
This will recalculate the joint value of all targets in the program.

2 - Select the target in the tree (this will bring the robot to the target, make sure the right tool and right frame are activated) -> Right-Click the target -> Teach Current position.

Jeremy
Find useful information about RoboDK and its features by visiting ourOnline Documentationand by watching tutorials on ourYoutube Channel.


#3
Hi Jeremy, I tried both methods and the joint values corresponding to the target are indeed updated correctly, including the values of the MoveJoints command in the output .py file.

The issue that remains is when I have a program which calls the same sub-program (moving to the target) twice, and in-between the two calls the frame is moved. The sub-program is only defined once, while it should have different values for the two calls. In RoboDk's simulation the values are updated automatically for each call, but in the output program this information is lost.

Could it be that a joint move to a Cartesian target and a joint move to a robot pose are getting mixed up? I think a joint move to a Cartesian target should be post-processed to a "MovePose(x,y,z,alpha,beta,gamma)" command, which takes the values of the SetWRF command into account. A joint move to a pose target should be a "MoveJoints(a1,a2,a3,a4,a5,a6)" command (as it is now).

But even then, the SetWRF command defined in the sub-program in the output file would still be stuck with fixed values unlike the simulation which updates them in accordance with the moved frame.




Users browsing this thread:
1 Guest(s)