put the poppy in playing start position
This commit is contained in:
parent
9edde290d6
commit
ea6a0c2b1a
23
main.cpp
23
main.cpp
|
|
@ -46,11 +46,11 @@ void goToPlayingPosition()
|
|||
{
|
||||
std::vector<uint16_t> l_vTargetJointPosition;
|
||||
l_vTargetJointPosition.push_back(convertAnglesToJointCmd(0.0f));
|
||||
l_vTargetJointPosition.push_back(convertAnglesToJointCmd(0.0f));
|
||||
l_vTargetJointPosition.push_back(convertAnglesToJointCmd(90.0f));
|
||||
l_vTargetJointPosition.push_back(convertAnglesToJointCmd(0.0f));
|
||||
l_vTargetJointPosition.push_back(convertAnglesToJointCmd(-45.0f));
|
||||
l_vTargetJointPosition.push_back(convertAnglesToJointCmd(0.0f));
|
||||
l_vTargetJointPosition.push_back(convertAnglesToJointCmd(0.0f));
|
||||
l_vTargetJointPosition.push_back(convertAnglesToJointCmd(45.0f));
|
||||
l_vTargetJointPosition.push_back(convertAnglesToJointCmd(38.0f)); //mettre pince à convertAnglesToJointCmd(38.0f) (à revérifier si ça ne change pas avec un poppy différent)
|
||||
_oDxlHandler.sendTargetJointPosition(l_vTargetJointPosition);
|
||||
}
|
||||
|
||||
|
|
@ -61,13 +61,13 @@ void currentPos()
|
|||
_oDxlHandler.readCurrentJointPosition(l_vCurrentJointPosition);
|
||||
|
||||
// display current joint position
|
||||
//std::cout << "vCurrentJointPosition= (";
|
||||
//for (int l_joint=0; l_joint < l_vCurrentJointPosition.size(); l_joint++)
|
||||
// std::cout << l_vCurrentJointPosition[l_joint] << ", ";
|
||||
//std::cout << ")" << std::endl;
|
||||
std::cout << "vCurrentJointPosition= (";
|
||||
for (int l_joint=0; l_joint < l_vCurrentJointPosition.size(); l_joint++)
|
||||
std::cout << l_vCurrentJointPosition[l_joint] << ", ";
|
||||
std::cout << ")" << std::endl;
|
||||
}
|
||||
|
||||
int gripperControl()
|
||||
int closeGripper()
|
||||
{
|
||||
//read current joint 6 torque
|
||||
std::vector<uint16_t> l_vCurrentJointTorque;
|
||||
|
|
@ -135,9 +135,6 @@ int gripperControl()
|
|||
return (int)joint6Torque;
|
||||
}
|
||||
|
||||
//mettre pince à convertAnglesToJointCmd(38.0f) (à revérifier si ça ne change pas avec un poppy différent)
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "===Initialization of the Dynamixel Motor communication====" << std::endl;
|
||||
|
|
@ -154,9 +151,9 @@ int main()
|
|||
|
||||
currentPos();
|
||||
|
||||
int gripperTorque = gripperControl();
|
||||
//int gripperTorque = closeGripper();
|
||||
|
||||
goToHomePosition();
|
||||
goToPlayingPosition();
|
||||
|
||||
// wait 1s
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
|
|
|
|||
Loading…
Reference in New Issue