@@ -14,7 +14,8 @@ void RobotAndDOF::SetDOFValues(const DblVec& dofs) {
14
14
OR::Transform T;
15
15
OR::RaveGetTransformFromAffineDOFValues (T, dofs.begin ()+joint_inds.size (), affinedofs, rotationaxis, true );
16
16
robot->SetTransform (T);
17
- robot->SetDOFValues (dofs, false , joint_inds);
17
+ if (joint_inds.size () > 0 )
18
+ robot->SetDOFValues (dofs, false , joint_inds);
18
19
}
19
20
else {
20
21
robot->SetDOFValues (dofs, false , joint_inds);
@@ -23,7 +24,8 @@ void RobotAndDOF::SetDOFValues(const DblVec& dofs) {
23
24
24
25
DblVec RobotAndDOF::GetDOFValues () {
25
26
DblVec out;
26
- robot->GetDOFValues (out, joint_inds);
27
+ if (joint_inds.size () > 0 ):
28
+ robot->GetDOFValues (out, joint_inds);
27
29
if (affinedofs != 0 ) {
28
30
out.resize (GetDOF ());
29
31
OR::Transform T = robot->GetTransform ();
@@ -40,7 +42,8 @@ void RobotAndDOF::SetRobotActiveDOFs() {
40
42
}
41
43
42
44
void RobotAndDOF::GetDOFLimits (DblVec& lower, DblVec& upper) const {
43
- robot->GetDOFLimits (lower, upper, joint_inds);
45
+ if (joint_inds.size () > 0 )
46
+ robot->GetDOFLimits (lower, upper, joint_inds);
44
47
const int translation_dofs[3 ] = {DOF_X, DOF_Y, DOF_Z};
45
48
for (int i=0 ; i < 3 ; ++i) {
46
49
if (affinedofs & translation_dofs[i]) {
0 commit comments