roboticslab-uc3m / yarp-devices

A place for YARP devices
https://robots.uc3m.es/yarp-devices/
9 stars 7 forks source link

Unable to switch to velocity mode #250

Closed rsantos88 closed 4 years ago

rsantos88 commented 4 years ago

When performing experiments with the soft neck, using the new drives (iPOS 3604Mx) and PCB, I had encountered some issues: When using position mode it works perfectly, and performs the expected trajectory. However, when I tried to change the drivers mode to velocity mode error messages appeared. I tried to change a single driver (driver 0) by rpc:

>>set icmd cmod 0 vel
Response: [fail]

and this is the output obtained by the launchCanBus: launchCanBus.txt Any suggestions on what could be the problem?

PeterBowman commented 4 years ago

This is the actual symptom:

[warning] TechnosoftIpos.cpp:440 handleEmcy(): A wrong mode is set in object 6060h , modes of operation (canId 1)

I suspect your iPOS drives are not properly configured to operate in velocity mode. Have you ever successfully switched to it before? TEO's drive config resembles the following (EasySetup > Driver Setup > Control mode/Advanced):

60812078-f9cf8480-a190-11e9-8f44-be5af76bf6c2

The "Close position, speed and current loop" option is probably relevant. Please verify it is checked in your iPOS config.

rsantos88 commented 4 years ago

It seems that the problem is going to be that ... I'll tell you the results soon. Thank you!

npuente commented 4 years ago

As PeterBowman suggested, the problem was related to the drivers configuration. The selected control mode was position mode however, only the current and position loops were enabled. By selecting also the speed loop, the problem was partially solved, as the driver needed more readjusting. When using launchCanbus, the drivers succeeded in controlling the motors position, but producing an abnormally loud noise. I suspect that the problem came from the speed controller configuration. as it was configured after selecting velocity control for the driver. The driver was once again configured, this time by selecting first position control (with the 3 loops, position, current and speed), and then the parameters for the torque. speed, and position controllers were tuned. in this same order. This measures solved the problem, and the neck works perfectly fine in both position mode and velocity mode. Thank you for all your help !

rsantos88 commented 4 years ago

i close this issue. Thanks!