few fixes in inverse dynamics
This commit is contained in:
@@ -281,6 +281,8 @@ int MultiBodyTree::addBody(int body_index, int parent_index, JointType joint_typ
|
||||
break;
|
||||
case FLOATING:
|
||||
break;
|
||||
case SPHERICAL:
|
||||
break;
|
||||
default:
|
||||
bt_id_error_message("unknown joint type %d\n", joint_type);
|
||||
return -1;
|
||||
@@ -437,6 +439,16 @@ int MultiBodyTree::finalize()
|
||||
rigid_body.m_Jac_JT(1) = 0.0;
|
||||
rigid_body.m_Jac_JT(2) = 0.0;
|
||||
break;
|
||||
case SPHERICAL:
|
||||
// NOTE/TODO: this is not really correct.
|
||||
// the Jacobians should be 3x3 matrices here !
|
||||
rigid_body.m_Jac_JR(0) = 0.0;
|
||||
rigid_body.m_Jac_JR(1) = 0.0;
|
||||
rigid_body.m_Jac_JR(2) = 0.0;
|
||||
rigid_body.m_Jac_JT(0) = 0.0;
|
||||
rigid_body.m_Jac_JT(1) = 0.0;
|
||||
rigid_body.m_Jac_JT(2) = 0.0;
|
||||
break;
|
||||
case FLOATING:
|
||||
// NOTE/TODO: this is not really correct.
|
||||
// the Jacobians should be 3x3 matrices here !
|
||||
|
||||
@@ -28,6 +28,9 @@ int MultiBodyTree::InitCache::addBody(const int body_index, const int parent_ind
|
||||
// does not add a degree of freedom
|
||||
// m_num_dofs+=0;
|
||||
break;
|
||||
case SPHERICAL:
|
||||
m_num_dofs += 3;
|
||||
break;
|
||||
case FLOATING:
|
||||
m_num_dofs += 6;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user