top of page

Differentiating two different objects

In WRO competitions, it has become increasingly necessary for the robot to be able to differentiate between objects of different sizes, shapes and colours. In this year’s senior high challenge, even spheres have been included as turbines. Thus, it is imperative that one’s robot is able to distinguish between a smaller object and a larger object, there are a few simple methods to do so:


Method #1: Motor rotation


By measuring the amount of rotations (or degrees) required to grasp an object, we can henceforth determine the estimated size of an object. This method can only be used for symmetrical objects in order to improve its accuracy. Not all robot arms would be able to carry out this function accurately so some trial and error is required before you can determine if this method suits your current need. This method is also affected by the battery level of your robot. In order for this method to provide an accurate reading, The battery level of the robot should be kept constant (4 and a half bars to 3 bars is the most stable configuration for me) Sample code below:




The reset is used to allow the total rotations of the motor to be reset to zero. After which the motor is activated for a certain amount of rotations and thus continues moving till the power is less than your arbitrary value. The difference between your starting value, ie 100 cannot be more than 30 in order to maintain the accuracy of this method.

Method #2: Light value


The further away an object is from your sensor, the lower the light value obtained. Similarly, a smaller object would be further from your sensor compared to a larger object at the same centre point. This method may only be used if your robot can maintain a consistent position throughout every round of testing. With a High Technic Colour Sensor, you would be able to differentiate a large array of colours as well as measure light value through four different settings (Red, Green, Blue and White). However an inconsistent placement will still affect its ability to determine size and colour accurately. A simple logic chain based on the comparison of light reading obtained is shown below:


Method #3: Ultrasonic Sensor

The most simplest method but requires your robot to maintain its distance from the object more precisely. If the object measured only has a difference of 5 centimetres the potential for frequent deviations in measurements would be increased and is highly unreliable for WRO.


If you know of any other methods please comment below. I hope you have found this post useful.

12 views0 comments

Recent Posts

See All

Comments


bottom of page