# Defining a straight line in 3D Space ( 6 axis arm)

#### Sprayman

Joined Mar 31, 2020
11
Hi all,

This might be a bit simple, (Calculus 3 if i remember right?)

Here is my problem. I am running into a problem when my arm after it grabs something. My parts on on little pegs and the arm isn't pulling the part off exactly straight. I get a torque on the wrist when this happens and the program doesn't like that one bit.

Here is my thought. If i know my coordinates when the piece is grabbed, Could i put in some coordinates that would be a straight line away from the coordinates i am currently at?

its a bit of a weird setup. the arm is mounted at a 45 degree angle as are the parts/pegs.

I'll gladly provide more info as necessary. I think what i am mainly looking for right now is the correct equation to use and how to incorporate all the variables correctly.

Thank you!

#### Papabravo

Joined Feb 24, 2006
20,369
Hi all,

This might be a bit simple, (Calculus 3 if i remember right?)

Here is my problem. I am running into a problem when my arm after it grabs something. My parts on on little pegs and the arm isn't pulling the part off exactly straight. I get a torque on the wrist when this happens and the program doesn't like that one bit.

Here is my thought. If i know my coordinates when the piece is grabbed, Could i put in some coordinates that would be a straight line away from the coordinates i am currently at?

its a bit of a weird setup. the arm is mounted at a 45 degree angle as are the parts/pegs.

I'll gladly provide more info as necessary. I think what i am mainly looking for right now is the correct equation to use and how to incorporate all the variables correctly.

Thank you!
I think you want the parametric equations of a line:
$x\;=\;x_0+at\\y\;=\;y_0+bt\\z\;=\;z_0+ct$
Let a, b, c be the destination point and run t from 0 to 1 in any convenient step size. You can pre-calculate the individual moves and just output them at each 'tick' of your velocity clock.

Last edited:

#### cmartinez

Joined Jan 17, 2007
8,086
A while ago I did some parametric programming for ABB robotic arms. What I can tell you is that in order to draw a straight line with them you need to use what are called quaternions. And most of the time a simple movement has more than one solution. That is, there's more than one way to obtain the same thing.

I suggest you do a little digging on quaternions and learn how they work.