From ceecb4b2f830bebb96bbf52ff7a592e17080359b Mon Sep 17 00:00:00 2001 From: Levi Armstrong Date: Tue, 24 Dec 2024 19:17:28 -0600 Subject: [PATCH] Fix formatJointPosition handle of cartesian seed --- tesseract_command_language/src/utils.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 {