Robot Installation Error [Ubuntu 22.04]

Hi!

I installed ubuntu 22.04 to work with ROS2 Humble in my robot but when running the installation I encounter the following issue:

###########################################
CREATING HUMBLE AMENT WORKSPACE at /home/hello-robot/ament_ws
###########################################
Ensuring correct version of ROS is sourced...
/home/hello-robot/stretch_install/factory/22.04/stretch_create_ament_workspace.sh: line 26: ROS_DISTRO: unbound variable

#############################################
FAILURE. INSTALLATION DID NOT COMPLETE.
Look at the troubleshooting guide for solutions to common issues: https://docs.hello-robot.com/0.2/stretch-install/docs/robot_install#troubleshooting
or contact Hello Robot support and include /home/hello-robot/stretch_user/log/stretch_install_202309291002/stretch_robot_install_logs.zip
#############################################

I assume it wasn’t able to create the workspace but I am not sure if other installation procedures were not done because of this. Can I just try to create the workspace following the “New ROS workspace” tutorial? or do I have to take a different approach?

Best,
Tony

Hi @tony_rob, thanks for reporting this issue. You’re right about the only portion of the install missing at that point is the ROS2 workspace. You can follow that tutorial to finish the robot install manually.

A similar unbounded error was reported in this issue: ROS workspace install error

I’m wondering if there’s a bug in our workspace script. @Mohamed_Fazil could you try reproducing the unbounded error by performing a robot install of 22.04 + Humble?

@bshah I tried doing a fresh Ubuntu 22.04 stretch install and wasn’t able to reproduce the unbound error issue while trying the ament_ws creation script. Unsure if there is a bug in the script.

@tony_rob Could you send us the zipped user install log and also the output file generated using the command printenv>>~/environment_variables.log from the terminal where the ament workspace creation script is failing?

Hi all! Thanks for your responses.

I tried to install the ament_ws following the tutorial but I still get the same error. I’ve checked that ROS2 humble is sourced and when I run echo $ROS_DISTRO, ‘humble’ is printed to the terminal.

This is the requested zip file containing the logs: installation_logs.zip - Google Drive

Hello @Mohamed_Fazil,

Were you able to access the logs I sent? I am planning to redo the installation to see if the problem does not reappear.

Hi @tony_rob, I recently merged a fix that should solve the unbounded error issue. Would you try pulling down the latest changes to Stretch Install, and performing the workspace install again?

2 Likes

Fixed! thanks for your help!

1 Like

Hi @bshah @Mohamed_Fazil,

Now I am trying to set up a new robot installation in Ubuntu 20.04 but it is also failing. Here is the message I am getting:

###########################################
NEW INSTALLATION OF USER SOFTWARE
###########################################
Update ~/.bashrc dotfile...
Creating repos and stretch_user directories...
Cloning Stretch deep perception models...
Setting up user copy of robot factory data (if not already there)...
Setting up this user to start the robot's code automatically on boot...
Updating media assets...
Installing Arduino CLI...
/home/hello-robot/stretch_install/factory/20.04/stretch_install_arduino.sh: line 4: /home/hello-robot/.local/bin/arduino-cli: No such file or directory
/home/hello-robot/stretch_install/factory/20.04/stretch_install_arduino.sh: line 5: /home/hello-robot/.local/bin/arduino-cli: No such file or directory
sed: can't read /home/hello-robot/.arduino15/arduino-cli.yaml: No such file or directory

#############################################
FAILURE. INSTALLATION DID NOT COMPLETE.
Look at the troubleshooting guide for solutions to common issues: https://docs.hello-robot.com/0.2/stretch-install/docs/robot_install#troubleshooting
or contact Hello Robot support and include /home/hello-robot/stretch_user/log/stretch_install_202310200905/stretch_robot_install_logs.zip
#############################################

Hi @tony_rob , Thanks for raising this issue, I was able to reproduce this issue and it seems like the arduino-cli install shell script execution is failing. I beleive the script has an issue downloading the arduino cli package.
As a workaround to the above issue, I manually downloaded the latest pre-built arduino-cli 64bit binary as a tar.gz file. Then placed the contents of the zip file to the path /home/hello-robot/.local/bin/ and re-ran the robot install script.

# Download prebuilt arduino-cli binary zip package and extract it's contents
wget https://downloads.arduino.cc/arduino-cli/nightly/arduino-cli_nightly-latest_Linux_64bit.tar.gz
tar -xvf arduino-cli_nightly-latest_Linux_64bit.tar.gz

# Verify there are no pre-existing files in bin
sudo rm /home/hello-robot/.local/bin/arduino-cli
sudo rm -rf /home/hello-robot/.local/bin/arduino-cli

#Move the extracted arduino-cli file to bin
sudo mv arduino-cli /home/hello-robot/.local/bin/

Let me know if the above step solves your issue.

2 Likes

Hi @Mohamed_Fazil,

After following these steps on Ubuntu 22.04, I can still not find the installed Arduino IDE after adding the file to the /.local/bin/ directory and re-installing the robot with ./stretch_new_robot.sh.

The robot installation was successful.

Is there any other way of downloading Arduino IDE, or is there a lack of compatibility when installed the trivial way?

Best regards,
Noor

Hi @roboor ,
The script mentioned only installs the arduino-cli (Command Line Tool) and not the Arduino IDE I believe. You can definitely install Arduino IDE parallel to an existing arduino-cli installed in your robot.