Computer Vision News - May 2024

Computer Vision News 16 Create bounds for the RGB values of the clusters. The camera would surely pick unwanted objects such as wires, stains, etc., as clusters (you can verify this by running your code in debug mode and seeing the variables for clusters on the left-hand side where you will see that there are other clusters than the object that you intend to pick up). Therefore, we need to consider only some colors. In this example, we use a blue cube and, therefore, pick RGB thresholds for different shades of blue. You repeat this for other colors of clusters in your scene. Note: The clusters have a color property; you can see those by putting breakpoints after the above code and looking at the cluster variables on the left-hand side to see their RGB values. Those can also give you an idea of the color space that the camera is seeing. Now, it is time to write down our mission planner. We need to loop over the clusters/cubes one at a time and do the following in order: 1. Determine the cube’s (x,y) coordinate and add a slight offset to the z coordinate to avoid pushing the cube away while approaching. 2. Adjust the end-effector orientation so that its x-axis is perfectly aligned with the horizontal axis (in other words, the end-effector frame should point forward). The first joint (waist) should be rotated by the angle θ, where θ could be computed as follows: θ = atan2(x, y), where x, and y are the detected cluster position x and y coordinates. This will make sure that the end-effector is oriented towards the object. NOTE: This is again our solution. Your experiment may need other adjustments. 3. The end-effector will go down to hold the cube and then grasp it. 4. The end-effector will go back to the original slightly higher position to avoid hitting other cubes on its way to the basket. Lessons in Robotics