LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.81k stars 1.16k forks source link

Scarakins limitations and bugs. #620

Open sliptonic opened 5 years ago

sliptonic commented 5 years ago

The kinematics for scara style robots is very limited and has several problems when used on real robots: For reference: The kinematics assumes that rotational joints 0 and 1 have their 0 point with the arms pointed directly along the X axis in the X positive direction. Positive rotation results in counterclockwise movement looking down on the robot.

Please see this forum thread for additional information: https://forum.linuxcnc.org/10-advanced-configuration/36815-scara-kinematics

Here are the steps I follow to reproduce the issue:

  1. the robot is homed in a pose where joint1 is > 90 degrees from joint0 (ie rotated counterclockwise more than 90 degrees) 2.It is placed it teleop/world mode.
  2. Jog +X. As the joints straighten out, Joint1 will cross from >90 to <90 degrees. At that point, the kinematics calculations fails and the robot has a violent following error. This can be duplicated in the scara sim but requires changing the home position of joint1.

If the robot is homed in a pose where joint1 is <0 (the arm is 'bent to the right') the kinematics don't fail.

Under any circumstances, if the robot reaches a point where joint1 is at 0 degrees (both arms pointing in the same direction), it is unable to move out of this position again. Jogging even close to this position is dangerous as movement becomes entirely one joint or the other, the robot tends to accelerate into a violent following error.

This is what I expected to happen:

Normal controlled motion in all areas of the usable envelope.

This is what happened instead:

Rapid uncontrolled acceleration at the corners and at points where Joint1 moved past the +90 degree point.

Information about my hardware and software:

rene-dev commented 5 years ago

this is a general problem with the way kinematics work in linuxcnc: #97