loading
 
rr.getVariables("CIRCLES") in JAVA does not work properly
sven from Switzerland  [4 posts]
16 year
i have tried using roborealm's API with java.

if rrAPI.getVariables("CIRCLES") is called then null is returned. it seems as your software malfunctions. if you have a look at the debugging picture, you will see that the XML closing-tag is not proper of the <CIRCLES> tag!

btw: your software is great!
Anonymous 16 year
sven,

Can you attach your robofile to help us in debugging? It does look like there is some memory corruption in creating that return string array. We've checked and tested the code but nothing obvious jumps out. It is most likely another module causing a conflict with the API routines. Having your robofile will help us to replicate this issue.

I assume you are using the get_variable API call? Or the get_variables (plural) call?

Thanks,
STeven.
Anonymous 16 year
sven,

Cancel that last request. We found a problem with the get_variables (plural) API call and were able to replicate your issue. We have already uploaded a fix. Please download RR ver 1.8.5.7 for this fix.

Thanks for the bug tip!

STeven.
sven from Switzerland  [4 posts] 16 year
hey STeven

thanks a lot for your support. i have downloaded the new version and the problem seems still not solved. now, the <CIRCLES> tag is empty?!

i have attached you some code and the robo file.

thx and best regards,
sven
attachments
sven from Switzerland  [4 posts]
16 year
almost forgotten to attach... sorry ;-)


program.robo
Anonymous 16 year
sven,

Can you resend the robofile? It seems that the one we got does not even have the circles module in it. Just a listen with a couple tests for left, right, etc.

Thanks,
STeven.
sven from Switzerland  [4 posts] 16 year
the uploaded robo file is fine. have i forgotten any tags for the handling with getVariables(..)?

here is the robo file printed out:

<head><version>1.8.5.5</version></head>
<RGB_Filter>
  <channel>1</channel>
  <max_value>55</max_value>
  <hysteresis>16</hysteresis>
  <result_type>1</result_type>
  <min_value>144</min_value>
</RGB_Filter>
<Circles>
  <statistics_image>Source</statistics_image>
  <max_radius>100</max_radius>
  <circle_color_index>2</circle_color_index>
  <isolation>3</isolation>
  <fill_circles>FALSE</fill_circles>
  <radius_color_index>7</radius_color_index>
  <threshold>1.0000000000</threshold>
  <center_color_index>2</center_color_index>
</Circles>
Anonymous 16 year
Sven,

Thanks. The robofile looks good. Naturally unless the image has any red circles that variable will be blank.

Try this in a command console:

telnet localhost 6060

and paste in

<request><get_variables>CIRCLES</get_variable></request>

This communicates directly to RR and requests that variable. This will test to see if it is a RR program issue or the Java API issue. We get back a result in doing this assuming we have a red circle. If no red circle exists then we get back a results as you show.

Can you paste back what you get back from that command?

Thanks,
STeven.
sven from Switzerland  [4 posts] 16 year
oh, i am sorry. this time it is my fault!

here in switzerland the sunset has already begun i.e. the light is not the same anymore for my webcam. conclusion: the rgb-filter had to be reconfigured to recognize the red cirle in my test environment!

thanks again for your support.

have a nice day,
sven

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