-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ft sensor frame #68
base: ros2
Are you sure you want to change the base?
Ft sensor frame #68
Conversation
Thanks @ksotebeer for this contribution! I've had a closer look and unfortunately, we missed something when discussing this in #55. The calls to A use caseFor instance, when a user has a cordless screwdriver that's mounted somewhere to the robot's end-effector in a weird configuration, they can specify the controller's end-effector to lie exactly in the screwdriver's bit (e.g. with the z-axis aligned). This simplifies the skill to a simple pushing along the specified axis (z-axis in this case). Not transforming the force-torque sensor measurements into that end-effector reference frame introduces these offset moments, and the users need to specify some additional moment in the end-effector frame to move cleanly in contact along the bit axis. I'm giving it another thought in the next days. We should be able to use some parts of your changes. |
I may be missing something, but isn't that handled by the target wrench frame? In your example, the user would user would set the end effector frame at the center of the drill bit like you said, and then the target wrench given by the user would be interpreted in that end effector frame so that's the center of compliance. It's OK if the force torque sensor data is in a different frame because both the sensor wrench and target wrench are transformed into the robot base frame before computing the force error and passing it to the controller. I believe the offset wrenches you refer to are handled by transforming everything back to the base frame before performing the controller and IK computations. I'm not seeing the need for an extra intermediate frame. |
@ksotebeer I made a sketch to illustrate the use case. When the screwdriver's bit is in contact with the screw, the force-torque sensor does not only measure
It should be the center of compliance, but since the sensor also measures
It would be ok if both wrenches were moved into the robot base frame (which they are not). They are only displayed (as in rotated) into the robot base frame. We could change this, but users should still be able to set the compliance reference frame to something other than the end-effector frame. |
Ahhh it clicked for me now. Thank you for the detailed explanation! Much appreciated! |
@stefanscherzinger I pushed some updates to handle the offset moments and control around the center of compliance as discussed while still getting the sensor frame from the Wrench message header. It's the same math as before but the transform computation is done in the sensor callback method the first time a message is received (or in the event the sensor frame changes, which is unlikely in most applications). I was able to observe the expected behavior in your simulation. With the force controller active, I set a target wrench of 10 N in the x direction (relative to One thing I'm not quite sure on is if there's a use that I'm not seeing for the Let me know what you think and if you're still interested in this approach. If you have a different solution, I won't be offended at all if you want to close this PR. Just been thinking about it so figured I'd give it another go! |
Thanks for your continuous motivation to tackle this issue! It's much appreciated! I will be busy/absent for roughly two weeks and have a detailed look later. On a first sight, it looks plausible and we have the previous math back in. Maybe we can even make your test an integration test in this package to cover future adjustments to this mechanism. What keeps me thinking is the (maybe rare) use case of the Universal Robots driver (branch foxy) that reports the sensor measurements in the robot's base orientation (see also here). I can't check right now what the message header says, but anyhow it's difficult to make use of it. For instance, if it said
It allows users to specify where they observe (as in feel) the center of compliance. That accomplishes the same thing as with the |
0c57c06
to
4ef5610
Compare
warning to check if ft sensor frame is in kdl tree revome ft_sensor_ref_link param from example config Added computeFtSensorTransform method to handle sensor frame offset from end effector frame Add function header for computeFtSensorTransform method
ef7fecb
to
efa4443
Compare
Hello @stefanscherzinger, I have a setup as you described in this example. I would like to be able to do force control w.r.t to the tool frame as apposed to the base_link, is this something that is supported? Thanks! |
Proposed solution to #55. Interpret force torque sensor data in the frame specified by
header.frame_id
from the WrenchStamped message.