diff --git a/tesseract_command_language/src/utils.cpp b/tesseract_command_language/src/utils.cpp index c7d6068e1f..45a8e4516e 100644 --- a/tesseract_command_language/src/utils.cpp +++ b/tesseract_command_language/src/utils.cpp @@ -241,11 +241,15 @@ bool formatJointPosition(const std::vector& joint_names, WaypointPo else if (waypoint.isCartesianWaypoint()) { auto& cwp = waypoint.as(); - if (!cwp.hasSeed()) - throw std::runtime_error("Cartesian waypoint does not have a seed."); - - jv = &(cwp.getSeed().position); - jn = &(cwp.getSeed().joint_names); + if (cwp.hasSeed()) + { + jv = &(cwp.getSeed().position); + jn = &(cwp.getSeed().joint_names); + } + else + { + return false; + } } else {