INTERACT-tud-amr / dinova

1 stars 1 forks source link

BUG: Simultaneous Motion of gripper and arm in velocity mode #11

Closed maxspahn closed 5 months ago

maxspahn commented 5 months ago

If the arm is moving in velocity mode, it is not possible to operate the gripper without error.

Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/dinova/dinova_ws/src/dinova/dinova_control/scripts/kinova_driver.py", line 84, in start_spin_loop
    self.kinova.base.Stop()
  File "/usr/local/lib/python3.8/dist-packages/kortex_api/autogen/client_stubs/BaseClientRpc.py", line 1115, in Stop
    future = self.router.send(None, 1, BaseFunctionUid.uidStop, deviceId, options)
  File "/usr/local/lib/python3.8/dist-packages/kortex_api/RouterClient.py", line 71, in send
    self.transport.send(payloadMsgFrame)
  File "/usr/local/lib/python3.8/dist-packages/kortex_api/TCPTransport.py", line 85, in send
    raise ex
  File "/usr/local/lib/python3.8/dist-packages/kortex_api/TCPTransport.py", line 80, in send
    self.sock.sendall(payload)
TomasMerva commented 5 months ago

So far, it is fixed by stopping the base, before executing a gripper command: https://github.com/INTERACT-tud-amr/dinova/blob/a79b9d7d6efa765a7a8c07fa819069a2bcf92a99/dinova_control/scripts/kinova_driver.py#L186

It seems that it is not possible to control the gripper and joints' velocities simultaneously.


Current solution:

  1. ignore commands from fabrics
  2. stop the arm movement (be aware, that this takes one communication cycle to perform -> 25ms) https://github.com/Kinovarobotics/kortex/blob/6f557a8c65d5b5d8e83bf4966604788a05713658/api_python/doc/markdown/summary_pages/Base.md?plain=1#L84
  3. execute a gripper comand
  4. continue executing commands from fabrics
maxspahn commented 5 months ago

We can mark this as solved.

I put the assumption that arm motion and gripper actuation never happen at the same time in the assumption notes.