Now I have the rr_api.py (on quark under Linux) communicationg with RoboRealm (on intrepid under Windows XP Pro). I had to make some changes to the very last part of the rr_api.py script to make things work though.
-
Uncomment the lines at the very end that are currently commented out.
-
Edit the paths to point to appropriate locations on your Windows PC where RoboRealm is running.
-
You may also have to create the red.robo program or change the file name in rr_apy.py to point to a script you have on your Windows PC. rr_api.py needs to load this script.
I changed the paths to point to locations I created or already have on intrepid.
My edits are as follows:
[code]
#connect to RoboRealm
rr.Connect(“intrepid.thedynaplex.net”)
get and print current image dimension
width, height = rr.GetDimension()
print "Width: ",width,"Height: ",height
rr.SetCamera(“off”)
rr.LoadImage("", “U:\Installs\RoboRealm\red-skin.jpg”)
#get and set current image pixels … although it is best to use RoboRealm
extensions for image processing
pixels, width, height = rr.GetImage("")
rr.SetImage("", pixels, 320, 240)
variable handling
print "IMAGE_COUNT = "+rr.GetVariable(“IMAGE_COUNT”)
rr.SetVariable(“test”, “this”)
rr.DeleteVariable(“my_test”)
execute a red and green RGBFilter in RoboRealm
rr.Execute("1.50<RGB_Filter><min_value>40</min_value>3<$
rr.LoadProgram(“U:\Websites\RoboRealm\scripts\red-skin.robo”)
rr.SaveImage(“U:\Installs\RoboRealm\red-skin.jpg”)
rr.SetCamera(“on”)
rr.WaitVariable(“test”, “that”, 20000)
rr.WaitImage()
rr.close()[/code]
The only problem I am having now, is I am only capturing a blank (black) image. I don’t know why this is happening at present. Other than that, I do indeed have the rr_api.py script on quark communicating with RoboRealm on intrepid.
The current output is:
Width: 320 Height: 240
IMAGE_COUNT = 2
8-Dale