HaddingtonDynamics / Dexter

GNU General Public License v3.0
374 stars 85 forks source link

Add Joint 6, 7 support for move all joints #36

Closed JamesNewton closed 6 years ago

JamesNewton commented 6 years ago

Accept 2 additional values on the "a" (move all joints) instruction and send those out to set gripper roll and span. This integrates the 2 new servo joints into the move all joints system, bringing it from 5 joints to 7 joints.

However, DDE may not correctly send these values as of 2.5.3. This may happen even when only 5 values are sent in the DDE Dexter.move_all_joints command as it will try to guess where Joints 6 and 7 were before. There are two problems:

  1. DDE is incorrectly converting the Joint 6 and 7 values. It seems to always send 3600 for joint 6 and 7200 for joint 7. There is some question as to what the values sent should be. Either:
  1. The initial values for these joints may not be set correctly.

Also, because the SetParam EERoll and EESpan commands also set the End Effector positions (which are Joints 6 and 7), DDE may not correctly track the commanded position, and if a 5 axes Dexter.move_all_joints command is issued, it will assume the user wants Joint 6 and 7 at their last known position, which may be different from where they are now due to the EERoll and EESpan SetParm commands. Either:

  1. DDE could just NOT send positions when it isn't given position for higher order joints. This seems safest.

  2. DDE could monitor the EERoll and EESpan commands to stay in the loop on their commanded positions.

See:

https://github.com/cfry/dde/issues/35

https://github.com/HaddingtonDynamics/Dexter/wiki/set-parameter-oplet