gbartyzel / ros2_net_ft_driver

Driver for Net F/T sensors with RDT communication interface
Apache License 2.0
13 stars 7 forks source link

High Latency #3

Closed jbeck28 closed 1 year ago

jbeck28 commented 2 years ago

Hello,

I'm very happy to see this driver appear for ROS2. However, upon getting it working with an ATI Gamma Net FT sensor, I find that there is a significant amount of latency between my touching the sensor and a corresponding change in forces appearing on the published topic. I'm wondering if you've any idea what may be the cause? I don't see this issue with the ROS1 driver. My only guess is possibly QoS settings?

Another thing, I've noticed the driver automatically biases the sensor on startup. Is there any way to disable that behavior?

Thanks, Josh

gbartyzel commented 2 years ago

Hello @jbeck28

I'm delighted that you found this driver helpful for your project and you were able to run this with ATI Net FT, because in my lab I have only access to ATI AXIA and OnRobot HEX. Im not sure if this is caused by the QoS, you can check here https://github.com/ros-controls/ros2_controllers/tree/master/force_torque_sensor_broadcaster what QoS configuration is used. Moreover, in the ros2_control documentation ther suggest to use rt-preempt kernle for best performance, maybe this can solve the problem. Nevertheless, I'll try to investigate this problem, but feel free to create PR ;)

And about biasing. You're right, sensor is biased on the activation. It was work around for lack of such functionality in the ft sensor broadcaster. If this is a problem, I can make this an optional functionality.

Greg.

jbeck28 commented 2 years ago

Hi Greg,

Thanks for the information! Sensor biasing being optional would be an awesome feature!

Just wanted to provide the findings of what little testing I've done in the last 2 days. I ran the driver with the preempt_rt kernel patch and still experienced the same latency. However, just for fun I tried changing update_rate in net_ft_broadcaster.yaml from 500 to 2000, and I found this eliminated the latency. Similarly, since I'm using this with an ABB robot, I tried changing the update rate to 250 (this is the max control frequency for ABB robots) and the latency got worse! Very interesting

Josh

gbartyzel commented 2 years ago

@jbeck28 maybe try playing with rdt_sampling_rate. Check if this also changes the sensor's ADC sampling rate (go to the website).

gbartyzel commented 1 year ago

@jbeck28 Optional biasing is added! ;)