Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iCub finger adduction/abduction coupling handlers #474

Closed
xEnVrE opened this issue Mar 28, 2020 · 3 comments
Closed

iCub finger adduction/abduction coupling handlers #474

xEnVrE opened this issue Mar 28, 2020 · 3 comments

Comments

@xEnVrE
Copy link
Contributor

xEnVrE commented Mar 28, 2020

Similarly to #473, I am trying to understand the code of the coupling handlers for the finger adduction/abduction.

From physical joints space to controlled DoFs space

decouplePos should move from the physical joint space (i.e. the four joints associated to index, middle, ring and little) to the controlled DoFs space (i.e. the iCub {l, r}_hand_finger, i.e. joint no. 7).

bool FingersAbductionCouplingHandler::decouplePos (yarp::sig::Vector& current_pos)
{
if (m_coupledJoints.size()!=m_couplingSize) return false;
current_pos[m_coupledJoints[0]] = current_pos[m_coupledJoints[3]];
return true;
}

Then, shouldn't it be something like this? This because the range spanned by the unique DoF {l,r}_hand_finger is three times the range spanned by the link associated to the little finger (or, alternatively, that of the index or that of the little).

current_pos[m_coupledJoints[0]] = current_pos[m_coupledJoints[3]] * 3;

From controlled DoFs space to physical joints space

decoupleRefPos should move from the controlled DoFs space (i.e. the unique DoF {l,r}_hand_finger) to the physical joint space (the four joints associated to index, middle, ring and little)

yarp::sig::Vector FingersAbductionCouplingHandler::decoupleRefPos (yarp::sig::Vector& pos_ref)
{
yarp::sig::Vector out = pos_ref;
if (m_coupledJoints.size()!=m_couplingSize) {yError() << "FingersAbductionCouplingHandler: Invalid coupling vector"; return out;}
out[m_coupledJoints[0]] = -pos_ref[m_coupledJoints[0]]/2;
out[m_coupledJoints[1]] = 0.0;
out[m_coupledJoints[2]] = pos_ref[m_coupledJoints[0]]/2;
out[m_coupledJoints[3]] = pos_ref[m_coupledJoints[0]];
return out;
}

Then, shouldn't it be something like this? This because the best we can do is to associate one third of the range spanned by {l,r}_hand_finger to each joint (out[m_coupledJoints[1]] is set to the 0.0 as the link associated to the middle finger does not move on the real robot).

out[m_coupledJoints[0]] = -pos_ref[m_coupledJoints[0]]/3; 
out[m_coupledJoints[1]] = 0.0; 
out[m_coupledJoints[2]] = pos_ref[m_coupledJoints[0]]/3; 
out[m_coupledJoints[3]] = pos_ref[m_coupledJoints[0]]/3; 
@traversaro
Copy link
Member

The situation is not really clear to me here. Probably as a start it would be useful to have a clear definition/agreement with names of the physical and controlled joints, see robotology/icub-models#30 . cc @kouroshD

@xEnVrE
Copy link
Contributor Author

xEnVrE commented Jul 24, 2020

Can this be closed?

@traversaro
Copy link
Member

If it works fine, ok for me!

@xEnVrE xEnVrE closed this as completed Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants