From a077bfb9221ab25d3930c2de2569a08d19f075c3 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Mon, 15 Apr 2024 20:12:18 +0200 Subject: [PATCH] add test for the angle --- TCPServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index bd6bbba..a13fbc8 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -477,7 +477,7 @@ void TCPServer::goToAruco(const ArucoTag &arucoTag, const int pince) { // calculate the angle to be in front of the tag std::cout << "Tag pos relative : " << xPrime << " " << yPrime << std::endl; - double thetaPrime = std::atan2(yPrime, xPrime); + double thetaPrime = std::atan2(xPrime, yPrime); toSend = "strat;arduino;angle;" + std::to_string(static_cast((this->robotPose.theta + rotate + thetaPrime) * 100)) + "\n"; canMove = false;