Skip to content

Commit 2772c9f

Browse files
Fix transform calculations
1 parent 913d0a5 commit 2772c9f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/task_monitor/src/task_monitor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ void TaskMonitor::AmclPoseCallback(const geometry_msgs::msg::PoseWithCovarianceS
6969

7070
bool TaskMonitor::IsRobotAtPose(geometry_msgs::msg::PoseWithCovarianceStamped desired_pose) {
7171
// Get the relative tf from the actual robot pose to the desired pose
72-
tf2::Stamped<tf2::Transform> robot_pose_tf, desired_pose_tf;
73-
tf2::fromMsg(robot_pose_, robot_pose_tf);
74-
tf2::fromMsg(desired_pose, desired_pose_tf);
72+
tf2::Transform robot_pose_tf, desired_pose_tf;
73+
tf2::fromMsg(robot_pose_.pose.pose, robot_pose_tf);
74+
tf2::fromMsg(desired_pose.pose.pose, desired_pose_tf);
7575
tf2::Transform relative_tf = robot_pose_tf.inverseTimes(desired_pose_tf);
7676

7777
// Check that location coordinates are lower than the distance tolerance

0 commit comments

Comments
 (0)