From 44ddf48817796f2a596d8145586ea373c1284c38 Mon Sep 17 00:00:00 2001 From: Levi Armstrong Date: Tue, 24 Dec 2024 19:44:21 -0600 Subject: [PATCH] Fixup --- tesseract_command_language/src/utils.cpp | 14 +++++++++----- .../src/profile/trajopt_default_plan_profile.cpp | 2 +- 2 files changed, 10 insertions(+), 6 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 { diff --git a/tesseract_motion_planners/trajopt/src/profile/trajopt_default_plan_profile.cpp b/tesseract_motion_planners/trajopt/src/profile/trajopt_default_plan_profile.cpp index 582203a19b..05ed8002d7 100644 --- a/tesseract_motion_planners/trajopt/src/profile/trajopt_default_plan_profile.cpp +++ b/tesseract_motion_planners/trajopt/src/profile/trajopt_default_plan_profile.cpp @@ -166,7 +166,7 @@ TrajOptWaypointInfo TrajOptDefaultPlanProfile::createCostAndConstraints( if (move_instruction.getWaypoint().isStateWaypoint()) { const auto& swp = move_instruction.getWaypoint().as(); - JointWaypointPoly jwp = move_instruction.createJointWaypoint(); + jwp = move_instruction.createJointWaypoint(); jwp.setNames(swp.getNames()); jwp.setPosition(swp.getPosition()); info.fixed = true;