Society of Robots - Robot Forum
Software => Software => Topic started by: tkj on October 21, 2009, 07:02:28 AM
-
Hi everyone.
I'm new in this forum, but I've just got a 6DOF servo robot.
http://www.arexx.com.cn/EnProductShow.asp?ID=123 (http://www.arexx.com.cn/EnProductShow.asp?ID=123)
It is controlled via the serial port (RS232) by sending commands to it.
Please check page 15 in this PDF for more information about the commands: http://www.arexx.com.cn/uploadfiles/6servo_robot_arm_eng.pdf (http://www.arexx.com.cn/uploadfiles/6servo_robot_arm_eng.pdf)
Does anyone know how I will be able to control this robot with "XYZABC" (kinematics)
Also, does anyone of you know a good robot simulator with the kinematics function?
It doesn't have to be 3D, but that would be good though.
Also it doesn't matter if the simulator cost some bucks, as I've got a big budget!
Best Regards
Thomas Jespersen
-
No one who knows anything about this?
No one who can answer just one or a couple of my questions?
Best Regards
Thomas Jespersen
-
Well the datasheet is in something approximating to English.
So how the 'arm' works is (almost) well defined - so I guess your issue is 'how can I use it'
But I dont understand what you mean by: "Does anyone know how I will be able to control this robot with "XYZABC" (kinematics)"
Please explain EXACTLY what your question is - then someone may be able to help.
-
Ok, sorry for the misunderstanding.
You know Inverse Kinematics and Forward Kinematics? What are the calculations to Inverse Kinematics (XYZ+Angle -> Every Joint Angle)
Best Regards
Thomas Jespersen
-
After alot of googling, which didn't gave me the answer, I found two books on the library about Kinematics.
Then I've read about 100 pages, and afterwards I've made this Kinematic code (Visual Basic 6) which works :)
The only problem is that my base servo is only a 180 degrees servo (-90 to 90), so I can only point my robot to one half of the table.
Isn't it possible to make something which inverts the robot when it comes over the base servo limit.
You know, if I want to have the robot go to a point where the base servo have to be 100 degrees, isn't it the possible to make the base servo go to -80 degree and then invert the other servo's?
I have tried inverting the servo degrees by multiplying with -1, but that didn't work as expected (there was a slightly difference!)
Best Regards
Thomas Jespersen
PS. The Visual Basic 6 code is the one below:
'mx = X
'my = up (Z)
'mz = Y
'p = Wrist angle (against ground-plane)
Private Function InverseKinematics(mx As Single, my As Single, mz As Single, p As Single) As Byte
Dim r, pRad, rb, yb, q, p1, p2 As Single
Dim temp_check As Single
On Error GoTo Calculations_Failed
r = Sqr(mx * mx + mz * mz) ' horizontal distance to target
baseAngle = atan2(-mz, -mx) ' angle to the target
pRad = p * 0.0174532925 ' Degrees to Radians
rb = ((r - L3 * Cos(pRad)) / (2 * L1))
yb = ((my - H - L3 * Sin(pRad)) / (2 * L1))
q = (Sqr(1 / (rb * rb + yb * yb) - 1))
p1 = (atan2(yb + q * rb, rb - q * yb))
p2 = (atan2(yb - q * rb, rb + q * yb))
shoulder = p1 - (90 * 0.0174532925) ' angle of the shoulder joint
elbow = p2 - shoulder ' angle of the elbow joint
wrist = pRad - p2 ' angle of the wrist joint
' Convert all values to degrees
baseAngle = baseAngle * 57.2957795
shoulder = shoulder * 57.2957795
elbow = elbow * 57.2957795
elbow = (elbow - 90) * -1
wrist = wrist * 57.2957795
wrist = wrist + 17 ' Correct the over-shooting (this is done to match the AREXX Robot)
' Invert every joint except the base (this is done to match the AREXX Robot)
shoulder = shoulder * -1
elbow = elbow * -1
wrist = wrist * -1
' Check to make sure that the solution is valid
If (rb * rb + yb * yb) > 1 Then ' Impossible due to limited arm length!
InverseKinematics = 1
Exit Function
End If
If Abs(baseAngle) > 90 Then 'Impossible due to limited servo range!
InverseKinematics = 2
Exit Function
End If
If Abs(shoulder) > 90 Then 'Impossible due to limited servo range!
InverseKinematics = 2
Exit Function
End If
If Abs(elbow) > 90 Then 'Impossible due to limited servo range!
InverseKinematics = 2
Exit Function
End If
If Abs(wrist) > 90 Then 'Impossible due to limited servo range!
InverseKinematics = 2
Exit Function
End If
InverseKinematics = 0
Exit Function
Calculations_Failed:
InverseKinematics = 3
End Function
-
Well, its not really 6 DOF, its a 3 DOF arm with a 3 DOF gripper. Generally you can ignore the DOF of the gripper in the forward/inverse kinematics.
Isn't it possible to make something which inverts the robot when it comes over the base servo limit.
You know, if I want to have the robot go to a point where the base servo have to be 100 degrees, isn't it the possible to make the base servo go to -80 degree and then invert the other servo's?
A simple 'if' statement will work.
-
Sorry to correct you, but it's a 4DOF (base, shoulder, elbow, wrist) with a 2DOF gripper (rotate wrist and open/close)
A simple if statement? Could you please explain a little bit more, or make a short example?
-
Sorry to correct you, but it's a 4DOF (base, shoulder, elbow, wrist) with a 2DOF gripper (rotate wrist and open/close)
In many cases, but not all, the wrist is considered part of the gripper and not the arm. By not including wrist rotation angle in the IK, and instead within a sensor loop or if statement, calculation becomes simpler. All DOF can be included in the IK, but fewer DOF means simpler calculations. It really depends on what you are trying to do with the arm.
A simple if statement? Could you please explain a little bit more, or make a short example?
if (bounds exceeded)
angle = -angle;
or something like that, depending on what you are trying to do.
-
That's just what I've tried, but it doesn't work...
The shoulder, elbow and wrist join is inverted - yes - but the arm is not at the complete same position (the arm is not plan with the table, as it was before)
PS. Please take a look at my video about the software and the robot arm in action!
6DOF Robot Arm Kinematics Example (http://www.youtube.com/watch?v=fqgDL0d1cjw#)