07-12-2022, 12:45 PM
Your suggestion of using RunInstruction to insert code in your generated program is a valid option if you are using the API:
On the other hand, you can customize the post processor to generate the code you would like to have for joint speed changes. For example, to customize the behavior of setting the joints you could edit the KUKA KRC4 post processor by adding this function inside the main class:
你会发现更多的信息和有用的例子ere:
//m.sinclairbody.com/doc/en/Post-Processor...ampleSpeed
Code:
robot.RunInstruction("$VEL_AXIS[1]=50", INSTRUCTION_INSERT_CODE)
On the other hand, you can customize the post processor to generate the code you would like to have for joint speed changes. For example, to customize the behavior of setting the joints you could edit the KUKA KRC4 post processor by adding this function inside the main class:
Code:
def setSpeedJoints(self, speed_degs):
"""Changes the robot joint speed (in deg/s)"""
# Set the real joint speed:
for i in range(6):
self.addline('$VEL_AXIS[%i] = %.5f' % (i+1, speed_degs))
# Set the pose orientation
# self.addline('$VEL.ORI1 = %.5f' % speed_degs)
# self.addline('$VEL.ORI2 = %.5f' % speed_degs)
你会发现更多的信息和有用的例子ere:
//m.sinclairbody.com/doc/en/Post-Processor...ampleSpeed