From b2253d2589140b01a23f9463e7ff13a02e95325c Mon Sep 17 00:00:00 2001 From: Hoop77 <p.badenhoop@gmx.de> Date: Tue, 8 May 2018 20:34:12 +0200 Subject: [PATCH] - --- modules/catkin_ws/src/car/src/mainNode/EgoMotion.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/catkin_ws/src/car/src/mainNode/EgoMotion.cpp b/modules/catkin_ws/src/car/src/mainNode/EgoMotion.cpp index 261d606f..c5d34c90 100644 --- a/modules/catkin_ws/src/car/src/mainNode/EgoMotion.cpp +++ b/modules/catkin_ws/src/car/src/mainNode/EgoMotion.cpp @@ -16,7 +16,6 @@ void EgoMotion::environmentDataCallback(const environmentDataMsg::ConstPtr & inM std::cout << "EgoMotion recived new environmentData data (" << inMsg->distance << ", " << inMsg->relativeSpeed << ")." << std::endl; distance = inMsg->distance; relSpeed = inMsg->relativeSpeed; - sleep(3); computeAndNotify(); std::cout << "EgoMotion done with environmentData data (" << inMsg->distance << ", " << inMsg->relativeSpeed << ")." << std::endl; } @@ -26,14 +25,13 @@ void EgoMotion::stmDataCallback(const stmDataMsg::ConstPtr & inMsg) { std::cout << "EgoMotion recived new stmData data (" << inMsg->speed << ", " << inMsg->angle << ")." << std::endl; stmSpeed = inMsg->speed; - sleep(1); computeAndNotify(); std::cout << "EgoMotion done with stmData data (" << inMsg->speed << ", " << inMsg->angle << ")." << std::endl; } void EgoMotion::computeAndNotify() { - prvSpeed = stmSpeed + relSpeed; + prvSpeed = (stmSpeed.load() + relSpeed.load()); cruiseControllerNotify(); } -- GitLab