50 getLogger(),
"[CbNavigateBackwards] Straight backwards motion distance: " << dist);
54 auto currentPoseMsg = p->toPoseMsg();
55 tf2::Transform currentPose;
56 tf2::fromMsg(currentPoseMsg, currentPose);
58 tf2::Transform backwardDeltaTransform;
59 backwardDeltaTransform.setIdentity();
60 backwardDeltaTransform.setOrigin(tf2::Vector3(-dist, 0, 0));
62 tf2::Transform targetPose = currentPose * backwardDeltaTransform;
65 goal.pose.header.frame_id = referenceFrame;
67 tf2::toMsg(targetPose, goal.pose.pose);
68 RCLCPP_INFO_STREAM(
getLogger(),
"[CbNavigateBackwards] TARGET POSE BACKWARDS: " << goal.pose);
70 geometry_msgs::msg::PoseStamped currentStampedPoseMsg;
71 currentStampedPoseMsg.header.frame_id = referenceFrame;
72 currentStampedPoseMsg.header.stamp =
getNode()->now();
73 tf2::toMsg(currentPose, currentStampedPoseMsg.pose);