Teacher wait correction
This commit is contained in:
parent
62ba070007
commit
701287b250
|
|
@ -36,6 +36,7 @@ void goToHomePosition()
|
||||||
void print_position(const char* state)
|
void print_position(const char* state)
|
||||||
{
|
{
|
||||||
cout<< state << endl;
|
cout<< state << endl;
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||||
// read current joint position
|
// read current joint position
|
||||||
vector<uint16_t> l_vCurrentJointPosition;
|
vector<uint16_t> l_vCurrentJointPosition;
|
||||||
_oDxlHandler.readCurrentJointPosition(l_vCurrentJointPosition);
|
_oDxlHandler.readCurrentJointPosition(l_vCurrentJointPosition);
|
||||||
|
|
@ -56,10 +57,13 @@ int main()
|
||||||
_oDxlHandler.setBaudRate(_poppyDxlBaudRate);
|
_oDxlHandler.setBaudRate(_poppyDxlBaudRate);
|
||||||
_oDxlHandler.enableTorque(true);
|
_oDxlHandler.enableTorque(true);
|
||||||
cout << endl;
|
cout << endl;
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||||
// display current joint position
|
// display current joint position
|
||||||
print_position("=========BEFORE MOVING========");
|
print_position("=========BEFORE MOVING========");
|
||||||
goToHomePosition();
|
goToHomePosition();
|
||||||
print_position("=========AFTER MOVING=========");
|
print_position("=========AFTER MOVING=========");
|
||||||
|
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(5000));
|
||||||
cout << "===Closing the Dynamixel Motor communication====" << endl;
|
cout << "===Closing the Dynamixel Motor communication====" << endl;
|
||||||
_oDxlHandler.enableTorque(false);
|
_oDxlHandler.enableTorque(false);
|
||||||
_oDxlHandler.closePort();
|
_oDxlHandler.closePort();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue