ros-industrial / robotiq

Robotiq packages (http://wiki.ros.org/robotiq)
BSD 2-Clause "Simplified" License
228 stars 378 forks source link

How to speed up the 'gripper.sendCommand()' process? #201

Closed KentoYamamotoNU closed 2 years ago

KentoYamamotoNU commented 2 years ago

I run the 'robotiq_2f_gripper_control/nodes/Robotiq2FGripperRtuNode.py', and found that the frequency of the published topic 'Robotiq2FGripper_robot_input' is about 2.193hz. I would like to speed up the frame rate to at least 60hz. I think 'gripper.sendCommand()' is taking a long time to process. Anyone knows how to speed up the 'gripper.sendCommand()' process?

The following is the results of the commond 'rostopic hz /Robotiq2FGripper_robot_input'.

average rate: 2.193 min: 0.456s max: 0.456s std dev: 0.00000s window: 2 average rate: 2.193 min: 0.456s max: 0.456s std dev: 0.00005s window: 4 average rate: 2.194 min: 0.455s max: 0.456s std dev: 0.00043s window: 6 average rate: 2.194 min: 0.455s max: 0.456s std dev: 0.00036s window: 9 average rate: 2.194 min: 0.455s max: 0.456s std dev: 0.00040s window: 11 average rate: 2.194 min: 0.455s max: 0.456s std dev: 0.00038s window: 13 average rate: 2.193 min: 0.455s max: 0.457s std dev: 0.00044s window: 15 average rate: 2.194 min: 0.455s max: 0.457s std dev: 0.00047s window: 17 ^Caverage rate: 2.194 min: 0.455s max: 0.457s std dev: 0.00046s window: 18

KentoYamamotoNU commented 2 years ago

The processing of 'self.client.write_registers(0x03E8, message, unit=0x0009)' in '/robotiq_modbus_rtu/src/robotiq_modbus_rtu/comModbusRtu.py' takes about 0.4s. Is there any way to speed up this process?

KentoYamamotoNU commented 2 years ago

I found solution. Thank you.

gavanderhoorn commented 2 years ago

You might want to explain what you did/changed, to help your fellow Robotiq users.