Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Dec 25, 2024
1 parent a59d04b commit 44ddf48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions tesseract_command_language/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,15 @@ bool formatJointPosition(const std::vector<std::string>& joint_names, WaypointPo
else if (waypoint.isCartesianWaypoint())
{
auto& cwp = waypoint.as<CartesianWaypointPoly>();
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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ TrajOptWaypointInfo TrajOptDefaultPlanProfile::createCostAndConstraints(
if (move_instruction.getWaypoint().isStateWaypoint())
{
const auto& swp = move_instruction.getWaypoint().as<StateWaypointPoly>();
JointWaypointPoly jwp = move_instruction.createJointWaypoint();
jwp = move_instruction.createJointWaypoint();
jwp.setNames(swp.getNames());
jwp.setPosition(swp.getPosition());
info.fixed = true;
Expand Down

0 comments on commit 44ddf48

Please sign in to comment.