elephantrobotics / pymycobot

This is a python API for ElephantRobotics product.
MIT License
109 stars 54 forks source link

The mycobot adaptive gripper is always closed and gets stuck with set_gripper_value() #8

Closed 3110 closed 3 years ago

3110 commented 3 years ago

Describe the bug Both set_gripper_value(0, speed) and set_gripper_value(496, speed) close the mycobot adaptive gripper, then the gripper gets stuck. It seems to be occured for any value of set_gripper_value().

To Reproduce

  1. Initialize the gripper once(open to maximum)
  2. Connect to the gripper with mycobot = MyCobot("COM13")
  3. Call mycobot.set_gripper_value(0, 100) # minimum value
  4. The gripper is closed and gets stuck ...
  5. Power off and on
  6. Connect to the gripper with mycobot = MyCobot("COM13")
  7. Call mycobot.set_gripper_value(496, 100) #maximum value
  8. The gripper is closed and gets stack ...

Expected behavior Though I don't know the meaning of the value of set_gripper_value(), I expect the following behavior:

Desktop

MyCobot

Additional context If set_gripper_ini() sets the initial position to 248, shoud be the range of the value in set_gripper_value() from 0 to 248 ?

zlj-zz commented 3 years ago

0-496 is 0 degrees to 360 degrees.So you need to try a smaller value, like 280

3110 commented 3 years ago

Umm, the gripper is closed and gets stuck with 280(or any smaller values). Does set_gripper_value() set the absolute position(degree?) regardless of the zero position of get_gripper_ini(), or set the relative position from the zero position of get_gripper_ini()(value = 248) ?

zlj-zz commented 3 years ago

relative position

3110 commented 3 years ago

The values between 840(close) and 2550(open) are OK...

zlj-zz commented 3 years ago

Are you sure is 840? not 84?

3110 commented 3 years ago

840, not 84.

3110 commented 3 years ago

With AtomMain 2.6, set_gripper_value() doesn't work at all.

zlj-zz commented 3 years ago

I will test it next week, and response you

zlj-zz commented 3 years ago

This method really can't be used in atom 2.6. If you have such requirements, you can use atom 2.5 first.