manually moved camera to observe "snap" problem in fingers |
fed same coordinates into jme to position camera but look ! wrong unit axis ! |
I'm starting to understand the "snap" problem and getting clues on how to solve it ... In the interim I like to make tools and utilities that will help me. Like a camera I can enter in location (x,y,z) and the pan, tilt roll and it will zoom me to the correct place. I think there is more confusion regarding the xyz vs xzy coordinate system :P
Index joint - first attempt to move will rotate and keep the finger's X axis at 45 degrees ..
If I move the 2nd and 3rd joint they will do the same - cumulative error is ~135 degrees
I don't know why this occurs on the fingers and no where else ...
Below the i01.leftHand.index is connected to i01.leftHand.wrist - wrist is 23 degrees shifted .. I have a feeling that reading the degrees out in 3 dimensions puts it into some sort of normal, and that normal is shifted 23 degrees - so since there are 3 joints (each connected to one another) the error is X 3..
This is with Gael's latest vinmoov2.j3o and a random gesture ... fingers still need work
Maybe the alignment of the x axis slightly off ?
MRL current code for index is ..
JMonkey virtual InMoov running the balance.py script...
As you can see more work needs to be done .. but on the good side, the arms are always going through its body, and more fingers are under control - although they are bending backwards and with only a single joint ...
Some more work! I have been
Some more work!
I have been testing this morning to see if I could manage to set my Blender files with angle "rest" positions.
Currently the Blender files I made for VinMoov positions all parts at 0 angle which puts the robot in the "rest", but this assumes each servo is a 0 "rest", which by default in the InMoov service is not the case.
So I made a test in Blender to set 90 "rest" for rothead instead of 0 before exporting to JMonkey.
And it works!!
Because I do not know how to define which axe (by default Y in MRL ??) is rotating a part of VinMoov, I could only test with rothead.
Another question I have is, does MRL auto rotates parts so that Y is toward top of view?
JMonkey's axis of the scene
JMonkey's axis of the scene graph is Y is up, X is left right, and Z is forward back
Each node in JME can have a default axis on which in rotates - the default one is Y
These are the ones I create new defaults : (it would be all that do not rotate on Y)
"BINDING" ... This is what I
"BINDING" ...
This is what I call taking one part and attaching it to another.
Initially I ignorantly thought that if you dumped all of inmoovs parts in a folder called i01, I could make all the individual files i01.bicep.j3o, i01.hand.j3o, i01.head.j3o ... etc auto-attach to a new master node i01 and all would be well .. I got that part working, but of course inmoov is not like this - the heirarchy of things is not like this at all ..
Specific nodes within the files need to be "bound" with specific nodes in other files.
Head bone connected to the neck bone, neck bone connected to the back bone ....
Instead I had created something that connects all pieces to a single node (more like a star fish)
Fortunately I have a "bind" function which binds two nodes together - but when you do that, JME correctly adds the local transformation (which looks correct when things are unbound) to way too high when the nodes are attached.
Parts were rocketing into the sky !
but with a little vector subtraction, we should be able to fix this ...
(No subject)
(No subject)
Exploding Fingers
I currently have a nice method that I hope will satisfy the 3 joint moving from one servo.
In MRL it requires a single line per Servo :
jme.attach("i01.leftHand.index", "i01.leftHand.indexPhal1", "i01.leftHand.indexPhal2", "i01.leftHand.indexPhal3")
This attaches the index servo to the 3 nodes in the finger.
But I was surprised when the fingers joints flew off his hand like a flock of small birds. They circle out in space never to land again !
Are the axis way out ? Should I not be using these nodes ?
I suspect you are not using
I suspect you are not using the correct node.
they are called: i01.rightHand.index,i01.rightHand.index2, i01.rightHand.index3
Yay ! .. fingers stay on the hand
You have i01.leftHandd.index2 - proably want to change it to i01.leftHand.index2
I changed them all to rotate on their "x" axis - but still it looks very scewed - maybe index3 is a different axis ?
I'm a bit confused on what is going on - when I rotate it, it does a ferris wheel around the hand
Too much rotation & top angle not quite right ?
Hello Grog, These are the
Hello Grog,
These are the mappings I currently got, when running the vinmoov.j3o that I have lastly sent you.
The wrists and fingers are not correct regarding angles. It seems Jmonkey MRL brakes the localRotations which are working in Jmonkey SDK on X axis. This is the reason I didn't do the rest of the hand fingers mappings.
jme.setRotation("i01.head.jaw", "x")
jme.setRotation("i01.head.neck", "x")
jme.setRotation("i01.head.rollNeck", "z")
jme.setRotation("i01.head.eyeY", "x")
jme.setRotation("i01.torso.topStom", "z")
jme.setRotation("i01.torso.lowStom", "x")
jme.setRotation("i01.rightArm.bicep", "x")
jme.setRotation("i01.leftArm.bicep", "x")
jme.setRotation("i01.rightArm.shoulder", "x")
jme.setRotation("i01.leftArm.shoulder", "x")
jme.setRotation("i01.rightArm.rotate", "y")
jme.setRotation("i01.leftArm.rotate", "y")
jme.setRotation("i01.rightArm.omoplate", "z")
jme.setRotation("i01.leftArm.omoplate", "z")
jme.setRotation("i01.rightHand.index", "x")
jme.setRotation("i01.rightHand.majeure", "x")
jme.setRotation("i01.leftHand.index", "x")
jme.setRotation("i01.leftHand.majeure", "x")
jme.setMapper("i01.head.jaw", 0, 180, -5, 80)
jme.setMapper("i01.head.neck", 0, 180, -20, 20)
jme.setMapper("i01.head.rollNeck", 0, 180, -30, 30)
jme.setMapper("i01.head.eyeY", 0, 180, 30, 175)
jme.setMapper("i01.rightArm.bicep", 0, 180, 0, -150)
jme.setMapper("i01.leftArm.bicep", 0, 180, 0, -150)
jme.setMapper("i01.rightArm.shoulder", 0, 180, 30, -150)
jme.setMapper("i01.leftArm.shoulder", 0, 180, 30, -150)
jme.setMapper("i01.rightArm.rotate", 0, 180, 80, -80)
jme.setMapper("i01.leftArm.rotate", 0, 180, -80, 80)
jme.setMapper("i01.rightArm.omoplate", 0, 180, 10, -180)
jme.setMapper("i01.leftArm.omoplate", 0, 180, -10, 180)
jme.setMapper("i01.rightHand.index", 0, 180, 90, -90)
jme.setMapper("i01.rightHand.majeure", 0, 180, 90, -90)
jme.setMapper("i01.rightHand.wrist", 0, 180, -20, 60)
jme.setMapper("i01.leftHand.index", 0, 180, 90, -90)
jme.setMapper("i01.leftHand.majeure", 0, 180, 90, -90)
jme.setMapper("i01.leftHand.wrist", 0, 180, 20, -60)
jme.setMapper("i01.torso.topStom", 0, 180, -30, 30)
jme.setMapper("i01.torso.midStom", 0, 180, 50, 130)
jme.setMapper("i01.torso.lowStom", 0, 180, -30, 30)
(No subject)
(No subject)
Starting to use the IK3D
Starting to use the IK3D service
This was a "reach" for point location 5,5,5 ...
Is it close ? Dunno .. but a dhlink model went "into" the ik3d service - and published angles came out which matched the servo names .. the method was "not successful" - i made it publish telemetry anyway ...
omoplate was also -1.32 not really a valid servo input ...
TODO :
1. publish the expected error with the set of angles .. some points we can only reach for and cant touch yet..
2. be able to compare what IK "thinks" the positions are and what jme is displaying ... we're close to apples and apples here
3. dynamically change IK "sets" where i can through joystick or keyboard as input "say" it should use the "left" IK DH model or "right" IK DHModel etc ..
I added a small box to be the
I added a small box to be the IK Test Point - in theory it should try to take the bicep and point it at the box ...
but the IK3D returns "not success" and points all the joints of the left arm into the same position regardles of where the box is ..
I think the error occurs
Hi Gael, yep, I did the
As I mentioned before - I
As I mentioned before - I have problems running JMonkey-sdk on my main computer, because of driver conflicts. But, after loading it on another computer, I can use the rotation tool in JMonkey-sdk and see that it rotates correctly. There is no "jump/snap" to the 0 base normal, even using the correctly named node.
So .. I got to figure out what I'm doing incorrectly...
Hello Greg, I am glad you
Hello Greg,
I am glad you have been able to reproduce the snap issue.
It was not easy to explain the scenario. As you see the SDK is doing the movements just fine.
I also wonder what can be the difference between the SDK and MRL.
Playing with VinMoov and testng the gestures in JmonkeyMRL, I suddenly saw VinMoov fly off the grid.
Lovely perspective for a robot!
Blender Bones
Hi Gael,
I know that JMonkey has some utility for importing them..
Kevin is now looking into a IK library called (https://github.com/FedUni/caliko)
It looks potentially very promising. (https://www.youtube.com/watch?v=wEtp4P2ucYk)
Hello Greg, Currently I
If you want to have a test I attached Gareth's file.
VirtualInMoov.blend
I certainly could look into
I certainly could look into it and make something for VinMoov. In fact I was wondering since the beginning why bone armature was not used in JMonkeyMRL.
MRL's directive is not to be a cool 3d game (although .. with mrl-jme that might be a great after-affect :)
In game engines often IK which is all mathmatics based often is integrated very tightly with the gui/display/scene-graph. If we want the same IK to drive a "real" robot, sometimes its impracticle or unfeasable to utilise the game engines IK. Because from the perspective of the 3d game, it was only meant to update some pixels on a screen.
In our system, we need IK extremely modular - so that we can drive real servos, real motors, and/or simulators. These are not typical design considerations in 3d game engines.
I'm looking into the details of JMonkey. In my opinion its written very well and seems fairly modular, but I'm still uncertain it will provide us a modular enough IK for our purposes. (as Alessandro and I often chanted "MRL is Not the GUI" :)
Initially we were using DHParameters, but Kevin found what might be an excellent fit with https://github.com/FedUni/caliko. And there is also jbullet (for which JMonkeyEngine uses with several wrappers) ... So many choices .. so little time.
When it comes down to it all IK systems need a "skeleton" based on configuration and measurements.
At the moment MRL-JME uses the scene graph and Mapper configuration for the "skeleton".
It could use "bones" which is more configuration & measurements applied on top of the scene graph..
I'd say its still worth it in the long run to define these things at the source and let down stream applications attempt to utilize them. But for me its not the highest priority. Not sure what Kevin feels - he'll have to work at getting caliko calibrated .. perhaps bones would make it easier ..
I suspect he's getting most of his measurements from the current ones in DHParameters ...
Hope this clears some of mystery up ...