

Define angle with small soccer plates Nima ghorbany from Barbados [5 posts] 
9 years

Hi,
can we find the angle between colors used on plates in small soccer leagues?
thanks



Anonymous 
9 years

Identify the colors, get their COGS (most likely from Blob_Filter) and then use the Calculate_Angle module to perform that task.
If you can include some same images of the angle that you'd like to find we can help you with that robofile.
STeven.



Nima ghorbany from Barbados [5 posts] 
9 years



Nima ghorbany from Barbados [5 posts] 
9 years

hi,
i am sorry.i thought i got it but i didn't.here is my problem:
i used two different colors and found there COG independently.then i used calculate_angle .but the number it shows is not logical and is useless.because it swings too much,and swing amplitude is about 20 degrees.
then i used another middle color and the problem prevails!
i attached a picture of the robot and my .robo file.
thank you
program.robo



Nima ghorbany from Barbados [5 posts] 
9 years

i got it worked while ago.but it wasn't uselfull.
so i wrote a python code which would read from roborealm with my .robo file.



Nima ghorbany from Barbados [5 posts] 
9 years

i got it worked while ago.but it wasn't uselfull.
so i wrote a python code which would read from roborealm with my .robo file.



Nima ghorbany from Barbados [5 posts] 
9 years

i got it worked while ago.but it wasn't uselfull.
so i wrote a python code which would read from roborealm with my .robo file.



Nima ghorbany from Barbados [5 posts] 
9 years

i got it worked while ago.but it wasn't uselfull.
so i wrote a python code which would read from roborealm with my .robo file.
angle.zip



Anonymous 
9 years

Nima,
The calculate angle module will calculate the angle between two vectors ... in your case the vector should more or less always be the same since the angle between the upper and lower parts of your robot are always about 180. Instead, if you want orientation then you can use the vector segment from the top to the bottom part of your robot and not give a 3rd value. In that case the calculate angle module will default down to the orientation of the single vector as not enough information would be given for the angle between two vectors. Attached is a robofile that does just that.
STeven. program.robo

