-
Notifications
You must be signed in to change notification settings - Fork 24
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
AttributeError: 'NoneType' object has no attribute 'read_holding_registers' when reading robotiq 2f-85 gripper status #6
Comments
Which version of robotiq are you using? |
@lianghongzhuo |
@gabriellapizzuto hi |
Hi, I had been getting a similar error, though not exactly the same, and could solve it eventually. Here is the error I was getting:
So I changed to Windows and tried with the Robotiq UI (Support section of Robotiq website). According to the UI manual, if the UI is not connecting to the gripper it can be because "slave ID is not 9". Luckily, the UI shows you the current slave_ID of your gripper and allows you to change the slave_ID of the gripper (if you try this, remember restarting the gripper so the changes apply). Indeed, our gripper had a different value for slave_ID. Hope this helps! |
sorry we didn't solve that problem either
…---- Replied Message ----
| From | ***@***.***> |
| Date | 03/07/2023 22:53 |
| To | ***@***.***> |
| Cc | ***@***.***>***@***.***> |
| Subject | Re: [TAMS-Group/robotiq] AttributeError: 'NoneType' object has no attribute 'read_holding_registers' when reading robotiq 2f-85 gripper status (Issue #6) |
Hi, I had been getting a similar error, though not exactly the same, and could solve it eventually.
We are using a 2f-85 gripper, with ros-noeting and python 3.9 in Ubuntu 20.
Here is the error I was getting:
Could not read registers on gripper. Please check connection and chosen device.
Traceback (most recent call last):
File "/home/ws/catkin_tams_robotiq/src/robotiq_2f_gripper_control/nodes/Robotiq2FGripperRtuNode.py", line 95, in
mainLoop(sys.argv[1])
File "/home/ws/catkin_tams_robotiq/src/robotiq_2f_gripper_control/nodes/Robotiq2FGripperRtuNode.py", line 80, in mainLoop
status = gripper.getStatus()
File "/home/ws/catkin_tams_robotiq/src/robotiq_2f_gripper_control/src/robotiq_2f_gripper_control/baseRobotiq2FGripper.py", line 108, in getStatus
status = self.client.getStatus(6)
File "/home/ws/catkin_tams_robotiq/src/robotiq_modbus_rtu/src/robotiq_modbus_rtu/comModbusRtu.py", line 125, in getStatus
output.append((response.getRegister(i) & 0xFF00) >> 8)
AttributeError: 'NoneType' object has no attribute 'getRegister'
So I changed to Windows and tried with the Robotiq UI (Support section of Robotiq website). According to the UI manual, if the UI is not connecting to the gripper it can be because "slave ID is not 9". Luckily, the UI shows you the current slave_ID of your gripper and allows you to change the slave_ID of the gripper (if you try this, remember restarting the gripper so the changes apply). Indeed, our gripper had a different value for slave_ID.
After saving slave_ID as 9, I went back to Ubuntu and could control the gripper straight away.
Hope this helps!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Maybe you could try @crislampon 's solution? And report if it works here. |
Closed due to no response. Feel free to reopen if you still have a problem. |
Hi, I was wondering if you could help us with this issue. I would like to read the state of our robotiq 2f-85 gripper using the following (please feel free to advice alternative way if this is a known recurring bug):
status = self.RobotiqGripper.client.getStatus(6)
However, I am getting the following error: in ... ..ws/src/robotiq/robotiq_modbus_rtu/src/robotiq_modbus_rtu/comModbusRtu.py", line 100, in getStatus
response = self.client.read_holding_registers(0x07D0, numRegs, unit=0x0009)
AttributeError: 'NoneType' object has no attribute 'read_holding_registers'
I am working with ros-noetic using robostack conda environment python 3.8.
Would you have any suggestions on how to fix this please? Thanks in advance :)
The text was updated successfully, but these errors were encountered: