Skip to content

Commit

Permalink
Fix KinematicGroupInstructionInfo and JointGroupInstructionInfo extra…
Browse files Browse the repository at this point in the history
…ct cartesian pose
  • Loading branch information
Levi Armstrong authored and Levi-Armstrong committed Oct 17, 2024
1 parent e6f96b1 commit 9df7378
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tesseract_motion_planners/simple/src/interpolation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ Eigen::Isometry3d JointGroupInstructionInfo::calcCartesianPose(const Eigen::Vect
Eigen::Isometry3d JointGroupInstructionInfo::extractCartesianPose(bool in_world) const
{
if (!instruction.getWaypoint().isCartesianWaypoint())
throw std::runtime_error("Instruction waypoint type is not a CartesianWaypoint, unable to extract cartesian pose!");
{
const auto& jp = getJointPosition(instruction.getWaypoint());
return calcCartesianPose(jp, in_world);
}

if (in_world)
return working_frame_transform * instruction.getWaypoint().as<CartesianWaypointPoly>().getTransform();
Expand Down Expand Up @@ -184,7 +187,10 @@ Eigen::Isometry3d KinematicGroupInstructionInfo::calcCartesianPose(const Eigen::
Eigen::Isometry3d KinematicGroupInstructionInfo::extractCartesianPose(bool in_world) const
{
if (!instruction.getWaypoint().isCartesianWaypoint())
throw std::runtime_error("Instruction waypoint type is not a CartesianWaypoint, unable to extract cartesian pose!");
{
const auto& jp = getJointPosition(instruction.getWaypoint());
return calcCartesianPose(jp, in_world);
}

if (in_world)
return working_frame_transform * instruction.getWaypoint().as<CartesianWaypointPoly>().getTransform();
Expand Down

0 comments on commit 9df7378

Please sign in to comment.