Home› Troubleshooting
Discussion
Back to discussions page
aaronskidmore
Unconfirmed Posts: 5 Apprentice
UR3 - Is there a way via URscript to get joint currents shown on the LOG tab of Polyscope? |
18 views
|
Answered | |
/ Most recent by matthewd92 |
3 comments |

I have been using get_joint_torques() to test how much force is being applied during bottle cap tightening on wrist3 but found it is inconsistent, and thought I could try testing amps instead, or maybe even test joint speed and catch the speed slowing down to indicate cap is tight. I dont want to invest in external torque sensor. If this cant be done I will probably look at mechanical clutch.
Best Answer
-
matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,261 Handy
There is not a URScript function but you can create one. The joint currents in mA are being broadcast on the modbus server. You can use the read_port_register(port) function to read these registers so a simple function like this could be used. YOu can find out more about the data on the modbus server heredef get_joint_currents(): local port = 290 local joint = 0 local jointCurrents = [0,0,0,0,0,0] while (joint < 6): jointCurrents[joint] = read_port_register(port+joint) joint = joint + 1 end return jointCurrents end
Then you can either access that directly or have a background thread placing that value into a global variable. I have tested the above by placing it into a thread and it works without issues
Comments
-
aaronskidmore Unconfirmed Posts: 5 Apprentice
Good one, thanks for your help1 · TwitterFacebook -
matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,261 Handy
You’re welcome0 · TwitterFacebook