loading
 
watch variables
Roland from South Africa  [107 posts]
10 year

I'm spending most of everyday working with RR, and quite getting used to it, but one feature would be really handy;

I very often need to 'watch variables', but the window keeps getting in the way, but you have to insert instances of the function, or find it again in the program, or find it in the function list.

Is it at all possible to have an icon to show/hide the 'watch variables' window. Better yet, a function key.

I notice that RR makes no use at all of function keys, or right-click of the mouse... Is it in the pipeline?

Roland
Steven Gentner from United States  [1446 posts] 9 year
CTRL-W added that will bring up the Watch_Variables module. This will use the first occurance of the module in the pipeline or add the module to the end of the pipeline by default.

Also added a "always on top" checkbox into that window to ensure constant visibility if needed.

Right click for Pipeline and main Image added also.

STeven.
Max from Netherlands  [8 posts] 9 year
I have noticed that when I remove the object that I'm tracking my variables X and Y in display variables disappear and when I add my blob in the screen it still doesn't give my variables. Does anybody know how it would automatically display my variables.

ps Chart Variables can Always refind my x and y.

Steven Gentner from United States  [1446 posts] 9 year
Max,

I assume that you are talking about the Display_Variables module? Can you post a robofile where that behavior is exhibited? The module should not remove the variable but will display a blank value if the variable no longer has a value.

If I use the Set_Variable module to create a variable and add that to the Display_Variables module and then delete the set_variable module the variable is still in the Display_Variables slot even though it is deleted from the variable list ... so at least a simple example doesn't seem to cause that disappearance.

STeven.
Max from Netherlands  [8 posts] 9 year
Steven,

Thank you for your fast response.
When i have installed my variables with set variables and display variables it does give my variables.
When i remove my object that I am tracking from my tracking area it does give a blank variable like you have mentioned before.
The problem is that it continues giving a blank variable when I put my object back in the screen, is there a way that this can be fixed?
Here I have got a screenshot of my programm.
You can see that my X and Y give a blank value like you have said before.

Max.

 
Steven Gentner from United States  [1446 posts] 9 year
Max,

Thanks for the image. That explains the issue.

The blob tracking will increment the 9 that you see in the variables to the next number (10) when the object comes back in view. That's to avoid conflicting the variables from previous objects. The object tracking assumes the disappearance of an object means the object is now gone. Even when you reintroduce the object, it doesn't know that the object is the same one as before so it will increment the variable name.

Instead, perhaps you just want to use the Center_Of_Gravity module or COG module which will always use COG_X and COG_Y regardless of the object. The tracking module is a bit different in that respect.

Hopefully this explains why the variable "disappears".

STeven.
Max from Netherlands  [8 posts] 9 year
Steven

Thank you for the explenation as to why the object "dissapears".
However i ran in to the next problem whitch is that i can't manage to make the COG box track the object.
it seems that it tries to ''avoid'' the object because when I move the object the COG box moves away in the opposite direction.
I tried to look it up in the forum and on the internet but can not find the answer.
do you know how I can make the COG module track my object, I want to use the variables later to connect with a NXT robot
I am sending you a file with another  screenshot of my programm.

best regards,

Max


 
Steven Gentner from United States  [1446 posts] 9 year
Max,

I'm going to guess here but you probably don't realize that white is being tracked versus black so what you are doing is tracking the background as apposed to the object. You should segment the image before the COG tracking to get the object white. I.e. use threshold and 'black mask' which will make your object white. Then use the COG and you will get better results.

White = on, Black = off. :-)

STeven.
Max from Netherlands  [8 posts] 9 year
Steven,

That explains the problem, my programm works like it should now.
I want to thank you for your help.

best regards,

Max

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