jhu-dvrk / sawIntuitiveResearchKit

cisst/SAW stack for the da Vinci Research Kit (dVRK)
https://github.com/jhu-dvrk/sawIntuitiveResearchKit/wiki
117 stars 68 forks source link

Teleop PSM should optimize roll joints #56

Open adeguet1 opened 8 years ago

adeguet1 commented 8 years ago

Both the master and tool roll allow more than one full rotation. When aligning the master to the slave, the current teleop components use the forward and inverse kinematics without trying to match the joint location, i.e. the tool might be close to it's limit clockwise while the master might be close to it's limit counter clockwise. This means that one might hit a joint limit while the other still has plenty of joint space. To fix this, we need to pick the best roll angle on the MTM mod 2PI when aligning the MTM.

Furthermore, the PSM tools are most likely symmetrical so we don't really care if the tool is facing up or down. So it's more likely that we can optimize the MTM roll by mod PI. If we need half a turn to optimize, we might have to maintain a rotation along Z at the tool tip to maintain the proper forward/inverse kinematics.

adeguet1 commented 8 years ago

We actually don't care if the tool is symmetrical, the MTM is. So the 180 flip should be performed on the MTM side for all kinematic purposes. The PSM kinematics should remain unchanged.