Remote Connection to RoboRealm with Python

Now I have the rr_api.py (on quark under Linux) communicationg with RoboRealm (on intrepid under Windows XP Pro). :slight_smile: I had to make some changes to the very last part of the rr_api.py script to make things work though.

  1. Uncomment the lines at the very end that are currently commented out.

  2. Edit the paths to point to appropriate locations on your Windows PC where RoboRealm is running.

  3. 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. :smiley:

The current output is:

Width: 320 Height: 240 IMAGE_COUNT = 2
8-Dale

I was getting something like that at one point, its to do with the settings on Roborealm. You can tell it which image to send i.e. current, source or any of the other images along the sequence…

Getting quite jealous now… I want to get some work done on SEQ and on Roborealm but I’m having major problems getting my Atmega board to fit tidily inside the bot…

So much hardware, so little space…

I will have to check into this more. I am still very new to RoboRealm, and am already wishing there was a version for Linux. An application like RoboRealm would be extremely good under Linux.

Have you checked out the Pluga and Tini series of controllers made by New Micros? I don’t think you’ll find a smaller controller than the Tini series and I believe there is an Atmega model in the group (also a Pluga I think).

8-Dale

Paul, can you provide a video demonstration of this? Id like to see it when you get it working.

The Atmega I’ve got is only 34mm x 40mm. Its always the headers and connections that make the board wider and deeper. The KHR bot has most places filled anyway so its more a case of shuffling and squeezing…