From 701287b250e0369a73c297a2c11fed96199d9281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20P=C3=A9rin?= Date: Fri, 10 Mar 2023 09:58:57 +0100 Subject: [PATCH] Teacher wait correction --- Robot_arm.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Robot_arm.cpp b/Robot_arm.cpp index 3bdbecd..e4a1891 100644 --- a/Robot_arm.cpp +++ b/Robot_arm.cpp @@ -36,6 +36,7 @@ void goToHomePosition() void print_position(const char* state) { cout<< state << endl; + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); // read current joint position vector l_vCurrentJointPosition; _oDxlHandler.readCurrentJointPosition(l_vCurrentJointPosition); @@ -56,10 +57,13 @@ int main() _oDxlHandler.setBaudRate(_poppyDxlBaudRate); _oDxlHandler.enableTorque(true); cout << endl; + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); // display current joint position print_position("=========BEFORE MOVING========"); goToHomePosition(); print_position("=========AFTER MOVING========="); + + std::this_thread::sleep_for(std::chrono::milliseconds(5000)); cout << "===Closing the Dynamixel Motor communication====" << endl; _oDxlHandler.enableTorque(false); _oDxlHandler.closePort();