Kinovarobotics / ros2_kortex

ROS2 driver for the Gen3 Kinova robot arm
Other
51 stars 49 forks source link

Add Tool Wrench Measurements to ROS2 Hardware Interface #186

Closed eholum closed 7 months ago

eholum commented 1 year ago

We would like to get started using force-feedback for control of the gen3 arms, but require access to tool force/torque measurements from the Kortex API.

It looks like the API provides this information in the tool_external_wrench_* objects in the feedback message. However, just testing adding those values to the drivers read() function does not seem to update the measured values.

  auto fx = feedback_.base().tool_external_wrench_force_x();
  auto fy = feedback_.base().tool_external_wrench_force_y();
  auto fz = feedback_.base().tool_external_wrench_force_z();
  auto tx = feedback_.base().tool_external_wrench_torque_x();
  auto ty = feedback_.base().tool_external_wrench_torque_y();
  auto tz = feedback_.base().tool_external_wrench_torque_z();

Given the conversation in https://github.com/Kinovarobotics/kortex/issues/52, it sounds like the wrench measurements are not available in low level control mode. However, even when switching the high level mode (and using the built in twist controller) we do not seem to get any information out of the API.

I have two questions,

1) Is it possible to expose these values through the Kortex API? 2) Are there any other built in functions we could use to compute the wrench or should we look into doing it on the fly with the KDL?

smoya23 commented 7 months ago

Hi @eholum,

  1. You should be able to get the tool wrench values through the Kortex API high level control. You should however precede your getter calls by a call to the RefreshFeedBack() function of Kortex BaseCyclic client, as done in our example here. Could you share a snippet of your code so that I can analyse if there is an error?

  2. A part from the feedback of each actuator, there is nothing else.

Best, Santiago

eholum commented 7 months ago

Thanks for the response, @smoya23! We ended up using an external, wrist-mounted FTS and kind of put the internal calculation on hold. I think we can drop this.