roboticslab-uc3m / kinematics-dynamics

Kinematics and dynamics solvers and controllers.
https://robots.uc3m.es/kinematics-dynamics/
GNU Lesser General Public License v2.1
19 stars 12 forks source link

Manual TCP teaching/adjustment via FT sensor feedback #191

Closed PeterBowman closed 2 years ago

PeterBowman commented 3 years ago

Collaborative manipulators usually feature a magic button near the TCP which, if pressed, enables a human operator to manually translate and/or reorient the arm. This is performed in gravity compensation mode so that the arm doesn't fall by itself, yet the operator doesn't need to exert full force to rotate the joints.

TEO is able to operate in gravity compensation mode, but it's rather hard in the strict sense - joint friction is quite high. I hereby propose to implement it using FT sensor feedback: once active and whenever an external force is exerted on the TCP by a human operator, sensor data is used to compute IK in the direction of said force and thus perform motion through position commands.

PeterBowman commented 2 years ago

For the record, this has been blocked for a longer while on https://github.com/roboticslab-uc3m/teo-hardware-issues/issues/49, we are currently expecting some repairs regarding the connector of the FT sensors.

PeterBowman commented 2 years ago

Today, I learned that the Jr3 assumes itz XYZ axes are levorotary, i.e. one of them must be reversed to follow the usual, dextrorotary system. In order to not break compatibility, I added a new --dextrorotary configuration parameter which will adjust the sign of the X values (linear force and torque) accordingly: https://github.com/roboticslab-uc3m/yarp-devices/commit/6cb1f8e518dce4ab451bd2e3baecfaafcc4eef27.

PeterBowman commented 2 years ago

With regard to the wrist flange coordinates (no tool, i.e. R_0_6, see diagram), the coordinate system's rotation of the (dextrorotary) sensor axes (i.e. R_6_sensor) is obtained with the following RPY transformation: --sensorFrameRPY (90 0 -90). Sequence (old axes): 1. R_x (roll), 2. R_y (pitch), 3. R_z (yaw).

No transformation is needed in case the LacqueyFetch TCP is used, i.e. R_0_f.

PeterBowman commented 2 years ago

Commands:

PeterBowman commented 2 years ago

I was told this application might be of interest for @elisabeth-ms and @JuanHernandez1993:

IMAGE ALT TEXT HERE

More videos: https://drive.google.com/drive/folders/1HbvVDbmZ3rE-VOZoXUkqnoRfV2xmF7ha.

PeterBowman commented 2 years ago

Merged at https://github.com/roboticslab-uc3m/kinematics-dynamics/commit/bb15c49e27add4bd1f37f0139c916769db52c18f. I didn't put too much effort into testing tool weight compensation, but it seems to do the trick (it's actually hard to pick the right values). Also, I noticed a tiny residual displacement even though no force were being applied on the TCP. This is due to having CSV mode disabled (it's easy to overlook this step) and performing velocity instead of position control. This also means that velocity control is usually good enough.

See application and context files for notes on how to run this demo:

Maybe ftCompensation is not the best name, but at least it reflects the intention of creating an alternative for classical gravity compensation.