Custom Part Manufacturing Guide
Calculating Kinematics of a CTR
Graph Paper In-Plane Bending Experiment
Out-of-Plane Rotation Experiment
We will be implementing kinematics for our CTR in MATLAB. Download code from https://github.com/comet-lab/CTR_Educational_Platform/tree/main if you have not done so already. This repo contains a template file for your kinematics, and example script for running the kinematics, and some test points to verify that your function is correct.
<aside> ð We use the notation below that $\rho_1$ is the translation of tube 1, and $d_1$ is the length of the curved section of tube 1. This applies to carts of different numbers accordingly.
</aside>
Open the Robot.m class in MATLAB. You will notice that there are several functions with no code in them. You will be responsible for filling out these functions. First, aim to get kinematics working with two tubes. Then, if it all works well, try to implement with three tubes.
Fill in the get_links() function. This function gets the link lengths in order. The best way to calculate link lengths is to calculate the location of each transition point and sort them by length. Then subtract each transition point from the previous (i.e. $l_1=T_2-T_1$).
<aside> ð
Here, and for the rest of the implementation, you may assume that $\rho_1 âĪ \rho_2 âĪ \rho_3$. You may also assume that $\rho_2 âĪd_1$.
</aside>
Fill in the calculate_phi_and_kappa() function. You can assume for two tubes that in any configuration, the links will always be the same. The first link will have the curved section of outer tube and the straight section of inner tube. The second link will have the curved section of both tubes. The third link will only have the curved section of the inner tube. For three tubes, consider that, with the assumptions given above, the only two configurations for you to consider are: $\rho_3<=d_1$ or $\rho_3 > d_1$. This will change your $\chi$ and $\gamma$ calculations for link 3.
Fill in the calculate_transform() function. This should use the arrays of link lengths, $\phi$ and $\kappa$ values to calculate the $T_{base}^{end}$ transformation. You can use either power of exponentials or a transformation matrix for this step.
Run the perform_kinematics.m script. Compare your resulting transformation matrices to the test_points.txt file. If they match, you have done your calculations correct! If not, you will need to revisit your functions. Reconsider all notes and assumptions.
The next page, Kinematic Validation with Graph Paper, has a quick experiment that you can do with your actual tubes to test your kinematics.