Osaka-University-Harada-Laboratory / onrobot

OnRobot packages (https://wiki.ros.org/onrobot)
https://wiki.ros.org/onrobot
MIT License
37 stars 23 forks source link

AttributeError: 'ModbusIOException' object has no attribute 'registers' #5

Closed Robertomendivil97 closed 1 year ago

Robertomendivil97 commented 1 year ago

Hi, the problem is on my TCP Connection

Error: AttributeError: 'ModbusIOException' object has no attribute 'registers' After trying to run either roslaunch

Python 3.8,10 pymodbus==2.5.3

The computer box is working because I can send data through the web client, so IP are configured correctly Do you know the solution?

Robertomendivil97 commented 1 year ago

Because I am using the Dual quicker changer, the register is 66 (and 67 for second gripper) instead of 65 Changing that it works image

Awesome job with this repo!

takuya-ki commented 1 year ago

@Robertomendivil97 Thank you for the investigation! I updated the main branch with launch files and nodes that use a rosparam named changer_addr. If you are interested, please try to use it with your dual quick changer. Please let me know if you have any other suggestions!

Robertomendivil97 commented 1 year ago

Thank you very much for the really quick update! The parameters works and I can chose which tool. Some of the suggestions are:

Excellent job with this ROS package

takuya-ki commented 1 year ago

@Robertomendivil97 Thank you for the suggestion! The problem is that I do not have the dual quick changer now. If possible, could you please update and test it so and then pull request?

Robertomendivil97 commented 1 year ago

Of course This week will continue with the testing and could pull request

BrettRD commented 1 year ago

There's a type error here that could be more informative (I'm working on a ROS2 port for the RG6 on a UR5e and I'm getting a lot of timeouts that trigger this error)

The developer of pymodbus decided that read_holding_registers should return the exception instead of throwing it https://github.com/pymodbus-dev/pymodbus/issues/1464 So you can't do a try catch, you have to test the return type https://github.com/DavidYaonanZhu/robotiq/commit/fbcd1052314574da0e7ed32548db510d84edc42d