When using a robot with the dex wrist, it is often impossible to complete calibration of the arm/wrist because the wrist is not detected.
This seems to be an intermittent issue. Sometimes rebooting the whole robot fixes the issue, and sometimes it doesn’t. Sometimes parts of the wrist are functional while others are not, indicating that communication with one or more of the dynamixel motors is not working. It seems like it’s occasionally possible to see that there is an issue by red lights appearing on various parts of the wrist, but in some cases there is nothing at all to indicate an issue.
It’s easiest to observe this with the xbox teleop:
hello-robot@stretch-re2-2033:~$ stretch_xbox_controller_teleop.py
For use with S T R E T C H (R) RESEARCH EDITION from Hello Robot Inc.
---------------------------------------------------------------------
Waiting for all the hello* devices ...
Found all hello* devices.
[WARNING] [stretch_gripper]: DynamixelHelloXL430 Ping failed... stretch_gripper
DynamixelHelloXL430 Ping failed... stretch_gripper
...
begin calibrating the robot
--------- Homing Head ----
--------- Homing Lift ----
Homing Lift...
Hardstop detected at motor position (rad) 115.00305938720703
Marking Lift position to 1.097908 (m)
Marking Lift position to 0.000000 (m)
Lift homing successful
--------- Homing Arm ----
Homing Arm...
Hardstop detected at motor position (rad) -0.03525562584400177
Marking Arm position to 0.000000 (m)
Arm homing successful
[WARNING] [stretch_gripper]: Not able to home stretch_gripper. Hardware not present
[WARNING] [wrist_yaw]: Not able to home wrist_yaw. Hardware not present
finished calibrating the robot
As far as I can tell, the wrist motors are on ttyUSB2, with the head motors on ttyUSB0. I’ve confirmed this previously using the dynamixel wizard software. When I encounter the communication error that software can’t communicate with the motors either.
It seems that ttyUSB2 itself exists in the system. I can see it in dmesg and various other usb listing commands:
hello-robot@stretch-re2-2033:~$ dmesg | ag ttyUSB2
[ 8.790834] usb 1-4.2.3.2: FTDI USB Serial Device converter now attached to ttyUSB2
hello-robot@stretch-re2-2033:~$ ls -l /sys/bus/usb-serial/devices | ag ttyUSB2
lrwxrwxrwx 1 root root 0 Mar 17 07:39 ttyUSB2 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.2/1-4.2.3/1-4.2.3.2/1-4.2.3.2:1.0/ttyUSB2
hello-robot@stretch-re2-2033:~$ ls -l /dev/serial/by-id | ag ttyUSB2
lrwxrwxrwx 1 root root 13 Mar 17 07:39 usb-FTDI_FT232R_USB_UART_AB0NE2FU-if00-port0 -> ../../ttyUSB2
@mstaniaszek thanks for reporting this issue. As @lamsey mentioned, the first step for this issue would be to make sure the baud rates configuration of the Dynamixels matches the defined baud rate in Stretch Params.
If the ping to dynamixels is failing/lost or you can see a blinking red led (overcurrent error), you can try to reboot all the dynamixels devices in the USB port using the below cmd and you might not require to reboot the robot every time.
Output is going to be something similar with the Baudrates mentioned:
For use with S T R E T C H (R) RESEARCH EDITION from Hello Robot Inc.
---------------------------------------------------------------------
Scanning bus /dev/hello-dynamixel-wrist
Checking ID 0
.
.
Checking ID 13
[Dynamixel ID:013] ping Succeeded. Dynamixel model number : 1080. Baud 115200
Checking ID 14
[Dynamixel ID:014] ping Succeeded. Dynamixel model number : 1060. Baud 115200
.
.
Found 2 servos on bus /dev/hello-dynamixel-wrist
Then you can use the below command to make sure the baud rates found in the above step match the defined baud rates in the Stretch Params using the below cmd.
stretch_params.py | grep baud
If the Baudrates found in the Stretch params don’t match, you can correct them by modifying the dictionary values in stretch_confguration_params.yaml file found in the path ~/stretch_user/stretch-reX-XXX/. You can find more details on Stretch Parameter management tutorial.
Next, debug step would be to investigate the Dexwrist cabling from the Wacc board to dynamixels for any damages or pinch points. You can ping us at support@hello-robot.com, and we can share a hardware guide detailing how to investigate the dex wrist cabling to the Wacc board.
The symptoms you describe are consistent with a bad cable connection to the Stretch gripper. This is also the most likely cable to have an issue, as it is possible for this cable to catch on something while the robot moves through the world. It could be cause by the connection coming loose at either end, or by damage to the cable itself.
You can check this by running the following command:
For a fully operational Dex Wrist, the output should include the following lines:
Checking ID 13
[Dynamixel ID:013] ping Succeeded. Dynamixel model number : 1080. Baud 115200
Checking ID 14
[Dynamixel ID:014] ping Succeeded. Dynamixel model number : 1060. Baud 115200
Checking ID 15
[Dynamixel ID:015] ping Succeeded. Dynamixel model number : 1120. Baud 115200
Checking ID 16
[Dynamixel ID:016] ping Succeeded. Dynamixel model number : 1020. Baud 115200
ID 14 is the connection to the gripper - If the [Dynamixel ID:014] line does not exist, but the others do, then that cable or servo is indeed the culprit.
To start, examine the cable connection at the gripper itself. Make sure the cable is fully inserted into the robot gripper. Follow it back to the wrist roll joint, looking for any damage to the cable or insulation along the way. Remove the plastic back plate behind the wrist roll joint (held in place with two Phillips-head screws) and check the Dynamixel connectors underneath here too. The connection is tight - you may need to press on it with something non-conductive to make sure it is completely inserted into the Dynamixel.
If no loose connection was found, then the cable may be damaged. Each robot ships with a replacement cable in a bag labeled “Dex Wrist Spare Parts” - you can replace the cable with this, then run the dynamixel id script again and see if the connection is restored.
Let me know how this goes for you, or if you would like further instructions on changing out the cable.