Hello

With the refactoring of the MRLComm, I have reworked how the servo speed method as the old one got broken.

The new method will give a more realistic speed control, but require some more work to use

To have real speed control, the servo must know at wich speed it can turn. You can tell him is maximum speed by setting with servo.setMaxVelocity(degree/s)

Each servo could have different value, as it's much more faster to turn the head than raise the arm.

The way to determine the maxVelocity is to use a timer to time the how much time it take to move between two positions

By example, to move my shoulder servo it takes 4s to do a move from position 10 to 70, so it's maxVelocity will be

(70-10) / 4 = 60/4 = 15

Here's the setting I use for my inMoov

 i01.leftArm.shoulder.setMaxVelocity(14)
  i01.leftArm.omoplate.setMaxVelocity(15)
  i01.leftArm.rotate.setMaxVelocity(18)
  i01.leftArm.bicep.setMaxVelocity(26)

  i01.head.rothead.setMaxVelocity(210)
  i01.head.neck.setMaxVelocity(185)

  i01.lefHand.thumb.setMaxVelocity(250)
  i01.leftHand.index.setMaxVelocity(250)
  i01.leftHand.majeure.setMaxVelocity(250)
  i01.leftHand.ringFinger.setMaxVelocity(250)
  i01.leftHand.pinky.setMaxVelocity(250)

i01.torso.topStom.setMaxVelocity(13)
i01.torso.midStom.setMaxVelocity(13)

 

I use the same for the right side

Your setting can be different depending on the servo you use, your power source, the restriction of your gears etc.

After the setMaxVelocity is set, using servo.setSpeed will act the same way as before. with a setSpeed(0.5) having the actuator to move at 50% of it's maximum speed

Christian