Skip to content

Commit

Permalink
[moveit_servo] fix: ensure ee_pose on planning_frame (#3046)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Castro <4603398+sea-bass@users.noreply.github.com>
  • Loading branch information
patrickKXMD and sea-bass authored Oct 31, 2024
1 parent 08da0b6 commit d5f763e
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 d5f763e

Please sign in to comment.