loading
 
Angle between two blobs
Anonymous from Greece  [3 posts]
12 year
Hello.
I want to use Roborealm to make my robot dock by itself to its charger.
I am trying to find the angle between two blobs (red and yellow) in the photo.
The idea is that when the two blobs are directly one above the other, (0 degrees between the two centers of gravity) the approach is correct. I don't know what variables to put in the angle calculation module, so I get a correct answer.
If you know of a better way to achieve this task, please enlighten me.
Thank you.


 

program.robo
Anonymous 12 year
Markus,

Very close! You just needed to use

BLOBS:0
BLOBS:1
etc. in the variable boxes. Seems that you had tracking before this which was probably removed.

Note that 90deg appears to be straight down so keep in mind that the order in the angle calculation is important. I sorted the blobs in increasing Y so that regardless of if yellow is above red you will still get angles in the top hemisphere (0 to 180).

Nice idea for docking!!

STeven.
program.robo

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index