Zeroed orientation to prevent turning after move.

This commit is contained in:
Bastian Hofmann 2023-03-31 16:37:24 +00:00
parent 91d464bf9b
commit 8995b53d29

View File

@ -77,6 +77,11 @@ BT::NodeStatus BT::GenerateXYPose::tick() {
auto randomPose = std::make_shared<geometry_msgs::msg::Pose>();
randomPose->position.x = pos.x;
randomPose->position.y = pos.y;
randomPose->position.z = 0;
randomPose->orientation.w = 0;
randomPose->orientation.x = 0;
randomPose->orientation.y = 0;
randomPose->orientation.z = 0;
printf("Generated Target: %f %f\n", pos.x, pos.y);
setOutput<std::shared_ptr<geometry_msgs::msg::Pose>>("pose", randomPose);