Skip to content

Commit d28eb64

Browse files
committed
[DQ_SerialManipulatorDH,MDH.cpp] Added the default case in the get_parameter and get_parameters methods to check if this fixes the compilation on Ubuntu.
1 parent ac2ea28 commit d28eb64

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/robot_modeling/DQ_SerialManipulatorDH.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ VectorXd DQ_SerialManipulatorDH::get_parameters(const DQ_ParameterDH &parameter_
118118
return dh_matrix_.row(2);
119119
case DQ_ParameterDH::ALPHA:
120120
return dh_matrix_.row(3);
121+
default:
122+
throw std::runtime_error("Wrong type of parameter");
121123
}
122124
}
123125

@@ -140,6 +142,8 @@ double DQ_SerialManipulatorDH::get_parameter(const DQ_ParameterDH &parameter_typ
140142
return dh_matrix_(2, to_ith_link);
141143
case DQ_ParameterDH::ALPHA:
142144
return dh_matrix_(3, to_ith_link);
145+
default:
146+
throw std::runtime_error("Wrong type of parameter");
143147
}
144148
}
145149

src/robot_modeling/DQ_SerialManipulatorMDH.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ VectorXd DQ_SerialManipulatorMDH::get_parameters(const DQ_ParameterDH &parameter
129129
return mdh_matrix_.row(2);
130130
case DQ_ParameterDH::ALPHA:
131131
return mdh_matrix_.row(3);
132+
default:
133+
throw std::runtime_error("Wrong type of parameter");
132134
}
133135
}
134136

@@ -151,6 +153,8 @@ double DQ_SerialManipulatorMDH::get_parameter(const DQ_ParameterDH &parameter_ty
151153
return mdh_matrix_(2, to_ith_link);
152154
case DQ_ParameterDH::ALPHA:
153155
return mdh_matrix_(3, to_ith_link);
156+
default:
157+
throw std::runtime_error("Wrong type of parameter");
154158
}
155159
}
156160

0 commit comments

Comments
 (0)