Is myrobotlab supported in 64 bit os/machines? Some errors.

I downloaded myrobotlab 14.9 and ran the bat file. The application worked fine but when I am trying to install/download services like arduino there are some errors like: need to reinstall processing. I'm just wondering if that version of myrobotlab is supported in 64 bit version OS/machine. BTW, my OS is Windows 7 Ultimate 64 bit. Anyway, I will try to use it in windows xp 32 bit.

GroG's picture

No you don't need to download

No you don't need to download it.  It's a bug, I had to choose which services would be part of the initial install - I decided to package Jython with the initial install, but MRL does not realize it is already packaged - that's why it says its not installed when it already is...

GroG's picture

When you run it, do you see a

When you run it, do you see a polygon in the opencv view ?
If not your color (hue/saturation/value) parameters may need changing .. this will depend on lighting, the object you want to track and other variables....

You can restart it with OpenCV and add the filters manually to find new values for the program...

The above polygon sent (235,75) to the Jython console...  
What do you see?
Send a log if you still can't get it to work...
Did you get the build from which I sent the link? --> (bleeding edge build)

michael96_27's picture

Is it necessary to download

Is it necessary to download the jython service? Cause it says here that it's not installed yet however, Jython service is visible in the tabs.

michael96_27's picture

Okay :) I'll try the Jython

Okay :) I'll try the Jython script again :D

michael96_27's picture

Tried the script again, with

Tried the script again, with no luck. I've attached a log life(myrobotlab logfile3).

Here's a picture running the script:

You can notice that I edited the"valueMin" in InRange filter to "111"




And here's a pic OpenCV running on MRL with FindContours filter running successful :)


GroG's picture

Ahhhh ! A picture says a

Ahhhh !

A picture says a 1000+ words !

I can tell from the picture the following things.

1. You did not "execute" the script - its that button on the top right of the Jython tab (looks like a gear & arrow) - if you hover your mouse over it, it will say execute - you need to press that button after putting in the script - The curly arrow is to recycle the Jython environment ... hmm maybe I need better symbols...

2. You don'1 want two OpenCV service running at the same time unless you have 2 cameras..  The script I will create an OpenCV service called "opencv" - so you don't want to create another one called "michael" 

Try this :
1. start myrobotlab
2. click the jython tab
3. paste the script into the editor
4. hit the execute button
5. click the jython tab - and the jython console tab
6. post picture of results

michael96_27's picture

Maybe it's in the camera. Can

Maybe it's in the camera. Can I select the camera to be used? Cause I do have two cameras here XD

By the way, I tried using only jython and not openCV. Clicked the execute button, focused the object in the camera and nothing happens in jython console. But in java console, some words/codes are scrolling.

GroG's picture

Show another picture of

Show another picture of it....

If a new tab came up called "opencv" when you hit the execute button  "Jython" is working and something else is screwy...

michael96_27's picture

  When I hit the execute


When I hit the execute button, this happens:

Here's a picture showing java console:



And here's a picture showing jython console:


GroG's picture

Your right... somethings

Your right... somethings wrong with the Jython...
When I stepped through the step I suggested - I copied and pasted the Jython script - and it gave me an ERROR .....

You can scan pretty quickly for ERRORs in the java console...
So this is an error because a copy/paste of the script I posted on the forum - does not have a tab indent before the print statement ...  

This is a formatting error (the original script has a tab indent) - but is the result of copying and pasting the script ... Grrrr !

Here's the same script indented... I'll see if I can embedded it without formatting in another comment...

GroG's picture

from java.lang import

from java.lang import String
from java.lang import Class
from org.myrobotlab.service import Runtime
from org.myrobotlab.service import OpenCV
from com.googlecode.javacv.cpp.opencv_core import CvPoint;
from org.myrobotlab.service import OpenCV
# create or get a handle to an OpenCV service
opencv = Runtime.createAndStart("opencv","OpenCV")
# add the desired filters
opencv.addFilter("PyramidDown1", "PyramidDown")
opencv.addFilter("InRange1", "InRange")
opencv.addFilter("Dilate1", "Dilate")
opencv.addFilter("FindContours1", "FindContours")
# change values of the InRange filter
opencv.setFilterCFG("InRange1","hueMin", "3")
opencv.setFilterCFG("InRange1","hueMax", "33")
opencv.setFilterCFG("InRange1","saturationMin", "87")
opencv.setFilterCFG("InRange1","saturationMax", "256")
opencv.setFilterCFG("InRange1","valueMin", "230")
opencv.setFilterCFG("InRange1","valueMax", "256")
opencv.setFilterCFG("InRange1","useHue", True)
opencv.setFilterCFG("InRange1","useSaturation", True)
opencv.setFilterCFG("InRange1","useValue", True)
# change value of the FindContours filter
# opencv.setFilterCFG("FindContours1","minArea", "150")
# opencv.setFilterCFG("FindContours1","maxArea", "-1")
# opencv.setFilterCFG("FindContours1","useMinArea", True)
# opencv.setFilterCFG("FindContours1","useMaxArea", false)
# ----------------------------------
# input
# ----------------------------------
# the "input" method is where Messages are sent to this Service
# from other Services. The data from these messages can
# be accessed on based on these rules:
# Details of a Message structure can be found here
# When a message comes in - the input function will be called
# the name of the message will be msg_++_+
# In this particular case when the service named "opencv" finds a face it will publish
# a CvPoint.  The CvPoint can be access by[0]
def input():
    #print 'found face at (x,y) ',[0].x(),[0].y()
    arrayOfPolygons =[0]
    print arrayOfPolygons
    if (arrayOfPolygons.size() > 0):
    	 print arrayOfPolygons.get(0).centeroid.x(),arrayOfPolygons.get(0).centeroid.y()
    return object
# create a message route from opencv to jython so we can see the coordinate locations
opencv.addListener("publish",, "input", CvPoint().getClass()); 
# set the input source to the first camera
GroG's picture

That looks correct, copy and

That looks correct, copy and paste it and give it a try...

michael96_27's picture

Finally, it WORKED!

Finally, it WORKED! :))


Here's a picture:

GroG's picture

Yaaaaay! BTW -  if you want


BTW -  if you want to see multiple tabs at once just right click on the tab a press - "detach"

That way you can see the video stream and the coordinates roll the same time..


michael96_27's picture

So, Color tracking is

So, Color tracking is finished... What do we do next? :)) (so excited! XD)

GroG's picture

You mentioned you had an

You mentioned you had an Arduino with a pan / tilt kit ?

michael96_27's picture

Yes I do have a pan/tilt kit.

Yes I do have a pan/tilt kit. Driven by servos :))

GroG's picture

Create a new post - Create

Create a new post - Create content -> Page

Make it for your next project...
Add a picture of the pan / tilt kit

Is the webcam on it?

I'm close to having something which will work for the Arduino service, but it won't be ready for a couple days - then I'll need help testing & designing more...

I'm assuming you want the pan/tilt + webcam to begin following some colored targed

Does that sound like a plan?

GroG's picture

Guess I'm a little ahead of

Guess I'm a little ahead of schedule

michael96_27's picture

So i'll have to create a page

So i'll have to create a page for us to share the project? :)) That sounds great!:D

Sadly, the link: is not working :|

GroG's picture


Try now

michael96_27's picture

Here's a picture of pan/tilt

Here's a picture of pan/tilt kit attached to my robot :) :


GroG's picture

That's great ! Pictures

That's great !

Pictures always help. It looks like an Arduino with a motor shield,  what's on top ?  You have bluetooth?

michael96_27's picture

Arduino(clone) is on the

Arduino(clone) is on the bottom, bluetooth shield and motor/servoshield follows :)

GroG's picture

Alrighty, try to walk through

Alrighty, try to walk through the Arduino page -

If you can you got 2 out of 5 Services working - 

OpenCV to find a color target and publish a point
Jython for the finite state machine
PID to remap the coordinates of the OpenCV point
Arduino to control the Servos
and Servos for motion control

michael96_27's picture

Is it okay to download the

Is it okay to download the intermediate.754.201.... version instead of 751..... as indicated on your post? Cause 754.. is the only available :))

GroG's picture

On the bleeding edge, you

On the bleeding edge, you should always grab the very latest - 751 was obliterated with several bugs ;)

michael96_27's picture

Okay:) I'm working now on


I'm working now on downloading OpenCV and Arduino service in MRL. :D

GroG's picture

I think we've gone so far off

I think we've gone so far off topic, that its coming around again  (64 bit support), we'll see !

michael96_27's picture

I think we are not so far off

I think we are not so far off the topic cause' arduino and openCV service running on win7 64 bit! :))




And OpenCV:


michael96_27's picture

Alrighty, Arduino and OpenCV

Alrighty, Arduino and OpenCV services are installed and running, what should we do next :))

GroG's picture

Wow, your just rocketing

Wow, your just rocketing along !

Next step is verifying the Arduino service  "really" works - Here are the steps..

From the picture you sent in the previous post, it doesn't look like the Arduino program was compiled or uploaded to the Arduino clone board ?  Have you done this since?

After that is done, the next step would be to make sure the Arduino service can really talk to the board, and the board can talk back....   This would be done by following the tutorial and seeing one of the pins on the oscope..

michael96_27's picture

Okay i'm on it:))

Okay i'm on it:))

michael96_27's picture

Now, expect the unexpected :\

Finished downloading the Arduino Service(So happy!) But when I tried to follow the steps in you post regarding the use of arduino service - in the uploading step, It took me so long and unfortunately, it's not yet done.

I've attached a logfile for you to check on for some errors. Filename:  myrobotlab(logfile 4)

I thought this would be easy but it isn't. However, This is a challenge for me as an entry level hobbyist and with your help, this challenge is not harder than it looks. Thanks for your help by the way. I hope to continue helping me as soon as my project's done :))

GroG's picture

If it takes "long" ... its

If it takes "long" ... its not working..
I need a little time to try to see what is going wrong...

Potentially there are many things which might be interesting...  but they take time..

And sure, I'm glad to lend a hand..  we'll figure it out soon ;)

michael96_27's picture

Any updates GroG? :))

Any updates GroG? :))

GroG's picture

You want to try the latest

You want to try the latest michael?

It's got some fixes, I don't necessarily think it will solve the issue you had but it has better logging, so it will help me figure out the issue...

This version has a nifty update functionality too regarding, updating...

The "really good part" is it only takes about 4 seconds to update & all of your previously loaded services are still installed !!*zip*/


michael96_27's picture

Arduino Service Worked Successfully! :)

Here's a pic showing Arduino Service fully running on Win7 64bit ;D  :


GroG's picture

Woohooo !!!

Nice - what kind of board do you have (Atmel 328 - Duemilanove clone?)

Also if you have an account on - could you post your picture & results on this post ?

If you don't have an account I'd recommend you getting one,  its a great site, and very nice people there.

You'd be the first to get it working !!!  Nice work !

Now, next is Servos !

GroG's picture

Interesting voltage value

Is that 5 volts your playing with on the analog line... looks a little low, and the low value is a bit high for ground ?

michael96_27's picture

Yes, it's a duemilanove

Yes, it's a duemilanove clone. And yes, I do have an account in letsmakerobots.No, I will not post the results but 

I will post the WHOLE PROJECT in the site to help you share your 

GREAT works to others :)).            


Alrighty, I think we can move on to the last or second to the last step isn't it? XD

GroG's picture

Great thanks !

Um - we got a couple more ... probably some more bugs too...

So, unless I've broken something you "should" be able to load a Servo - and move it a bit...

You have to click over to the servo tab and connect it to the Arduino...

michael96_27's picture

We got a problem......

As for the servo shield, It uses it's own library to control servos. The thing is, it uses a decade counter to control servos just by using 2 arduino pins. You can control servos by sending 500-2400 uS pulses(for micro servos). So, we can't use servo service

But, I have an idea! Can you come up with a code that sends the angle of servo-pan and servo-tilt position in serial so that I can map the values like (0, 180, 500, 2400)? 

In order for the arduino to recognize if the given angle is for that specific servo, we can include an "id" character.

for example:

        to set the position of pan servo, we need to send an "a" character as a marker then send the position value, then send a character "b" to mark the end of the position data.


GroG's picture

Do you have a link to the

Do you have a link to the Servo shield specs?  Does it use a pwm pin or 2 digital pins?

michael96_27's picture

I don't have an exact

I don't have an exact link/documentation of the servo shield but here's a link that almost alike with the same libraries used  the only difference is that my servo shield only controls 8 servos while the "alike" shield controls 16 servos. MY servo shield uses pin 6 as CLK and 7 as RST:

Here's a link to the "alike" servo shield:


GroG's picture

It uses 4 pins 6-9, What 2

It uses 4 pins 6-9,
What 2 pins does your's use?

1 servo degree = 55 shield value ?

can you actually get 55 sub-degree discreet values for a Servo?

michael96_27's picture

as for my shield, it only

as for my shield, it only uses pins 6 and 7 thus, it only controls 8 servos. 

And as for the servo degree, We have to map the servo position from 0-180 into 500-2400 uS pulses for the corresponding position. This is my sample sketch for servo shield: 


BTW: the sensor is a potentiometer wired to analog pin 5



#include <ServoControl.h>
ServoShield servos;                       //Create an object to control up to 8 servos
#define servo 3
int sensor = 0;
int senseval = 0;
void setup()
  servos.setbounds( servo, 500, 2400);
  servos.start();                         //Start the servo control
void loop()
 sensor = analogRead(5);
 senseval = map(sensor, 25, 1024, 2400, 500);
  servos.setposition( servo, senseval);
GroG's picture

Strange .. the doc said to

Strange .. the doc said to map 0 - 180 to 1000 - 2000, differences in shield or particular servo used?

This is starting to come together in my head...

Need a ServoShield Service - the fact that it uses a different library will be a bit of "challenge" but we'll figure it out - as far as the details of mapping go - that should be easy enough

So, you'll be able to connect the ServoShield Service to the Arduino Service - and depending on type of ServoShield selected (e.g. Adafruit, Renbotics - rev 1.1, Renbotics - rev ??)   you'll get the correct mapping.

BTW : 

1. Is your board a "real" Renbotics ? if so what version/model ?

2. Can you try updating ?  Help->About->I feel lucky, give me the bleeding edge

michael96_27's picture

No, I don't have the real

No, I don't have the real renbotics shield. But the libraries they use are identical the only difference is the library name. Mine is ServoControl while the renbotics is ServoShield. The pulses are for particular servos. The pulses 500-2400 are for towerpro sg90 - the famous micro servo XD. And yes, i have already updated to latest build :)

GroG's picture

 BTW: the sensor is a


BTW: the sensor is a potentiometer wired to analog pin 5

Is a potentiometer on the servo of the pan/tilt kit?

I'm going ahead with the ArduinoSheild service idea - but it's purpose will be to give access to the shields library methods.  A PID Service will be use to map the X,Y coordinates from OpenCV to the degree values of the Servos on the Shield..

So the flow will be :
Camera -> OpenCV Service -> 2D point -> PID Service -> Shield Service -> Arduino

 We've got to munge a PDE together...