Hello GroG,
All good ?
It's done, Eclipse is well installed, and all is ok, i can compile MRL without problem.
can you explain me the next step to create my own service please.
And i've also an other question . I'm trying to make to activate the leds of my robot mouth move while it's speaking.
I thinked, the method " isSpeaking" of the service "speak" will give me a bolean . but i see in the javadoc that.
It need a bolean . Can you explain how it work ?
I've tried someting like " while mouth.isSpeaking() -> talk() " Where "talk()" is the fonction that make the leds sequence "
But of course " Python ERROR ; isSpeaking need 1 arg, give 0 "
Ah ! and a last question : I begin to have some test files in phyton for my sweety, can i put them in the git repository for
python exemples ( Pyrobotlab ) And if yes, how to do that .
That all, thx for your help
Have a nice day
beetlejuice
Hello Beetlejuice ! Yes I'm
Hello Beetlejuice !
Yes I'm very well thank you.
The next step is just copy & paste the _TemplateService.java service. Rename it to something you want.
So now this service would control all the other services you want.
And that would depend on what hardware you have.
If I remember correctly - you have 2 Arduinos ?
6 UltrasonicSensors
OpenCV for the webcam .. etc..
You would add these as members of your new class..
For the mouth & speech - you might want to check out MouthControl - this sends out servo motor commands depending on speech.
isSpeaking and saying are both "publishing" methods - they are called by the service , not your program - they represent changing events of the Speech service.
you would "map or bind" with them from your service to do what you wanted.
For example :
You see this line in MouthControl ?
mouth.addListener(getName(), "saying");
it's it binds the mouth's "saying" with its own - so that every time mouth has a "saying event" - the method in MouthControl named 'saying" gets called
Inside MouthControl you see it's "saying" method - which breaks apart the words and moves the servo - its starts like this ..
Thank you, i'll try all that
Thank you, i'll try all that !
Hello ! I need help, I'm
Hello !
I need help, I'm trying to understand how to do the "Sweety's service", I run MRL from eclipse, ans run python (installed from right clic and 'install' in the runtime tab.
But how to install sweety's service ? if i try to run it with
I get this ERROR :
its not defined in the an xml
its not defined in the an xml file called serviceData.xml - that's why its complaining about not being installed..
My bet is that it is being created and started .. just not displayed as a tab.
You could confirm this by having some logging in the constructor or serviceStart() which say something like
log.info("IT WORKY !!!")
and searching for it in the logs.. or set a breakpoint :)
The "sweety" tab is well
The "sweety" tab is well displayed, nothing run ( arduino , opencv ) i need to understand By reading the sources of other services .
To try i've just added runtime.start("arduino", "Arduino") under runtime.start("GUI", "GUIService")
But it's not only my service that need to be installed, a lot of them like Arduino or python need to be installed.
Easy for them, just right clic and install ...
And another question ; Why ultrasonicSensors's service is in the runtime time of this version from source and not in the buids version like 1.0.84 ? Of course, it work if start from python, but there is no icon in the runtime tab .
have a nice day !
in the future you should use
in the future you should use :
Runtime.start("arduino","Arduino")
The difference is this is calling a static method, runtime with a small "r" is a convienence handle which Python provides. Even in python you can (and should) call Runtime.start("sweety","Sweety") with a capital "R"
Yes .. use the source Luke
UltrasonicSensor uses the source's version - because you are running from sources .. the build process makes binaries with the build version - different stuff.
There's no Icon because the serviceData.xml does not have your service in it.
Rock On !
Runtime.start("arduino","Ardu
I did it, i made this mistake just when i writed this line in the previus post . When i run from source is normal that i must install almost all the service ? just few of them are already installed .
Here is Sweety.java :
Previous post updated with
Previous post updated with the last java code tested ans still doesn't want to work
Here is the python script
Here is the python script that i would to put in a service ( for now ) :
Hi, i need again your help
Hi, i need again your help ...
I've an error [Thread-7] ERROR class org.myrobotlab.logging.Logging - ------ two time in the python's log when i run the sweety service .
can you help me ? i've just added the function myShiftout, and a line for add a servo that was missing, but the error was already here before i commit these change .
I send you a noworky and i update the sweety.java file on github.
Thx