User Tools

Site Tools


ece4560:piktul:04pnp

Piktul: Pick and Place


The value of a robotic arm is in its ability to perform repetitive movements with high precision. The ability to do so is called repeatability. Part of the high cost of robotic machines lies in their extremely high repeatability combined with the high precision. Some robot arms are accurate down to sub-millimeter and have a reach that spans a couple meters, which means that their accuracy is a fraction of a percentage relative to their overall length (less than 0.01% error).

The piktul is definitely not going to be that accurate, nevertheless for pickup up and placing objects, it is going to be good enough. Pick and place is a classical task that engineers program robots to perform; a task that makes sense in the context of an assembly line or similar process.

The pick and place routine basically commands the manipulator to specific end-effector $SE(2)$ configuration, height, and gripper opening. At that pick configuration it then lowers the arm to the height of the object to grasp it. Once there, the gripper should close enough to grab it (but not to stress and break the motor gears). The manipulator arm raises, moves to the place $SE(2)$ configuration, then lowers. The gripper is opened to release the object, then raised. Once raised, it returns to the home position.

Repetitive


In the first version, as is typically for many factory automation processes, the pick and place configurations are known in advance. Thus, all that is needed is to program the robot to execute the maneuver, then to set the program in an infinite loop to forever repeat the action. Since they are known, the initial and final configurations are actually determined beforehand as joint angle, then entered into the program. Here, your task is to flesh out such a pick-n-place routine for the joint angles specified.

Arbitrary


In the second version, the configurations may change over time. Such would be the case when a flexible or adaptive (manufacturing) process is needed. Rather than specify the joint configurations then, the end-effector configurations are given. Internally, the robot's program should use inverse kinematics to establish what the pick and place end-effector configurations are, then execute the operation (again, in an infinite loop or until the configurations change). Here, your task is to modify the original hard-coded pick-n-place routine to be more flexible. Really, you will most likely create a new routine that takes in end-effector configurations first, converts them to joint configurations, then calls the former pick-n-place routine.

Notes


Inverse Kinematics

Recall that the inverse kinematics for this problem has two solutions that one can call the left or right arm solution (does it bend left or right). We can also call it the positive or negative solution. For the correctly printed piktul workspace mats made of cardboard, there is an annular type region that represents the manipulator workspace. Any position in the workspace is fair game for the end-effector input configuration. The set of possible orientations might be limited.

In principal, both the left and right solutions should be possible to achieve, however the piktul has angular limits that make one of the solutions preferred for different regions of space. You should program the inverse kinematics to be flexible regarding the solution used. There are two options, one which is okay and one which is best.

The okay option is to have an optional argument that indicates which of the two solutions to use. The code may already have such a variable called solfact which is expected to be positive (+1) for one solution and negative (-1) for the other solution. If not given or not possible to parse/evaluate then default to a specific solution.

The best option is to solve for both, then see which of the two options is valid relative to the joint limits. The first one to successfully pass the joint limit test should be returned. A mixed solution is also possible, where solfact is given and that solution used but the arm switches to the other solution if it violates the limits.

Either way, the inverse kinematics should be capable of returning a correct solution when given an end-effector configuration that can be achieved by the piktul.

Pick and Place

The member function code created for this should be somewhat generic. I would recommend creating a pick and place routine for the joint angles that takes the pick and place revolute joint angles (2×3 vector), the target upper and lower heights (2 vector), the gripper widths (2 vector), and a timing vector specifying how long each part of the sequence should take, then creates the execution sequence and executes. If the timing sequence is missing, then some default timing should be applied. The pick and place routine for end-effector configurations should have a similar set of arguments and solve the inverse kinematics part to get the joint angles, then invoke the pick and place routine for joint angles.

The solution should not be hard-coded for the actual tasks given. The scripts you've been given should act as a good starting point for how the pick and place functions should work. The demo will involve assessing both execution of the task, as well as ability to actually grip, pick up, and place the object.

The Code

The piktul class code, as left by your colleauge, was not entirely written. In fact, the inversekin class member function appears to be a copy paste from some other code. Correct the member function definition to accept the proper arguments, which include the desired end-effector configuration and the optional solfact variable. Also, revise the function code to correctly perform the inverse kinematics calculation.


Back Main

ece4560/piktul/04pnp.txt · Last modified: 2023/03/06 10:31 by 127.0.0.1