Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix KinematicGroupInstructionInfo and JointGroupInstructionInfo extract cartesian pose #522

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading