ICartesianControl - using setTaskVelocities(x,o) #208
-
Hi all, I'm trying to define Task Velocities to the iCub arms using the Cartesian interface (setTaskVelocities(.) ) I found some documentation here. However, it's not clear for me how to fine-tune the task velocities along with the trajectory time to achieve a continuous motion of the arm. (e.g, a straight line with a constant velocity). The only information I found was:
Maybe @pattacini is the best person to help me on this. 😃 /cc @gsaponaro |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hi @vicentepedro |
Beta Was this translation helpful? Give feedback.
-
Hi @vicentepedro, I've prepared this Gist to explore the use of the When the user calls such a service, the Cartesian controller integrates internally the commanded velocity, ending up with a moving target (i.e. the red ball in the simulations below) whose position and orientation are fed back into the normal tracking pipeline. Therefore, as for a usual position tracking, the resulting behavior is essentially regulated by the ratio between the magnitude of the task velocity In this context, if the target moves slower than how much the robot can react, we'll have intermittent movements where the robot will decelerate in the proximity of the target to then accelerate soon afterward when the relative distance starts over increasing. Gist ExampleFor the same magnitude of the task velocity equal to Results with too reactive controller$ ./test-settaskvelocities --V 0.07 --Ttraj 0.1 The outcome shown below is a sort of stick-slip movement of the robot, meaning that Results with a balanced controller$ ./test-settaskvelocities --V 0.07 --Ttraj 0.4 The movement visible below is way smoother instead. The hand is lagging a bit behind the target; however, we are not interested in this particular distance, but rather in the fact that the hand is actually moving roughly at Clearly, with increasing values of Advantage of Cartesian controller over traditional methodsBy inverting the well-known differential kinematic map relating the joint velocities to the task velocities through the Jacobian one may think to address the problem more easily. Let's try it out: $ ./test-settaskvelocities --V 0.07 --method pseudo-inverse You'll get the poor movements reported below. The main reason is that, unfortunately, this approach must be extended in order to take the joint bounds and the singular configurations into account. Further, the robot moves quite slowly also because the simulator, in this case, does not implement a perfect integration of the joint velocities, meaning that the low-level PID controllers do not guarantee zero-dynamics. Concluding remarksSimilarly to the case of position task velocities, the Cartesian controller also allows tracking a target frame that rotates in the workspace with a specified angular velocity. In this respect, I'd recommend you update your local copy of Hope this answer clarifies your doubts. |
Beta Was this translation helpful? Give feedback.
-
Thanks @pattacini! |
Beta Was this translation helpful? Give feedback.
-
Very nice. This function was also puzzling me and I was tempted to play with it, but didn't touch it in the end. Now I will. Many thanks. |
Beta Was this translation helpful? Give feedback.
-
I'm happy it helped out 😃 |
Beta Was this translation helpful? Give feedback.
Hi @vicentepedro,
I've prepared this Gist to explore the use of the
yarp::dev::ICartesianControl::setTaskVelocities()
method.When the user calls such a service, the Cartesian controller integrates internally the commanded velocity, ending up with a moving target (i.e. the red ball in the simulations below) whose position and orientation are fed back into the normal tracking pipeline.
Therefore, as for a usual position tracking, the resulting behavior is essentially regulated by the ratio between the magnitude of the task velocity
V
you aim to achieve (i.e. how fast the target moves) and the point-to-point trajectory timeTtraj
, which in turn accounts for the reactivity of the Cartesian c…