Issues when upgrading RE1 to Ubuntu 22.04

Hi all, I hope you are doing well.

I am facing a problem when upgrading my RE1 machine to Ubuntu 22.04. I followed the guide Upgrading your Operating System, and got to the point of running the stretch_robot_home.py script. Every step before that one seems ran with not issues as the scripts did not throw any errors.

Below is what I am getting when trying to run the stretch_robot_home.py script:

[ERROR] [hello-motor-arm]: Port /dev/hello-motor-arm is busy. Check if another Stretch Body process is already running
[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.

Additionally, below is the output I get when running stretch_system_check.py -v:

---------------------------------------------------------------------

Model = Stretch RE1
Tool = Standard Gripper
Batch = Hank
Serial Number = stretch-re1-1014

[ERROR] [hello-motor-arm]: Port /dev/hello-motor-arm is busy. Check if another Stretch Body process is already running
[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.

Hey @argen1s, thanks for your post.

Could you try running stretch_free_robot_process.py to free any processes using the arm? Thanks!

If that does not work, please post the output from ls -la /dev/ | grep hello and ls /etc/udev/rules.d/.

Hi @shehab,

stretch_free_robot_process.py did not work as I am still getting the same error.

Here are the outputs from the commands:

lrwxrwxrwx   1 root        root             7 May  7 13:05 hello-dynamixel-head -> ttyUSB1
lrwxrwxrwx   1 root        root             7 May  7 13:05 hello-dynamixel-wrist -> ttyUSB2
lrwxrwxrwx   1 root        root             7 May  7 13:05 hello-lrf -> ttyUSB0
lrwxrwxrwx   1 root        root             7 May  7 13:05 hello-motor-arm -> ttyACM4
lrwxrwxrwx   1 root        root             7 May  7 13:05 hello-motor-left-wheel -> ttyACM0
lrwxrwxrwx   1 root        root             7 May  7 13:05 hello-motor-lift -> ttyACM4
lrwxrwxrwx   1 root        root             7 May  7 13:05 hello-motor-right-wheel -> ttyACM2
lrwxrwxrwx   1 root        root             7 May  7 13:05 hello-pimu -> ttyACM3
lrwxrwxrwx   1 root        root            15 May  7 13:05 hello-respeaker -> bus/usb/001/011
lrwxrwxrwx   1 root        root             7 May  7 13:05 hello-wacc -> ttyACM5
crw--w----   1 hello-robot tty       4,     2 May  7 13:05 tty2

60-openocd.rules                         70-snap.snapd.rules       95-hello-arduino.rules
70-snap.chromium.rules                   70-snap.snap-store.rules  97-intel-ncs2.rules
70-snap.cups.rules                       85-sunshine.rules         99-hello-dynamixel.rules
70-snap.firefox.rules                    90-hello-respeaker.rules
70-snap.snapd-desktop-integration.rules  91-hello-lrf.rules
60-openocd.rules                         70-snap.snapd.rules       95-hello-arduino.rules
70-snap.chromium.rules                   70-snap.snap-store.rules  97-intel-ncs2.rules
70-snap.cups.rules                       85-sunshine.rules         99-hello-dynamixel.rules
70-snap.firefox.rules                    90-hello-respeaker.rules
70-snap.snapd-desktop-integration.rules  91-hello-lrf.rules

Hey @argen1s, thank you for your reply.

It looks like the arm and lift are using the same device port.

Would you please 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.
  5. Run cat /etc/udev/rules.d/99-hello-dynamixel.rules and post the output here.

These will tell us more about your system. Thanks!

Best,
Shehab

Huh, It seems that the serial number for the lift and arm in the 99-hello-arduino.rules file is the same.

Here is the output for all of the commands:

hello-motor-arm | ttyACM4
hello-motor-right-wheel | ttyACM2
hello-motor-left-wheel | ttyACM0
hello-pimu | ttyACM3
hello-wacc | ttyACM5
hello-motor-lift | ttyACM4
------------------------------------------
ttyACM0 | hello-motor-left-wheel
ttyACM1 | None
ttyACM2 | hello-motor-right-wheel
ttyACM3 | hello-pimu
ttyACM4 | hello-motor-lift
ttyACM5 | hello-wacc
------------------------------------------

{'/dev/ttyACM0': {'model': 'Hello_Stepper',
                  'model_id': '804d',
                  'path': '/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/0000:03:02.0/0000:3a:00.0/usb3/3-1/3-1.2/3-1.2:1.0/tty/ttyACM0',
                  'serial': '33790D1950535134382E3120FF102F24',
                  'vendor': 'Arduino_LLC',
                  'vendor_id': '2341'},
 '/dev/ttyACM1': {'model': 'Hello_Stepper',
                  'model_id': '804d',
                  'path': '/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/0000:03:02.0/0000:3a:00.0/usb3/3-1/3-1.3/3-1.3:1.0/tty/ttyACM1',
                  'serial': '2132D7BC50535134382E3120FF100925',
                  'vendor': 'Arduino_LLC',
                  'vendor_id': '2341'},
 '/dev/ttyACM2': {'model': 'Hello_Stepper',
                  'model_id': '804d',
                  'path': '/devices/pci0000:00/0000:00:1c.4/0000:02:00.0/0000:03:02.0/0000:3a:00.0/usb3/3-1/3-1.4/3-1.4:1.0/tty/ttyACM2',
                  'serial': '157D671150535134382E3120FF100525',
                  'vendor': 'Arduino_LLC',
                  'vendor_id': '2341'},
 '/dev/ttyACM3': {'model': 'Hello_Pimu',
                  'model_id': '804d',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.1/1-1.1:1.0/tty/ttyACM3',
                  'serial': '915925515053334D332E3120FF120D14',
                  'vendor': 'Arduino_LLC',
                  'vendor_id': '2341'},
 '/dev/ttyACM4': {'model': 'Hello_Stepper',
                  'model_id': '804d',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.3/1-1.3.2/1-1.3.2:1.0/tty/ttyACM4',
                  'serial': 'C17409C150535134382E3120FF102924',
                  'vendor': 'Arduino_LLC',
                  'vendor_id': '2341'},
 '/dev/ttyACM5': {'model': 'Hello_Wacc',
                  'model_id': '804d',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.3/1-1.3.1/1-1.3.1.3/1-1.3.1.3:1.0/tty/ttyACM5',
                  'serial': '1E1E500E50535134382E3120FF102C23',
                  '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: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-1/1-1.2/1-1.2.2/1-1.2.2:1.0/ttyUSB1/tty/ttyUSB1',
                  'serial': 'AR0K005M',
                  'vendor': 'FTDI',
                  'vendor_id': '0403'},
 '/dev/ttyUSB2': {'model': 'FT232R_USB_UART',
                  'model_id': '6001',
                  'path': '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.3/1-1.3.1/1-1.3.1.2/1-1.3.1.2:1.0/ttyUSB2/tty/ttyUSB2',
                  'serial': 'AR0K005Y',
                  'vendor': 'FTDI',
                  'vendor_id': '0403'}}

# 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}=="915925515053334D332E3120FF120D14", SYMLINK+="hello-pimu", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="C17409C150535134382E3120FF102924", SYMLINK+="hello-motor-arm", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="C17409C150535134382E3120FF102924", SYMLINK+="hello-motor-lift", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="33790D1950535134382E3120FF102F24", SYMLINK+="hello-motor-left-wheel", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="157D671150535134382E3120FF100525", SYMLINK+="hello-motor-right-wheel", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="1E1E500E50535134382E3120FF102C23", SYMLINK+="hello-wacc", ENV{ID_MM_DEVICE_IGNORE}="1"
# 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}=="915925515053334D332E3120FF120D14", SYMLINK+="hello-pimu", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="C17409C150535134382E3120FF102924", SYMLINK+="hello-motor-arm", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="C17409C150535134382E3120FF102924", SYMLINK+="hello-motor-lift", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="33790D1950535134382E3120FF102F24", SYMLINK+="hello-motor-left-wheel", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="157D671150535134382E3120FF100525", SYMLINK+="hello-motor-right-wheel", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="804d",MODE:="0666", ATTRS{serial}=="1E1E500E50535134382E3120FF102C23", SYMLINK+="hello-wacc", ENV{ID_MM_DEVICE_IGNORE}="1"

You’re right.

I see that no device is associated with ttyACM1, and only hello-motor-arm is missing from that list, so it looks like the serial for your arm is 2132D7BC50535134382E3120FF100925, go ahead and replace it in the udev rules.

In the output that you posted, I notice that the rules are duplicated - you should only have one set of them, please delete one set from that file.

Please let me know if this works! You may need to use sudo with your editor to get it to save.

1 Like

Hey @shehab,

It was in fact that serial number the cause of the error. I double checked the serial number of each of the Arduinos from a robot configuration/parameters I saved back when I updated to Ubuntu 20.04 and the serial number was not correct for the hello-motor-lift.

So the machine is now able to run the home script after updating the serial number and reloading the udev rules.

Thanks for your help!

1 Like

I’m glad that your issue is resolved!

1 Like