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.
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...
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)
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.
Okay :) I'll try the Jython
Okay :) I'll try the Jython script again :D
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 :)
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
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.
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...
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:
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...
from java.lang import
That looks correct, copy and
That looks correct, copy and paste it and give it a try...
Finally, it WORKED!
Finally, it WORKED! :))
Here's a picture:
Yaaaaay! BTW - if you want
Yaaaaay!
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 by...at the same time..
So, Color tracking is
So, Color tracking is finished... What do we do next? :)) (so excited! XD)
You mentioned you had an
You mentioned you had an Arduino with a pan / tilt kit ?
Yes I do have a pan/tilt kit.
Yes I do have a pan/tilt kit. Driven by servos :))
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?
Guess I'm a little ahead of
Guess I'm a little ahead of schedule
http://myrobotlab.org/content/arduino-service-long-journey
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: http://myrobotlab.org/content/arduino-service-long-journey is not working :|
Try
Try now http://myrobotlab.org/content/arduino-service-long-journey
Here's a picture of pan/tilt
Here's a picture of pan/tilt kit attached to my robot :) :
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?
Arduino(clone) is on the
Arduino(clone) is on the bottom, bluetooth shield and motor/servoshield follows :)
Alrighty, try to walk through
Alrighty, try to walk through the Arduino page - http://myrobotlab.org/content/arduino-service-long-journey
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
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 :))
On the bleeding edge, you
On the bleeding edge, you should always grab the very latest - 751 was obliterated with several bugs ;)
Okay:) I'm working now on
Okay:)
I'm working now on downloading OpenCV and Arduino service in MRL. :D
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 !
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! :))
Arduino:
And OpenCV:
Alrighty, Arduino and OpenCV
Alrighty, Arduino and OpenCV services are installed and running, what should we do next :))
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..
Okay i'm on it:))
Okay i'm on it:))
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 :))
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 ;)
Any updates GroG? :))
Any updates GroG? :))
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 !!
http://myrobotlab.dyndns.org:8080/job/myrobotlab/ws/myrobotlab/dist/intermediate.765.20120904.0647/*zip*/intermediate.765.20120904.0647.zip
Arduino Service Worked Successfully! :)
Here's a pic showing Arduino Service fully running on Win7 64bit ;D :
Woohooo !!!
Nice - what kind of board do you have (Atmel 328 - Duemilanove clone?)
Also if you have an account on LetsMakeRobots.com - could you post your picture & results on this post ?
http://letsmakerobots.com/node/34061
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 !
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 ?
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
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...
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.
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?
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: http://www.renbotics.com/files/RenboticsServoShieldRev1.5.pdf
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?
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
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
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 :)
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...