I am working on some demonstration scripts for my InMoov robotic hand. Having not had good success with voice input I wanted to create a simple python script that would call some movement routines.
When I tried the standard: python raw_input('Enter Command: ') approach
I get the following:
File "<string>", line 2, in <module>
IOError: The handle is invalid
at org.myrobotlab.service.Python$PIThread.run(Unknown Source)
I am starting to see how the keyboard service would work, but the Javadoc for that service has a bad link and is unavailable. I am browsing through the MRL source code but thought I might ask and save some time.
Hello bytemewb,I believe you
I believe you should be able to append this script, or replace Sphinx code in #file : InMoov.minimal.py
on the InMoov service page - http://myrobotlab.org/service/inmoov
It will add a keyboard service - and it subscribes python to the keyboard's "keyCommand" method which publishes key commands when the large button has focus.
Let me know how it goes - send a no-worky if you have nay troubles.
Noobie questions always
Noobie questions always welcomed...
And thanks for point out it did not have a service page - I've created one for it now
Thanks. I got part of that working last night. I was hoping to come up with some way to implement an old fashion text based menu system for quick and dirty testing.
My long term goal is to hook it into a a web page based control system. Any good examples of how to implement that?
Unrelated question: Any way to set limits on the servo settings for InMoov? I find that over about 160 my servos will break the strings and goint below 10 has them straining where I am afraid they will burn out.
A new web gui will be
A new web gui will be available in the future - but at the moment its just in the planning stage.
There was some work to support a robot-futball game online through a web interface - you can see some of the gui here - http://myrobotlab.org/content/myrobotlab-ajax-json-jquery
For the limits - everything should be accessable after the InMoov service has been created and initialized.
Overriding methods in the InMoov service?
All: Thanks for the helpful replies. Hopefully I will get some time this weekend to work on and finish
Another question if I may. It turns out that I seem to have run my control strings opposite of Gael. Eg. when he ran the left side of the servo under the finger I ran the right side on the underside.
Is there an easy way to override the openhand/closehand etc. methods in the InMoov service from Python?
Worst case is I can extend the current class to add methods to set what the open and close positions for each finger are.
This would help in another case. As I have been testing due to different amounts of tension on each of the strings what the fully open and close positions (e.g. where the servo starts to stall and you risk burn out) for each finger are different. I can address this by setting all the limits but I still have what I refer to as the reverse polarity in the servos.
You say Up I say Down
You say Left I say Right...
Sounds like a "Servo.setInverted(boolean)" would simplfy things greatly..
Just put it in version 1461 or higher - you can do a Blleeding Edge update
Individual servos can now be inverted like this
or you can set all the servos of a hand as inverted in one call like this
GroG: You Rock Man. I will download and test hopefully tomorrow.
Yeah, let me know how it goes.. unfortunately I was not able to test yet.. so its just a little more than theory ;)