Firmware Updater IndexErrror

Hi, I have following issue when running the REx_firmware_updater.py script:

################################ HELLO-MOTOR-ARM |   CHECK #1 IF DEVICE RETURNS TO BUS... #################################
Checking that device hello-motor-arm returned to bus 
It may take several minutes to appear on the USB bus.
Waiting for device hello-motor-arm to return to bus.
Device hello-motor-arm returned to bus after 0.207314 seconds.
##################################### HELLO-MOTOR-ARM |   CHECK IF ESTABLISH COMMS... #####################################
Traceback (most recent call last):
  File "/home/hello-robot/.local/bin/REx_firmware_updater.py", line 133, in <module>
    success = u.run()
  File "/home/hello-robot/.local/lib/python3.10/site-packages/stretch_factory/firmware_updater.py", line 285, in run
    self.state['completed'][d]['establish_comms'] = self.verify_establish_comms(d)
  File "/home/hello-robot/.local/lib/python3.10/site-packages/stretch_factory/firmware_updater.py", line 555, in verify_establish_comms
    if not dd.startup():
  File "/home/hello-robot/.local/lib/python3.10/site-packages/stretch_body/stepper.py", line 1411, in startup
    StepperBase.startup(self, threaded=threaded)
  File "/home/hello-robot/.local/lib/python3.10/site-packages/stretch_body/stepper.py", line 176, in startup
    self.transport.do_pull_rpc_sync(payload, self.rpc_board_info_reply)
  File "/home/hello-robot/.local/lib/python3.10/site-packages/stretch_body/transport.py", line 926, in do_pull_rpc_sync
    self.sync_handler.do_rpc(push=False, payload=payload, reply_callback=reply_callback, exiting=exiting)
  File "/home/hello-robot/.local/lib/python3.10/site-packages/stretch_body/transport.py", line 179, in do_rpc
    self.do_transaction_v0(payload, reply_callback)
  File "/home/hello-robot/.local/lib/python3.10/site-packages/stretch_body/transport.py", line 353, in do_transaction_v0
    'Transport RX Error on RPC_V0_ACK_NEW_RPC {0} {1} {2}'.format(crc, nr, decoded_data[0]))
IndexError: array index out of range

Thanks for your help!

Hi @Pascalsutter, welcome to the forum! Would you run the firmware updater a few more times and see if you’re able to reliably reproduce that exception?

Additionally, would you tell me the serial number of your robot?

Hi @bshah
Thanks for reaching out - yes I can reproduce it reliably.
Serial number is RE2-2029.

Thanks, would you run stretch_system_check.py -v and post the output here? Or if you’re using older software, the CLI might be called stretch_robot_system_check.py.

Here is the log:

hello-robot@stretch-re2-2029:~$ stretch_system_check.py -v
For use with S T R E T C H (R) from Hello Robot Inc.
---------------------------------------------------------------------

/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.4
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
Model = Stretch 2
Tool = Standard Gripper
Batch = nina
Serial Number = stretch-re2-2029

[ERROR] [hello-motor-arm]: SerialException(2): could not open port /dev/hello-motor-arm: [Errno 2] No such file or directory: '/dev/hello-motor-arm'
[WARNING] [hello-motor-arm]: Unable to open serial port for device /dev/hello-motor-arm
[WARNING] [robot]: Not able to use asyncio for transport communications. Defaulting to sync.

@bshah It seems that there are issues with the hello-motor-arm. Is there a way to address this? I do not really rely on that motor, but the whole stack is affected by it (startup errors when launching different scripts, etc)

Hey @Pascalsutter, we suspect that there’s a serial number mismatch. Would you run the following debug steps?

  1. Start by power cycling the robot.
  2. Run REx_firmware_flash.py --map and post the output here.
  3. Run REx_discover_hello_devices.py --list and post the output here.
  4. Run cat /etc/udev/rules.d/95-hello-arduino.rules and post the output here.

@bshah thanks! here are the outputs:

Run REx_firmware_flash.py --map and post the output here.

For use with S T R E T C H (R) from Hello Robot Inc.
---------------------------------------------------------------------

ls: cannot access '/dev/hello-motor-arm': No such file or directory
------------------------------------------
hello-motor-arm | None
hello-motor-right-wheel | ttyACM4
hello-motor-left-wheel | ttyACM3
hello-pimu | ttyACM1
hello-wacc | ttyACM6
hello-motor-lift | ttyACM0
------------------------------------------
ttyACM0 | hello-motor-lift
ttyACM1 | hello-pimu
ttyACM2 | None
ttyACM3 | hello-motor-left-wheel
ttyACM4 | hello-motor-right-wheel
ttyACM5 | None
ttyACM6 | hello-wacc
------------------------------------------

Run REx_discover_hello_devices.py --list and post the output here.

For use with S T R E T C H (R) from Hello Robot Inc.
---------------------------------------------------------------------

{'/dev/ttyACM0': {'model': 'Hello_Stepper',
                  'model_id': '804d',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/tty/ttyACM0',
                  'serial': '76CA0CF250555733352E3120FF0B193E',
                  'vendor': 'Arduino_LLC',
                  'vendor_id': '2341'},
 '/dev/ttyACM1': {'model': 'Hello_Pimu',
                  'model_id': '804d',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2/1-2.2:1.0/tty/ttyACM1',
                  'serial': '210C831850555733352E3120FF091A13',
                  'vendor': 'Arduino_LLC',
                  'vendor_id': '2341'},
 '/dev/ttyACM2': {'model': 'Arduino_Nano_Every',
                  'model_id': '0058',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.1/1-2.1.1/1-2.1.1:1.0/tty/ttyACM2',
                  'serial': 'BFD1D27051544B5931202020FF12121C',
                  'vendor': 'Arduino_LLC',
                  'vendor_id': '2341'},
 '/dev/ttyACM3': {'model': 'Hello_Stepper',
                  'model_id': '804d',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.1/1-4.1:1.0/tty/ttyACM3',
                  'serial': 'B9251BFD50555733352E3120FF0B0A3D',
                  'vendor': 'Arduino_LLC',
                  'vendor_id': '2341'},
 '/dev/ttyACM4': {'model': 'Hello_Stepper',
                  'model_id': '804d',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.4/1-4.4:1.0/tty/ttyACM4',
                  'serial': '682DFBF250555733352E3120FF0B1F28',
                  'vendor': 'Arduino_LLC',
                  'vendor_id': '2341'},
 '/dev/ttyACM5': {'model': 'Metro_M0_Express',
                  'model_id': '8013',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.2/1-4.2.3/1-4.2.3.1/1-4.2.3.1:1.0/tty/ttyACM5',
                  'serial': '07F016A15055544B302E3120FF0C121B',
                  'vendor': 'Adafruit',
                  'vendor_id': '239a'},
 '/dev/ttyACM6': {'model': 'Hello_Wacc',
                  'model_id': '804d',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.2/1-4.2.3/1-4.2.3.3/1-4.2.3.3:1.0/tty/ttyACM6',
                  'serial': '8900C9E850555733352E3120FF0B0B28',
                  'vendor': 'Arduino_LLC',
                  'vendor_id': '2341'},
 '/dev/ttyUSB0': {'model': 'CP2102_USB_to_UART_Bridge_Controller',
                  'model_id': 'ea60',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.3/1-4.3:1.0/ttyUSB0/tty/ttyUSB0',
                  'serial': '0001',
                  'vendor': 'Silicon_Labs',
                  'vendor_id': '10c4'},
 '/dev/ttyUSB1': {'model': 'FT232R_USB_UART',
                  'model_id': '6001',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.1/1-2.1.2/1-2.1.2:1.0/ttyUSB1/tty/ttyUSB1',
                  'serial': 'AB0NEV67',
                  'vendor': 'FTDI',
                  'vendor_id': '0403'},
 '/dev/ttyUSB2': {'model': 'FT232R_USB_UART',
                  'model_id': '6001',
                  'path': '/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/tty/ttyUSB2',
                  'serial': 'AB0NE2FL',
                  'vendor': 'FTDI',
                  'vendor_id': '0403'}}

Run cat /etc/udev/rules.d/95-hello-arduino.rules and post the output here.

# INSTALLATION
#
# First, copy this rules file into the following directory:
#
# /etc/udev/rules.d/
#
# Second, run the following command to make the new rule files become
# active and then disconnect and reconnect the device.
#
# sudo udevadm control --reload
#
# When writing udev rules, you can find relevant information about a
# device by running commands like the following with the appropriate
# device file name. You can often find the device file name by running
# dmesg from the command line right after plugging in the device.
#
# udevadm info -a /dev/ttyUSB0
#
# REFERENCES
#
# http://www.linuxfromscratch.org/lfs/view/6.2/chapter07/symlinks.html
#


#This rule is to make all Arduinos r/w permissions for the IDE
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="210C831850555733352E3120FF091A13", SYMLINK+="hello-pimu", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="9F9621C950555733352E3120FF102013", SYMLINK+="hello-motor-arm", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="76CA0CF250555733352E3120FF0B193E", SYMLINK+="hello-motor-lift", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="B9251BFD50555733352E3120FF0B0A3D", SYMLINK+="hello-motor-left-wheel", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="682DFBF250555733352E3120FF0B1F28", SYMLINK+="hello-motor-right-wheel", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="8900C9E850555733352E3120FF0B0B28", SYMLINK+="hello-wacc", ENV{ID_MM_DEVICE_IGNORE}="1"

@Pascalsutter thank you for the outputs we are going to have to do a little more debugging to see what the issue is could you please contact support@hello-robot.com and we can continue from there

Regards,
Visaacan