From 53eeaf6eb8c5e0ea86605165fc14cb33cd91ede4 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Mon, 8 Apr 2024 16:54:39 +0200 Subject: [PATCH] Who did that ?! --- tcp/MyClient.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tcp/MyClient.cpp b/tcp/MyClient.cpp index fe7cca7..3b2f604 100644 --- a/tcp/MyClient.cpp +++ b/tcp/MyClient.cpp @@ -45,10 +45,10 @@ void MyClient::handleMessage(const std::string& message) // cut the string with space and take the first, second, third and fourth element std::vector tokens = TCPSocket::split(message, " "); - robotPose->position.x = std::stof(tokens[1]); - robotPose->position.y = std::stof(tokens[2]); - robotPose->position.z = std::stof(tokens[3]); - robotPose->theta = std::stof(tokens[4]); + robotPose->position.x = std::stof(tokens[0]); + robotPose->position.y = std::stof(tokens[1]); + robotPose->position.z = std::stof(tokens[2]); + robotPose->theta = std::stof(tokens[3]); } } }