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();