Hi STeven,
thanks for the rapid and very helpful reply. I was wondering about trying the VB module or one of the others to save the value at a known point in time, but then I saw your response. I tried suggestion 1, and vuola, downloading the current 2.80.45 cleared up the JavaScript typecast issue - that part is now working exactly as expected - thanks.
I've been wondering about items 2 and 3 for some time, realizing that sooner or later I'd have to get more precise about synchronzing events between RoboRealm and my external code. Your comments help quite a lot. It makes complete sense that the API 'uses snapshots' and serves to decouple and synchronize external events with internal RoboRealm pipeline processing. But it will be a few days before I can dig into either of those approaches you mention & verify understanding...
Meanwhile, after a quick review of my .robo code, I can say that:
- only the 'Main' tab runs all the time. It's purpose is to 'listen for commands' via the API, and then call one of the several function tabs accordingly. It does NOT have a Sample_Line module.
- there is a tab called 'Load_Course' that is only run when prompted via a call to the API, and it's purpose is to load in a static image of a somewhat complex line following course. It does NOT have a Sample_Line module.
- there is a tab called 'Simulate_New_Robot_View' which is only run when prompted via a call to the API, and it's purpose is to return a new sub-image extracted from the overall line following course, based on rotation and translation deltas supplied via the API. It does NOT have a Sample_Line module.
- each of the other function tabs have sample code where I am experimenting with different image manipulation approaches using different RoboRealm modules. They are each executed only when called. At this point in time, they are only 'called manually', when I manually select a function tab in the RoboRealm 'IDE'. Although 3 of them do have exactly one copy of the Sample_Line module, I was only having one of those selected and active when I submitted this issue above. So I don't see how another instance of Sample_Line could be overwriting the desired instance; to my understanding, only the one desired instance of Sample_Line should be executing in this case - the other instances of Sample_Line in unselected function tabs should never be called.
- Based on my understanding of the RoboRealm processing pipeline, from reading documentation and observing behavior, it seems that as described in these pages,
--- http://www.roborealm.com/help/Getting%20Started.php
--- http://www.roborealm.com/help/Call.php
I can have
--- the 'Main' function tab looping indefinitely, so long as there is a source image change (or something e.g. Keyboard read event) to force pipeline evaluation
--- a separate function tab 'foo' selected and actively processing and updating the display in the RoboRealm IDE, even as the Main tab 'accepts commands' from the API and calls a different function tab 'bar'. It is within the function tab 'foo' that I need to capture SAMPLE_LINE_POINTS for export via the API...
FWIW, I've been doing this in context of a hobby robot competition and a learning exercise for computer vision, node.js and express. Since there is no native node.js API for RoboRealm, this exercise has also provided the additional opportunity to learn a little about sockets / XML. Anyhow, the responses you gave for items 2 and 3 above should help harden and tighten up the node.js interface I'm writing - and reduce guesswork in synchronizing timing & events. It's pretty sloppy right now, but maybe at some point this node.js interface could be worth sharing...
I intend to dabble with suggestions 2 and 3, and keep you posted...
Thanks!
|
|