Compute the forward kinematics of the Piktul manipulator. The home configuration should have the robot arm straight out and up at some height. Doing so defines the zero transformation for the rotational joint variables. The linear joint coordinates should go to whatever value is specified (for these zero as a length should be sensible). Most of the piktul robotic arms can't quite manage a zero gripper height (except for one or two of the super-saggy ones), and it is best not to let the gripper finger width go to zero either.
forwardkin
). There should be two return arguments [g, z]
so that it returns an $SE(2)$ object (the g
part) plus a $\mathbb{R}$ object (the height z
).testForwardKin
code file that takes an optional argument variable called lval
that can be set to some 2×1 vector for specifying a constant height and gripper width during the operation. All the height and finger/gripper widths values should be changed so that they are set to the values in lval
. Then inside of the for
loop, add an invocation of the piktul forward kinematics function and display the results of the $SE(2)$ part only. ode45
function. Setting some of the joint configuration coordinates to constant values is known as locking the joints or having locked joints. If you include the pauses like in the homework solution, then it should run in real time. For reasons that I will explain later, I would recommend that you change the execute time to be a little bit longer than the actual pause time. The piktul setArm
command should accept a second argument that is the expected duration of the command. So, in the for loop, the lines of code would look something like: robot.setArm( alphaNow, dtNow * 1.1); pause(dtNow)
after setting the alphaNow
and dtNow
variables properly. Run long enough to complete the loop. Demo the trajectory.
Note: Inside of the piktul
class file, there is a definition of the link lengths already. You should trust that they are OK, although if you'd like to double-check them, that is fine. The values should be 4.5 inches and 4 inches.