From 9809bdc4edfefeef65611a4eb640d933c54e3f88 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Thu, 18 Apr 2024 14:34:51 +0200 Subject: [PATCH] spawn point | sleep --- TCPServer.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/TCPServer.cpp b/TCPServer.cpp index 076e781..ecbb56a 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -182,12 +182,12 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) switch (spawnPointNb) { case 3: this->team = BLUE; - spawnPoint[0] = 200; + spawnPoint[0] = 250; spawnPoint[1] = 1781; spawnPoint[2] = 0; // For test - finishPoint[0] = 200; + finishPoint[0] = 400; finishPoint[1] = 1781; finishPoint[2] = 0; @@ -197,7 +197,7 @@ void TCPServer::handleMessage(const std::string& message, int clientSocket) break; case 6: this->team = YELLOW; - spawnPoint[0] = 1800; + spawnPoint[0] = 1750; spawnPoint[1] = 1781; spawnPoint[2] = 3.1415; finishPoint[0] = 2600; @@ -424,6 +424,8 @@ void TCPServer::startGameBlueTeam() { this->broadcastMessage("strat;arduino;angle;157\n"); awaitRobotIdle(); + usleep(1'000'000); + arucoTags.clear(); this->broadcastMessage("strat;aruco;get aruco;1\n"); @@ -467,6 +469,8 @@ void TCPServer::startGameBlueTeam() { this->broadcastMessage("strat;arduino;angle;157\n"); awaitRobotIdle(); + usleep(1'000'000); + arucoTags.clear(); this->broadcastMessage("strat;aruco;get aruco;1\n"); @@ -510,6 +514,8 @@ void TCPServer::startGameBlueTeam() { this->broadcastMessage("strat;arduino;angle;157\n"); awaitRobotIdle(); + usleep(1'000'000); + arucoTags.clear(); this->broadcastMessage("strat;aruco;get aruco;1\n");