Help creating a coordinate system for a robotic arm

Click For Summary

Discussion Overview

The discussion revolves around the mathematical challenges of creating a coordinate system for a robotic arm, specifically focusing on determining the necessary servo angles to align the arm's claw to specified coordinates. The conversation includes geometric considerations, mathematical modeling, and potential solutions to the posed problem.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Exploratory

Main Points Raised

  • One participant describes the robotic arm as a parallelogram with servos adjusting angles to position the claw, providing initial equations for the claw's coordinates.
  • Another participant suggests squaring and adding the initial equations to eliminate one of the angles, leading to a new equation involving sine and cosine functions.
  • A third participant shares a historical approach to a similar problem involving multiple servos and the use of derivatives to calculate servo movements based on desired end positions.
  • A later reply expresses difficulty in following the mathematical steps and presents a modified equation, seeking further clarification on the next steps.
  • Another participant proposes substituting sine with a new variable to transform the equation into a quadratic form for easier solving.
  • One participant notes that in a six-dimensional space, there are multiple paths to reach a final position, suggesting optimization based on various criteria.

Areas of Agreement / Disagreement

Participants present multiple approaches and methods to tackle the problem, indicating that there is no consensus on a single solution or method. The discussion remains exploratory with various competing viewpoints and techniques being shared.

Contextual Notes

Some participants express uncertainty about specific mathematical identities or steps, indicating potential gaps in understanding or missing assumptions in the problem-solving process.

Dreezy
Messages
2
Reaction score
0
Hey guys, I would appreciate some help with the math behind creating a working coordinate system for a robotic arm. I am currently trying to determine what servo angles are necessary to align a robotic arm's claw to the given coordinates. Geometrically simplified, the robotic arm is a parallelogram with two servos at one vertex and one side extended further for the claw. Here is a diagram, pardon my drawing skills:

glIYf.jpg


The sides marked D are parallel and equivalent, as are the sides marked C. E is of fixed length and is attached to C (in reality it is just the extension of the C piece). The servos at bottom vertex DC adjust angles a and b to move sides D and C from the vertical. The claw itself is at the end of E, and x refers to the horizontal distance and y the vertical distance from the origin of the two angles a and b (AKA where the servos are placed).

As for what I have tried, I have calculated the claw's coordinates to be X=D*sin(a)+E*sin(b) and Y=D*cos(a)-E*cos(b), but I am unable to solve the system of equations such that I can determine what to set angles a and b to move the claw to a given point. When using substitution, I only end up with an extremely convoluted equation that my calculator cannot parse, leading me to believe I am going down the wrong path. Any help would be much appreciated!
(Also would like to mention for full transparency that this was cross posted to the Math Stack Exchange to no avail)
 

Attachments

  • glIYf.jpg
    glIYf.jpg
    33.9 KB · Views: 818
Mathematics news on Phys.org
Start with
##D\sin a=X-E\sin b##
##D\cos a=Y-E\cos b##
Square both sides and add the equations to eliminate ##a##. This leaves you with an equation of the form ##C_1\sin b+C_2\cos b+C_3=0##. Can you solve it?
 
  • Like
Likes   Reactions: andrewkirk
Long ago (1975) I had the same problem. I'll sketch the problem and solution here:

  1. Assume that you have a robot arm with 6 servos and 6 position encoders. Name the output of the encoders M1..M6 (machine coordinates).
  2. Assume that you want to position the robot arm + tool at the position (x, y, z) with tool orientation (φ, θ, ψ).
  3. Also assume that you have a set of continuously differentiable functions f1..f6 such that x=f1(M1..M6) etc.
  4. Decide on a δ>0 which shall be used in further calculations.
  5. For each Mi, calculate Δfij=(fj(M1..Mi+δ,..M6)-f1(M1..M6).
  6. You now have all the elements in a 6x6 matrix A[i, j] which is an approximation of the derivative of the 6-dimensional function F(M, X) (machine coordinates to Euclidean coordinates)
  7. Calculate the inverse matrix A-1
  8. Calculate a small step in the direction you want the arm and tool to move - call it \Delta\vec{ X}. Now you know that \Delta\vec{ M}\approx A^{-1}\Delta \vec{X} which gives you the amount every servo should move. Move there.
  9. Calculate the exact position from the machine coordinates.
  10. If you are not at the end position, go to 5.
 
Last edited:
  • Like
Likes   Reactions: berkeman
Thanks Svein for sharing your experience, I was not at all expecting someone on these forums to have dealt with such a thing in the past! Your explanation seems a bit above my math ability at the moment, but I am most certainly going to save this and come back to it when I can better understand it.
kuruman said:
Start with
##D\sin a=X-E\sin b##
##D\cos a=Y-E\cos b##
Square both sides and add the equations to eliminate ##a##. This leaves you with an equation of the form ##C_1\sin b+C_2\cos b+C_3=0##. Can you solve it?
@kuruman I have tried to follow along (though I have made ##E\cos(b)## positive to match my problem) and have ended up with ##(-2x*E)\sin(b)+(2y*E)\cos(b)+(x^2+y^2-D^2+E^2)=0##, but I unfortunately do not know where to go from here. Perhaps I am unaware of some identity or I have just not been following along properly. Thank you for your assistance!
 
This is of the form ##C_1\sin b+C_2 \cos b+C_3=0## where the meaning of the ##C_i## constants is obvious.
Let ##u=\sin b## in which case ##\cos b = \sqrt{1-u^2}##. Substitute and you will have a quadratic in ##u## to solve.
 
In 6D space there are many paths from initial to final position. Once you have figured this out you can optimise the path for least energy or least time or any other feature of the path taken.

Cheers
 

Similar threads

Replies
1
Views
2K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 8 ·
Replies
8
Views
6K
Replies
18
Views
3K
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K