You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

174 lines
9.9 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. # Stretch Troubleshooting Guide
  2. This guide covers common issues and ways to resolve them. Please check the [Hello Robot Forum](https://forum.hello-robot.com) for additional topics not covered here.
  3. ## Xbox teleoperation is not working
  4. The provided Easy SMX wireless controller can accidentally be placed in the wrong mode. The mode is indicated by the round illuminated ring (shown as Connect below). The top 2 LEDs only should be illuminated. If a different LED pattern is shown then the button mapping expected by [stretch_xbox_controller_teleop.py](https://github.com/hello-robot/stretch_body/blob/master/tools/bin/stretch_xbox_controller_teleop.py) will be incorrect.
  5. To set the controller into the correct mode:
  6. - Hold the center button down for 5s. It will switch modes. Release.
  7. - Repeat until the top half of the ring (upper two lights) is illuminated.
  8. In addition, check that the provided USB dongle is plugged into the robot USB port in its trunk.
  9. ![](./images/xbox.png)
  10. ## Battery is not staying charged
  11. === "Stretch RE1"
  12. Please review the troubleshooting section of the [Stretch RE1 Battery Maintenance Guide](https://docs.hello-robot.com/0.2/stretch-hardware-guides/battery_maintenance_guide_re1/).
  13. === "Stretch 2"
  14. Please review the troubleshooting section of the [Stretch 2 Battery Maintenance Guide](https://docs.hello-robot.com/0.2/stretch-hardware-guides/battery_maintenance_guide_re2).
  15. ## Port Busy or RPC Transport Errors
  16. If more than one instance of Stretch Body's [Robot](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/robot.py) class is instantiated at a time, Stretch Body will report communication errors and will not always execute motion commands as expected. This is because the [Robot](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/robot.py) class manages communications with the robot hardware and it doesn't support multiple writes to the USB devices.
  17. <details>
  18. <summary>Examples of busy port or RPC errors</summary>
  19. ```{.bash .no-copy}
  20. [ERROR] [pimu]: Port /dev/hello-pimu is busy. Check if another Stretch Body process is already running
  21. [WARNING] [pimu]: Unable to open serial port for device /dev/hello-pimu
  22. [ERROR] [hello-motor-left-wheel]: Port /dev/hello-motor-left-wheel is busy. Check if another Stretch Body process is already running
  23. [WARNING] [hello-motor-left-wheel]: Unable to open serial port for device /dev/hello-motor-left-wheel
  24. [ERROR] [hello-motor-right-wheel]: Port /dev/hello-motor-right-wheel is busy. Check if another Stretch Body process is already running
  25. [WARNING] [hello-motor-right-wheel]: Unable to open serial port for device /dev/hello-motor-right-wheel
  26. [ERROR] [hello-motor-lift]: Port /dev/hello-motor-lift is busy. Check if another Stretch Body process is already running
  27. [WARNING] [hello-motor-lift]: Unable to open serial port for device /dev/hello-motor-lift
  28. [ERROR] [hello-motor-arm]: Port /dev/hello-motor-arm is busy. Check if another Stretch Body process is already running
  29. [WARNING] [hello-motor-arm]: Unable to open serial port for device /dev/hello-motor-arm
  30. [ERROR] [wacc]: Port /dev/hello-wacc is busy. Check if another Stretch Body process is already running
  31. [WARNING] [wacc]: Unable to open serial port for device /dev/hello-wacc
  32. [ERROR] [pimu]: Port /dev/hello-pimu is busy. Check if another Stretch Body process is already running
  33. [WARNING] [pimu]: Unable to open serial port for device /dev/hello-pimu
  34. [ERROR] [hello-motor-left-wheel]: Port /dev/hello-motor-left-wheel is busy. Check if another Stretch Body process is already running
  35. [WARNING] [hello-motor-left-wheel]: Unable to open serial port for device /dev/hello-motor-left-wheel
  36. [ERROR] [hello-motor-lift]: Port /dev/hello-motor-lift is busy. Check if another Stretch Body process is already running
  37. [WARNING] [hello-motor-lift]: Unable to open serial port for device /dev/hello-motor-lift
  38. [ERROR] [hello-motor-arm]: Port /dev/hello-motor-arm is busy. Check if another Stretch Body process is already running
  39. [WARNING] [hello-motor-arm]: Unable to open serial port for device /dev/hello-motor-arm
  40. ```
  41. or
  42. ```{.bash .no-copy}
  43. [WARNING] [head_tilt]: DynamixelHelloXL430 Ping failed... head_tilt
  44. DynamixelHelloXL430 Ping failed... head_tilt
  45. ```
  46. or
  47. ```{.bash .no-copy}
  48. serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
  49. ```
  50. or
  51. ```{.bash .no-copy}
  52. Traceback (most recent call last):
  53. File "/home/hello-robot/.local/bin/stretch_robot_system_check.py", line 42, in <module>
  54. r.startup()
  55. File "/home/hello-robot/repos/stretch_body/body/stretch_body/robot.py", line 167, in startup
  56. if not self.devices[k].startup(threaded=False):
  57. File "/home/hello-robot/repos/stretch_body/body/stretch_body/end_of_arm.py", line 26, in startup
  58. return DynamixelXChain.startup(self, threaded=threaded)
  59. File "/home/hello-robot/repos/stretch_body/body/stretch_body/dynamixel_X_chain.py", line 80, in startup
  60. if not self.motors[mk].startup(threaded=False):
  61. File "/home/hello-robot/repos/stretch_body/body/stretch_body/stretch_gripper.py", line 22, in startup
  62. return DynamixelHelloXL430.startup(self, threaded=threaded)
  63. File "/home/hello-robot/repos/stretch_body/body/stretch_body/dynamixel_hello_XL430.py", line 193, in startup
  64. self.motor.set_temperature_limit(self.params['temperature_limit'])
  65. File "/home/hello-robot/repos/stretch_body/body/stretch_body/dynamixel_XL430.py", line 707, in set_temperature_limit
  66. dxl_comm_result, dxl_error = self.packet_handler.write1ByteTxRx(self.port_handler, self.dxl_id, XL430_ADDR_TEMPERATURE_LIMIT, int(x))
  67. File "/home/hello-robot/.local/lib/python3.8/site-packages/dynamixel_sdk/protocol2_packet_handler.py", line 653, in write1ByteTxRx
  68. return self.writeTxRx(port, dxl_id, address, 1, data_write)
  69. File "/home/hello-robot/.local/lib/python3.8/site-packages/dynamixel_sdk/protocol2_packet_handler.py", line 643, in writeTxRx
  70. rxpacket, result, error = self.txRxPacket(port, txpacket)
  71. File "/home/hello-robot/.local/lib/python3.8/site-packages/dynamixel_sdk/protocol2_packet_handler.py", line 346, in txRxPacket
  72. rxpacket, result = self.rxPacket(port)
  73. File "/home/hello-robot/.local/lib/python3.8/site-packages/dynamixel_sdk/protocol2_packet_handler.py", line 257, in rxPacket
  74. rxpacket.extend(port.readPort(wait_length - rx_length))
  75. File "/home/hello-robot/.local/lib/python3.8/site-packages/dynamixel_sdk/port_handler.py", line 78, in readPort
  76. return self.ser.read(length)
  77. File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 509, in read
  78. raise SerialException('read failed: {}'.format(e))
  79. serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
  80. ```
  81. or
  82. ```{.bash .no-copy}
  83. Transport RX Error on RPC_ACK_SEND_BLOCK_MORE False 0 102
  84. ---- Debug Exception
  85. --------------- New RPC -------------------------
  86. Framer sent RPC_START_NEW_RPC
  87. ...
  88. ```
  89. or
  90. ```{.bash .no-copy}
  91. IOError(None): None
  92. ...
  93. ```
  94. </details>
  95. To check if an instance of [Robot](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/robot.py) is already instantiated, you may use the Unix [top](https://www.unixtutorial.org/commands/top) command to monitor active processes. You may use the Unix [pkill](https://linuxize.com/post/pkill-command-in-linux/) command to end the background instance of Robot.
  96. ```{.bash .shell-prompt}
  97. pkill -9 python
  98. ```
  99. As shipped, Stretch launches [stretch_xbox_controller_teleop.py](https://github.com/hello-robot/stretch_body/blob/master/tools/bin/stretch_xbox_controller_teleop.py) upon boot. It is necessary to turn off this automatic launch feature, otherwise, your own Robot instance will conflict with this script. Additionally, if you are logged into multiple accounts, a Robot instance may be active in another user account.
  100. To turn it off, search for 'Startup' from Ubuntu Activities. Uncheck the box for 'hello_robot_xbox_teleop'.
  101. ![](./images/xbox_off_rs.png)
  102. ## Invalid homing offset for single-turn mode Dynamixel
  103. If you see a warning similar to:
  104. ```{.no-copy}
  105. [WARNING] [head_tilt]: Dynamixel head_tilt: Servo is in single-turn mode yet has invalid homing offset of -1682.
  106. This may cause unexpected results if not set to zero (using REx_dynamixel_jog.py)
  107. Please contact Hello Robot support for more information
  108. ```
  109. You have a "single-turn" Dynamixel servo (e.g. `head_tilt` in the above warning) that has an invalid "homing offset" saved to the servo's flash memory. This can lead to the motor returning its joint position incorrectly. In order to reset the homing offset to zero, create an instance of the Dynamixel class in Stretch Body and set the homing offset to zero. For example, doing this for the `head_tilt` servo looks like:
  110. ```{.python .no-copy}
  111. hello-robot@stretch-re1-xxxx:~$ ipython3
  112. Python 3.8.10 (default, Mar 13 2023, 10:26:41)
  113. Type 'copyright', 'credits' or 'license' for more information
  114. IPython 8.7.0 -- An enhanced Interactive Python. Type '?' for help.
  115. In [1]: import stretch_body.dynamixel_hello_XL430
  116. In [2]: servo = stretch_body.dynamixel_hello_XL430.DynamixelHelloXL430(name="head_tilt", chain=None)
  117. In [3]: servo.startup()
  118. [WARNING] [head_tilt]: Dynamixel head_tilt: Servo is in single-turn mode yet has invalid homing offset of -1682.
  119. This may cause unexpected results if not set to zero (using REx_dynamixel_jog.py)
  120. Please contact Hello Robot support for more information
  121. Out[3]: True
  122. In [4]: servo.disable_torque()
  123. In [5]: servo.motor.set_homing_offset(0)
  124. In [6]: servo.enable_torque()
  125. In [7]: servo.stop()
  126. In [8]:
  127. Do you really want to exit ([y]/n)?
  128. ```
  129. ------
  130. <div align="center"> All materials are Copyright 2022 by Hello Robot Inc. Hello Robot and Stretch are registered trademarks.</div>