What is the correct way to read applied external force on a tool?

Typically: "How do I... ", "How can I... " questions
Post Reply
CroCr
Posts: 75
Joined: 29 Dec 2022, 01:47

What is the correct way to read applied external force on a tool?

Post by CroCr »

I have seen three ways to get force measurements applied on a tool attached to a joint.
  • Force/Torque sensors
  • Contact info between two objects
  • sim.getJointForce.
The first one requires compensating for the weight of the tool. For kinematic-based control which usually a velocity-based control scheme is a problematic (i.e. unless you have a suggestion to remove it).

The second one is not realistic as force measurements are obtained with respect to world frame (i.e. a fixed frame). For this purpose, I need to iterate over a list of objects in the scene to determine which object collided with the tool.

For the last option, in the documentation it says, "force or the torque applied to the joint along/about its z-axis, or None/nil if no value is available yet." Would I get two measurements if I push and slide the tool against a flat surface?


This is my case. In kuka youBot, I'm attaching a tool 'capsule' to joint 4 (the last joint). I'm control the robot using a velocity-based control. I need force measurements when the tool comes in contact with an object (i.e. assumed flat). In this scenario, which option would you recommend?

coppelia
Site Admin
Posts: 10376
Joined: 14 Dec 2012, 00:25

Re: What is the correct way to read applied external force on a tool?

Post by coppelia »

Hello,

go with sim.getContactInfo. You'll have to correctly parse and filter out forces: if you need to react to those forces, do it in dynamics callback function, since that will be called more frequently than a regular callback function.

Cheers

Post Reply