First test of Kwatters brand spanking new DruppNeck service :)

It's alive and moving, but needs some debugging.
Doesn't show up in Service GUI yet and when called from a script it tries to download the DruppNeck service (Download popup).
If i do a manual, and the neck points straight forward and is level, but if i do a neck.moveTo(0, 0, 0) it will move a bit to the left and "Roll" a small bit to the same side.
I am not 100% sure about the what servo should be up,middle or down, have tried some combinations and this on is the one that look at least a bit working, going to read up on the ordinal  penguin wrist.
In the attached video i do a moveTo(0, 0, 0) the a Roll -45 / +45, then moveTo(0, 0, 0) and Pitch  -45 / +45, moveTo(0, 0, 0), Yaw  -45 / +45, and then a last moveTo(0, 0, 0).
As you can see in the video they all look very similar.
One drive link to video:!Asf9doI7WS5djspkjDOCqefAuHg3_w
Script used:
# port = "/dev/ttyUSB0"
port = "COM4"
# start optional virtual arduino service, used for test
if ('virtual' in globals() and virtual):
    virtualArduino = Runtime.start("virtualArduino", "VirtualArduino")
arduino = Runtime.start("arduino","Arduino")
print("Connecting arduino to serial port")
up = Runtime.start("up","Servo")
middle = Runtime.start("middle","Servo")
down = Runtime.start("down","Servo")
neck = Runtime.start("neck", "DruppNeck")
neck.setServos(up, middle, down), 180, 0, 180), 180, 0, 180), 180, 0, 180)
#Roll, Pitch, Yaw
print("Moving head to rest position")
neck.moveTo(0, 0, 0)
print("Head Roll -45 / +45")
neck.moveTo(-45, 0, 0)
neck.moveTo(45, 0, 0)
print("Moving head to rest position")
neck.moveTo(0, 0, 0)
print("Head Pitch -45 / +45")
neck.moveTo(0, -45, 0)
neck.moveTo(0, 45, 0)
print("Moving head to rest position")
neck.moveTo(0, 0, 0)
print("Head Yaw -45 / +45")
neck.moveTo(0, 0, -45)
neck.moveTo(0, 0, 45)
print("Moving head to rest position")
neck.moveTo(0, 0, 0)
juerg's picture

avoiding colliding moves

Using a randomizer to make inmoov-moves I ran into the problem of having e.g. the bicep up and the arm rotated inward, a shoulder backward move will crash the lower arm / hand into the body. I can think of quite a number of colliding moves inmoovs DOF is capable of.

Has anybody defined "impossible" moves or a even better created a script that - based on the current state of all servos - prevents colliding moves?

calamity's picture

Not really a script, but the

Not really a script, but the integratedMovement service use the position of the servo to compute the position of the body part and prevent collision by doing countermove while using IK to have arm reach a position. 

In my test it was good enough to prevent any disaster.

I really wish I had more time to continue working on that


kwatters's picture

researching, building, and testing

So,  I found this page.

As far as I can tell, that white paper explains the kinematics of the PARLOMA wrist.  The port I did of the code was pretty much line for line from the c code so it should return the same result.

I figured it'd be best to build and test one locally, so I've just finished printing out most of the last peices and i grabbed some mg996r's from an old inmoov forearm.  I am working through reading that white paper and I'm happy to see such a detailed explination of the direct and invese kinematics for the mechanism.  

I'll work on assembling over the next week and with any luck i'll be able to reproduce and test locally. 

more to come...