vendredi 15 mai 2020

Run two function simultaniously (at the same time) in C++

I am programming a robot with QT (C++). I have a function move_gripper() which closes or opens the gripper (it depends on the parameter) and a function relative_motion() which lets the end effector move downwards. What I want to do is to close the gripper ( calling the move_gripper() function ) while moving the robot downwards ( calling the relative_motion() function ) The execution time of the functions are not the same ( let's say move_gripper() lasts 2 seconds while relative_motions() lasts 3 seconds ). I want the two functions to start the execution at the same time.

Aucun commentaire:

Enregistrer un commentaire