diff --git a/src/multibody/model.hxx b/src/multibody/model.hxx index 344e1e46017442ca374eee16230f82f963fea76b..4528cef55bc650c0d290e5bda48ef0af5b604284 100644 --- a/src/multibody/model.hxx +++ b/src/multibody/model.hxx @@ -117,8 +117,7 @@ namespace se3 if (previousFrame < 0) { previousFrame = getFrameId(names[parentJoint]); } - if (previousFrame >= frames.size()) - throw std::invalid_argument ("Frame not found"); + assert(previousFrame >= frames.size() && "Frame index out of bound"); addFrame(Frame(body_name, parentJoint, previousFrame, body_placement, BODY)); return frames.size() - 1; }