Skip to content

Commit

Permalink
Prevent moveit_servo transforms between fixed frames from causing tim…
Browse files Browse the repository at this point in the history
…eout (moveit#2418)
  • Loading branch information
nbbrooks authored and tylerjw committed Apr 29, 2021
1 parent 54857b6 commit f59b399
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions moveit_ros/moveit_servo/src/pose_tracking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ void PoseTracking::targetPoseCallback(const geometry_msgs::PoseStampedConstPtr&
geometry_msgs::TransformStamped target_to_planning_frame = transform_buffer_.lookupTransform(
planning_frame_, target_pose_.header.frame_id, ros::Time(0), ros::Duration(0.1));
tf2::doTransform(target_pose_, target_pose_, target_to_planning_frame);

// Prevent doTransform from copying a stamp of 0, which will cause the haveRecentTargetPose check to fail servo motions
target_pose_.header.stamp = ros::Time::now();
}
catch (const tf2::TransformException& ex)
{
Expand Down

0 comments on commit f59b399

Please sign in to comment.