PickNikRobotics / ros2_robotiq_gripper

BSD 3-Clause "New" or "Revised" License
50 stars 40 forks source link

Better Error Message when Gripper is not Connected #63

Open Abishalini opened 3 weeks ago

Abishalini commented 3 weeks ago

During bringup, the RobotiqGripperHardwareInterface throws the following error if the gripper is not connected. We need to get a better error message about the failure to connect to the gripper.

drivers-1       | [ros2_control_node-4] [INFO] [1723749978.912978825] [resource_manager]: 'configure' hardware 'RobotiqGripperHardwareInterface' 
drivers-1       | [ros2_control_node-4] [ERROR] [1723749978.913051693] [RobotiqGripperHardwareInterface]: Cannot configure the Robotiq gripper: IO Exception (2): No such file or directory, file /home/demo/user_ws/src/moveit_studio_ur_ws/src/external_dependencies/serial/src/impl/unix.cc, line 151.
Mokchanic commented 2 weeks ago

2024.08.26 Hi did you connect the gripper to the control box or labtop??? Which one does the gripper use, 2f-140.2f-85? I use a 2f-140 gripper.

First, find robotiq_2f_140_macro.urdf.xacro. Second, find "com_port:=/dev/ttyUSB0">" It'll be in the 15th row.

If you connected with labtop, use ttyUSB. But if you're connected to the control box, try using ttyS.

I wrote the following while I was connected to the control box. It was connected.

Thank you.

2024.08.27 It was confirmed that ttyS is not working. Use ttyUSB.

Abishalini commented 2 weeks ago

Hi @Mokchanic

The 2f-85 gripper was connected through USB to a computer. Before I figured out to set the com_portfield in the xacro, I was stumped by the error message mentioned above. There should be a better message to indicate gripper connection is not detected.

Mokchanic commented 2 weeks ago

Hi @Abishalini Does the computer not detect the port connection or is it designated ttyUSB0? Check out udevadm.

sudo udevadm monitor

Find your ttyUSB number while connecting or removing the port. image

By the way, are you using 'ros humble'? Did you run the .repos file?