First test of Kwatters brand spanking new DruppNeck service :)

It's alive and moving, but needs some debugging.
 
Cosmetic:
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 up.rest(), middle.rest() and down.rest() 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:  https://1drv.ms/v/s!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")
    virtualArduino.connect(port)
arduino = Runtime.start("arduino","Arduino")
print("Connecting arduino to serial port")
arduino.connect(port)
 
up = Runtime.start("up","Servo")
middle = Runtime.start("middle","Servo")
down = Runtime.start("down","Servo")
 
up.attach(arduino,22)
middle.attach(arduino,24)
down.attach(arduino,26)
 
 
neck = Runtime.start("neck", "DruppNeck")
neck.setServos(up, middle, down)
 
up.map(0, 180, 0, 180)
middle.map(0, 180, 0, 180)
down.map(0, 180, 0, 180)
 
up.setRest(90)
middle.setRest(90)
down.setRest(90)
 
up.setAutoDisable(True)
up.disableDelayIfVelocity=1000
middle.setAutoDisable(True)
middle.disableDelayIfVelocity=1000
down.setAutoDisable(True)
down.disableDelayIfVelocity=1000
 
up.setVelocity(100) 
middle.setVelocity(100)
down.setVelocity(100)
 
#Roll, Pitch, Yaw
print("Moving head to rest position")
neck.moveTo(0, 0, 0)
sleep(5)
 
print("Head Roll -45 / +45")
neck.moveTo(-45, 0, 0)
sleep(2)
neck.moveTo(45, 0, 0)
 
sleep(5)
print("Moving head to rest position")
neck.moveTo(0, 0, 0)
 
print("Head Pitch -45 / +45")
neck.moveTo(0, -45, 0)
sleep(2)
neck.moveTo(0, 45, 0)
 
sleep(5)
print("Moving head to rest position")
neck.moveTo(0, 0, 0)
 
print("Head Yaw -45 / +45")
neck.moveTo(0, 0, -45)
sleep(2)
neck.moveTo(0, 0, 45)
 
sleep(5)
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.

http://journals.sagepub.com/doi/pdf/10.5772/64113

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...