11-10-2021, 10:52 AM
Hi, this is a follow-up on my questions in two previous threads (hereandhere), but if I can't solve the issue it would impede the use of RoboDK for our situation. And I think the visual way of building and simulating robot programs in RoboDK is perfect for it, don't get me wrong.
I have a main program which calls the same subprogram (joint move a Meca500 robot TCP to reach a Cartesian target) twice, and in-between the two calls the robot base is moved with respect to the target. In RoboDK's simulation the joint angles are updated automatically according to the movement, and the TCP reaches the target for each call. However, when I export the main program to a .py file (using the Mecademic Python post processor), the subprogram becomes a subfunction with move commands to a fixed robot pose target. It does not take the relative movement between the robot base and the target into account, and so the robot will only reach the target if the actual reference frame happens to coincide with the reference frame at the moment of export.
Could a viable solution be to provide the current reference frame as an input argument for the exported subprogram? I think this is what RoboDK effectively does behind the scenes when running the simulation. How could this be implemented when generating the export robot program (apart from laborious manual post editing)?
Kind regards,
Maarten
I have a main program which calls the same subprogram (joint move a Meca500 robot TCP to reach a Cartesian target) twice, and in-between the two calls the robot base is moved with respect to the target. In RoboDK's simulation the joint angles are updated automatically according to the movement, and the TCP reaches the target for each call. However, when I export the main program to a .py file (using the Mecademic Python post processor), the subprogram becomes a subfunction with move commands to a fixed robot pose target. It does not take the relative movement between the robot base and the target into account, and so the robot will only reach the target if the actual reference frame happens to coincide with the reference frame at the moment of export.
Could a viable solution be to provide the current reference frame as an input argument for the exported subprogram? I think this is what RoboDK effectively does behind the scenes when running the simulation. How could this be implemented when generating the export robot program (apart from laborious manual post editing)?
Kind regards,
Maarten