Skip to content

Commit

Permalink
[moveit_servo] fix: ensure ee_pose on planning_frame
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickKXMD committed Oct 30, 2024
1 parent ae05a5e commit 908593b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion moveit_ros/moveit_servo/src/utils/command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ JointDeltaResult jointDeltaFromPose(const PoseCommand& command, const moveit::co
Eigen::Vector<double, 6> cartesian_position_delta;

// Compute linear and angular change needed.
const Eigen::Isometry3d ee_pose{ robot_state->getGlobalLinkTransform(ee_frame) };
const Eigen::Isometry3d ee_pose{ robot_state->getGlobalLinkTransform(planning_frame).inverse() *
robot_state->getGlobalLinkTransform(ee_frame) };
const Eigen::Quaterniond q_current(ee_pose.rotation());
Eigen::Quaterniond q_target(command.pose.rotation());
Eigen::Vector3d translation_error = command.pose.translation() - ee_pose.translation();
Expand Down

0 comments on commit 908593b

Please sign in to comment.