Hi Caio,
I understand that you are facing an issue getting the last column of 'T' matrix.
The error you are encountering occurs because you are trying to access an element that exceeds the array bounds. To extract the position of the robot's tool, you need to access the last column of the matrix 'T'.
To fix the error and obtain the position, you can modify the code as follows:
app.pos_x = T(1, end);
app.pos_y = T(2, end);
app.pos_z = T(3, end);
By using 'end' instead of a specific column index, you can access the last column of the matrix, which contains the position of the robot's tool in the x, y, and z coordinates.
You can refer to the following MATLAB answer which discusses another approach to resolve the issue. This resource provides a comprehensive solution and explanation for the similar issue of indexing the ‘fkine’ matrix, allowing you to gain valuable insights on how to proceed effectively.
I hope this helps.