嗨,杰里米,我尝试两种方法和共同价值es 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.
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.