elephantrobotics / pymycobot

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

Gripper does not keep closed #18

Closed junjungoal closed 3 years ago

junjungoal commented 3 years ago

Describe the bug The gripper does not keep closed (a servo motor does not keep running), and, it drops an object in the gripper.

To Reproduce Steps to reproduce the behavior:

  1. Burn firmware using MyStudio
    • On Basic board: minirobot v0.4
    • On Atom board: AtomMain v2.8 (I also tried latest version and older version currently available, but none of these worked)
  2. Install this package
  3. Use Transponder
  4. Calibrate the gripper by calling set_gripper_ini() after I fully open the gripper.
  5. Execute the following script
    from pymycobot.mycobot import MyCobot
    mc = MyCobot('/dev/ttyUSB0')
    mc.set_gripper_state(1, 70)
  6. A gripper keep closed for some seconds (sometimes around 30~40s, or even around 10s), but eventually it repeats loosing and closing (you can check how it behaves in the attached movie ).. which results in releasing an object that the gripper grasps.

Expected behavior The gripper should keep closed all the time. That is, a servo motor should keep running to grasp an object.....otherwise it releases the object.

Screenshots

https://user-images.githubusercontent.com/9709386/127781900-bff2efdb-c8b8-414c-9a57-ff5c8a1c83be.mp4

Desktop (please complete the following information):

zlj-zz commented 3 years ago

This is because the gripper is too tight.

There are several ways you can try:

junjungoal commented 3 years ago

@zlj-zz I see. So basically, I may need to change the second argument of set_encoder function to make sure that the gripper won't be too tight... as it did not work with 1200, but worked with 1500 in my case.

Thank you very much.