07-29-2024, 07:30 AM
Hi,
I'm currently working on generating a list of joint angles for a UR5e robot using RoboDK, and I've noticed that the output joint angles' acceleration ramps up very quickly. Is there any way to control or adjust the rate at which the acceleration ramps up (i.e., control the jerk)? Additionally, how accurate is the timing when using the InstructionListJoints() command with the flag set to 4, so the outputted joint angles are split based on timing increments compared to a running it on a real UR5e?
I'm using RoboDK to generate a sequence of joint angles at 2ms intervals from a program using the InstructionListJoints() command. Here is an example of the code I'm using to find the list of joint angles for a path:
Code:
def create_joint_angle_path(robot_file_path="C:/RoboDK/Library/UR5e.robot") -> bool:
RDK = robolink.Robolink()
robot = RDK.AddFile(robot_file_path)
robot.MoveJ(robot.JointsHome())
if not robot.Valid():
print("Failed to load robot.")
return False
robot.MoveJ([0.000000, -90.000000, -90.000000, 0.000000, 90.000000, 0.000000])
program = RDK.AddProgram("UR5e_path", robot)
program.MoveJ([0.000000, -90.000000, -90.000000, 0.000000, 90.000000, 0.000000])
program.MoveJ([18.314638, -92.959960, -80.024722, 14.043931, 72.834395, -6.483384])
output_file_path = os.path.join("..", "output_files", "path.txt")
message, joint_list, status = program.InstructionListJoints(
save_to_file=output_file_path, flags=4, time_step=0.002
)
if status < 0:
print("status ", status)
print("message ", message)
return False
print("Joint angles exported to", output_file_path)
return True
Here is what the output of the joint q and qdd looks like when it's plotted out. I'm concerned with how quickly the acceleration ramps up to the maximum and whether the actual UR5e will be able to handle this. Is there any way to make the acceleration ramp-up more gradual? There might also be a better way of getting the joint lists.
Cheers for any help or advice.