# Having trouble getting correct homogeneous transformation matrices for my robotic arm

I am working on a project to build and program a robotic arm. And, no, this is not a HW problem. I have watched a ton of tutorials on the HTM, but its still not fully clicking. The image shows my attempt at the matrices and the robotic arm diagram. Are these correct? The robot will consist of a prismatic joint at the base and then two revolute joints. Thanks for the help.

A quick partial answer to help move you forward:

1) Your axis are labeled for a left-handed coordinate system. Use right-handed (swap the x and y axis in your diagram)

3) Frames (Transforms) are placed on the mathematical axis where things move and not necessarily on any body of your device. You are setting yourself up for potential confusion if you draw bodies over your frames as you have done there.

4) Until you have an intuitive understanding, draw 2 axis for each body to help visualize the parameter. You are missing $$q_1$$ (the prismatic motion) and it may help you become proficient quicker if you change $$\theta_1$$ and $$\theta_2$$ to $$q_2$$ and $$q_3$$

5) There are 2 standard sets of parameter->transform maths out there. Know which one you are using. The most common is to first do a parameterized transform about $$z$$ (rotation or linear) and then a constant transform to move the frame to where the next joint is. Until you are comfortable with the math, keep them separate.

6) You should be able to write the matrix for a static transform for any multiple of 90 degrees rotation directly. The first 3 columns of the transform matrix are the rotation component. In the picture below you can see that frame $$B$$ has it's $$x$$ axis pointing in the negative $$y$$ direction, so the $$x$$ axis direction column is $$<0_x,-1_y,0_z>$$. The $$y$$ and $$z$$ axis of $$B$$ are written in a similar way. The position column is just the position of the frame. $$<0_x,3_y,-1_z>$$

So in the end you should have the following transforms (assuming you separate out the parameterized motion as suggested).

Note that frames $$1$$ and $$2q$$ as well as frames $$2$$ and $$3q$$ share the same z axis. Also I guessed at which direction the prismatic joint pointed.

$$H_w^0$$ - Transform from origin to where the prismatic axis starts.

$$H_0^{1q}$$ - Parameterized transform along z axis

$$H_{1q}^1$$ - Transform to end of Link 1 where the first rotation axis starts

$$H_1^{2q}$$ - Parameterized rotation around z axis

$$H_{2q}^2$$ - Transform to end of Link 2 where the second rotation axis starts

$$H_2^{3q}$$ - Parameterized rotation around z axis

$$H_{3q}^{eef}$$ - Transform to end of Link 3 where the end effector frame is

The forward kinematics will be the composition of these matrices.

$$H_0^{eef} = H_w^0 H_0^{1q} H_{1q}^1 H_1^{2q} H_{2q}^2 H_2^{3q} H_{3q}^{eef}$$

• Nice answer. I like how you broke it down into basic steps. – SteveO Oct 1 '19 at 22:44