Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
852ea32
Begin port to 24.04
hello-binit Jul 23, 2025
d1b1957
Remove unneeded files
hello-binit Jul 23, 2025
d522652
Install ROS2 Jazzy
hello-binit Jul 23, 2025
79f82f5
Add additional jazzy pkgs
hello-binit Jul 23, 2025
7dd5237
Switch Sunshine to 24.04
hello-binit Jul 23, 2025
df678be
Add 24.04 to switch statements
hello-binit Jul 23, 2025
afd0852
Start porting over ROS workspace
hello-binit Jul 23, 2025
18d5188
Redirect output from blacklist to null
hello-binit Jul 23, 2025
fb55221
Emacs requires preseeding answers to interactive postfix
hello-binit Jul 23, 2025
c652d6c
Comment out web teleop - pypcl not available for 24.04
hello-binit Jul 23, 2025
14a6f84
Let pip manage pkgs for system interpreter
hello-binit Jul 23, 2025
42682f5
Separate out pip from 24.04
hello-binit Jul 24, 2025
2a8ee6b
Redirect stderr from arduino cli
hello-binit Jul 24, 2025
2edc69b
Clean up param migration
hello-binit Jul 24, 2025
c38ba9f
Replace humble vcs with jazzy
hello-binit Jul 24, 2025
b049041
rosdep for jazzy
hello-binit Jul 24, 2025
93ca92a
Comment out web teleop workspace setup
hello-binit Jul 24, 2025
084c2cc
Comment out FUNMAP setup
hello-binit Jul 24, 2025
0ddb88c
Comment out FUNMAP setup pt. 2
hello-binit Jul 24, 2025
3670a26
Cant editable install, cant build funmap
hello-binit Jul 24, 2025
82035b6
Cant editable install, comment out FUNMAP pt. 3
hello-binit Jul 24, 2025
11988f6
Must remove nose
hello-binit Jul 24, 2025
45fb333
July release of Sunshine seems to have been deleted
hello-binit Aug 5, 2025
d0cfc19
New post install link
hello-binit Aug 5, 2025
a61b69f
Fix udev rules copy (https://superuser.com/a/918334)
hello-binit Oct 26, 2025
e8e2798
Update apt cache before creating ROS workspace
hello-binit Oct 28, 2025
2adbd3a
chmod on calibration data in home folder only if not factory install
hello-binit Oct 29, 2025
eaa9b68
Merge pull request #102 from hello-robot/bugfix/sudo_glob_copy
hello-binit Nov 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions factory/18.04/stretch_create_catkin_workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ if [[ -d $CATKIN_WSDIR ]]; then
prompt_yes_no
fi

echo "Apt update..."
sudo apt-get --yes update >> $REDIRECT_LOGFILE
echo "Deleting $CATKIN_WSDIR if it already exists..."
sudo rm -rf $CATKIN_WSDIR
# see http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment for details
Expand Down
4 changes: 2 additions & 2 deletions factory/18.04/stretch_initial_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ if [ $do_factory_install = 'false' ]; then
echo "Expecting robot calibration $HELLO_FLEET_ID to be present in the the home folder. Exiting."
exit 1
fi
chmod -R a+r $HOME/$HELLO_FLEET_ID
fi
chmod -R a+r $HOME/$HELLO_FLEET_ID

echo "Waiting to get online..."
while ! timeout 0.2 ping -c 1 -n google.com &> /dev/null
Expand Down Expand Up @@ -129,7 +129,7 @@ else
fi

echo "Setting up UDEV rules..."
sudo cp /etc/hello-robot/$HELLO_FLEET_ID/udev/*.rules /etc/udev/rules.d
sudo sh -c "cp /etc/hello-robot/$HELLO_FLEET_ID/udev/*.rules /etc/udev/rules.d"
sudo udevadm control --reload

echo "Allow shutdown without password..."
Expand Down
2 changes: 2 additions & 0 deletions factory/20.04/stretch_create_catkin_workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ if [[ -d $CATKIN_WSDIR ]]; then
prompt_yes_no
fi

echo "Apt update..."
sudo apt-get --yes update >> $REDIRECT_LOGFILE
echo "Updating rosdep indices..."
rosdep update --include-eol-distros &>> $REDIRECT_LOGFILE
echo "Deleting $CATKIN_WSDIR if it already exists..."
Expand Down
4 changes: 2 additions & 2 deletions factory/20.04/stretch_initial_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ if [ $do_factory_install = 'false' ]; then
echo "Expecting robot calibration $HELLO_FLEET_ID to be present in the the home folder. Exiting."
exit 1
fi
chmod -R a+r $HOME/$HELLO_FLEET_ID
fi
chmod -R a+r $HOME/$HELLO_FLEET_ID

echo "Waiting to get online..."
while ! timeout 0.2 ping -c 1 -n google.com &> /dev/null
Expand Down Expand Up @@ -128,7 +128,7 @@ else
fi

echo "Setting up UDEV rules..."
sudo cp /etc/hello-robot/$HELLO_FLEET_ID/udev/*.rules /etc/udev/rules.d
sudo sh -c "cp /etc/hello-robot/$HELLO_FLEET_ID/udev/*.rules /etc/udev/rules.d"
sudo udevadm control --reload

echo "Allow shutdown without password..."
Expand Down
3 changes: 3 additions & 0 deletions factory/22.04/stretch_create_ament_workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ if [[ -d $AMENT_WSDIR ]]; then
prompt_yes_no
fi

echo "Apt update..."
sudo apt-get --yes update >> $REDIRECT_LOGFILE

echo "Downgrade to numpy 1.26.4..."
pip3 install numpy==1.26.4 &>> $REDIRECT_LOGFILE

Expand Down
4 changes: 2 additions & 2 deletions factory/22.04/stretch_initial_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ if [ $do_factory_install = 'false' ]; then
echo "Expecting robot calibration $HELLO_FLEET_ID to be present in the the home folder. Exiting."
exit 1
fi
chmod -R a+r $HOME/$HELLO_FLEET_ID
fi
chmod -R a+r $HOME/$HELLO_FLEET_ID

echo "Waiting to get online..."
while ! timeout 0.2 ping -c 1 -n google.com &> /dev/null
Expand Down Expand Up @@ -128,7 +128,7 @@ else
fi

echo "Setting up UDEV rules..."
sudo cp /etc/hello-robot/$HELLO_FLEET_ID/udev/*.rules /etc/udev/rules.d
sudo sh -c "cp /etc/hello-robot/$HELLO_FLEET_ID/udev/*.rules /etc/udev/rules.d"
sudo udevadm control --reload

echo "Allow shutdown without password..."
Expand Down
6 changes: 6 additions & 0 deletions factory/24.04/hello_robot_audio.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Desktop Entry]
Type=Application
Name=hello_robot_audio
Exec=/usr/bin/hello_robot_audio.sh
Hidden=false
X-GNOME-Autostart-enabled=true
6 changes: 6 additions & 0 deletions factory/24.04/hello_robot_audio.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /bin/bash
sleep 5
pactl set-default-sink alsa_output.pci-0000_00_1f.3.analog-stereo
amixer set Master 80%
paplay --device=alsa_output.pci-0000_00_1f.3.analog-stereo /usr/share/sounds/ubuntu/stereo/desktop-login.ogg

6 changes: 6 additions & 0 deletions factory/24.04/hello_robot_gamepad_teleop.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Desktop Entry]
Type=Application
Name=hello_robot_gamepad_teleop
Exec=/usr/bin/hello_robot_gamepad_teleop.sh
Hidden=false
X-GNOME-Autostart-enabled=false
6 changes: 6 additions & 0 deletions factory/24.04/hello_robot_gamepad_teleop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /bin/bash

. /etc/hello-robot/hello-robot.conf
export HELLO_FLEET_ID HELLO_FLEET_ID
export HELLO_FLEET_PATH=$HOME/stretch_user
/usr/bin/python3 $HOME/.local/bin/stretch_gamepad_teleop.py &>> "$HOME/stretch_user/log/hello_robot_gamepad_teleop.`date '+%Y%m%d%H%M'`.log"
6 changes: 6 additions & 0 deletions factory/24.04/hello_robot_lrf_off.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Desktop Entry]
Type=Application
Name=hello_robot_lrf_off
Exec= /usr/bin/hello_robot_lrf_off.py
Hidden=false
X-GNOME-Autostart-enabled=true
10 changes: 10 additions & 0 deletions factory/24.04/hello_robot_lrf_off.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env python3
import serial
import time
#This script keeps the lrf port open while the computer is on
#This has the effect of keeping the DTR line high to the LRF, which in turn turns the motor off
#So long as one port is open on the serail the DTR remains high (see HUPcL in termios)
#Other programs can still open/close/read/write the port independent of this script
sp=serial.Serial('/dev/hello-lrf',115200,parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=1, dsrdtr=True)
while True:
time.sleep(1.0)
6 changes: 6 additions & 0 deletions factory/24.04/hello_robot_pimu_ping.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Desktop Entry]
Type=Application
Name=hello_robot_pimu_ping
Exec= /usr/bin/hello_robot_pimu_ping.sh
Hidden=false
X-GNOME-Autostart-enabled=true
18 changes: 18 additions & 0 deletions factory/24.04/hello_robot_pimu_ping.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python3
import stretch_body.pimu
import time
#This script establishes communications with the Pimu at launch then shutsdown
#This has the effect of letting the Pimu know that Ubuntu Desktop is live (which drives its LightBar state machine)

print('Starting up Pimu Ping on %s'%time.asctime())
ping_success=False
for i in range(10):
p = stretch_body.pimu.Pimu()
if p.startup():
print('Successful ping of Pimu on try %d'%i)
p.stop()
exit(0)
p.stop()
time.sleep(1.0)

print('Failed to ping Pimu')
7 changes: 7 additions & 0 deletions factory/24.04/hello_robot_pimu_ping.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /bin/bash

. /etc/hello-robot/hello-robot.conf
export HELLO_FLEET_ID HELLO_FLEET_ID
export HELLO_FLEET_PATH=$HOME/stretch_user

/usr/bin/python3 /usr/bin/hello_robot_pimu_ping.py &>> "$HOME/stretch_user/log/hello_robot_pimu_ping.`date '+%Y%m%d%H%M'`.log"
6 changes: 6 additions & 0 deletions factory/24.04/hello_robot_xbox_teleop.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Desktop Entry]
Type=Application
Name=hello_robot_xbox_teleop
Exec=/usr/bin/hello_robot_xbox_teleop.sh
Hidden=false
X-GNOME-Autostart-enabled=false
6 changes: 6 additions & 0 deletions factory/24.04/hello_robot_xbox_teleop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /bin/bash

. /etc/hello-robot/hello-robot.conf
export HELLO_FLEET_ID HELLO_FLEET_ID
export HELLO_FLEET_PATH=$HOME/stretch_user
/usr/bin/python3 $HOME/.local/bin/stretch_xbox_controller_teleop.py &>> "$HOME/stretch_user/log/hello_robot_xbox_teleop.`date '+%Y%m%d%H%M'`.log"
1 change: 1 addition & 0 deletions factory/24.04/hello_sudoers
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALL ALL=(ALL) NOPASSWD: /sbin/shutdown
30 changes: 30 additions & 0 deletions factory/24.04/motd/00-header
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh
#
# 00-header - create the header of the MOTD
# Copyright (C) 2009-2010 Canonical Ltd.
#
# Authors: Dustin Kirkland <kirkland@canonical.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

[ -r /etc/lsb-release ] && . /etc/lsb-release

if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then
# Fall back to using the very slow lsb_release utility
DISTRIB_DESCRIPTION=$(lsb_release -s -d)
fi

printf "Welcome to Stretch's %s Distribution\n" "$DISTRIB_RELEASE"
printf "based on %s (%s %s %s)\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)"
25 changes: 25 additions & 0 deletions factory/24.04/motd/10-help-text
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
#
# 10-help-text - print the help text associated with the distro
# Copyright (C) 2009-2010 Canonical Ltd.
#
# Authors: Dustin Kirkland <kirkland@canonical.com>,
# Brian Murray <brian@canonical.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

printf "\n"
printf " * Documentation: https://docs.hello-robot.com/\n"
printf " * Support: https://forum.hello-robot.com/\n\n"
4 changes: 4 additions & 0 deletions factory/24.04/motd/10dpkg_options
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Dpkg::Options {
"--force-confdef";
"--force-confold";
}
Binary file added factory/24.04/stretch_about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
134 changes: 134 additions & 0 deletions factory/24.04/stretch_create_ament_workspace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
#!/bin/bash
set -e
export COLCON_EXTENSION_BLOCKLIST=colcon_core.event_handler.desktop_notification

REDIRECT_LOGDIR="$HOME/stretch_user/log"
AMENT_WSDIR="$HOME/ament_ws"
while getopts l:w: opt; do
case $opt in
l)
if [[ -d $OPTARG ]]; then
REDIRECT_LOGDIR=$OPTARG
fi
;;
w)
AMENT_WSDIR=$OPTARG
;;
esac
done
REDIRECT_LOGFILE="$REDIRECT_LOGDIR/stretch_create_ament_workspace.`date '+%Y%m%d%H%M'`_redirected.txt"

echo "###########################################"
echo "CREATING JAZZY AMENT WORKSPACE at $AMENT_WSDIR"
echo "###########################################"

echo "Ensuring correct version of ROS is sourced..."
if [[ $ROS_DISTRO && ! $ROS_DISTRO = "jazzy" ]]; then
echo "Cannot create workspace while a conflicting ROS version is sourced. Exiting."
exit 1
fi
source /opt/ros/jazzy/setup.bash

if [[ -d $AMENT_WSDIR ]]; then
echo "You are about to delete and replace the existing ament workspace. If you have any personal data in the workspace, please create a back up before proceeding."
prompt_yes_no(){
read -p "Do you want to continue? Press (y/n for yes/no): " x
if [ $x = "n" ]; then
echo "Exiting the script."
exit 1
elif [ $x = "y" ]; then
echo "Continuing to create a new ament workspace."
else
echo "Press 'y' for yes or 'n' for no."
prompt_yes_no
fi
}
prompt_yes_no
fi

echo "Apt update..."
sudo apt-get --yes update >> $REDIRECT_LOGFILE

echo "Downgrade to numpy 1.26.4..."
export PIP_BREAK_SYSTEM_PACKAGES=1
pip3 install numpy==1.26.4 &>> $REDIRECT_LOGFILE

export PATH=${PATH}:~/.local/bin
. /etc/hello-robot/hello-robot.conf
export HELLO_FLEET_ID=$HELLO_FLEET_ID
export HELLO_FLEET_PATH=${HOME}/stretch_user
echo "Updating rosdep indices..."
rosdep update --include-eol-distros &>> $REDIRECT_LOGFILE
echo "Deleting $AMENT_WSDIR if it already exists..."
sudo rm -rf $AMENT_WSDIR
echo "Creating the workspace directory..."
mkdir -p $AMENT_WSDIR/src
echo "Cloning the workspace's packages..."
cd $AMENT_WSDIR/src
vcs import --input ~/stretch_install/factory/24.04/stretch_ros2_jazzy.repos &>> $REDIRECT_LOGFILE
echo "Fetch ROS packages' dependencies (this might take a while)..."
cd $AMENT_WSDIR/
# The rosdep flags below have been chosen very carefully. Please review the docs before changing them.
# https://docs.ros.org/en/independent/api/rosdep/html/commands.html
rosdep install --rosdistro=jazzy -iy --from-paths src &>> $REDIRECT_LOGFILE
pip3 cache purge &>> $REDIRECT_LOGFILE

# echo "Install web interface dependencies..."
# cd $AMENT_WSDIR/src/stretch_web_teleop
# pip3 install -r requirements.txt &>> $REDIRECT_LOGFILE
# npm install --force &>> $REDIRECT_LOGFILE
# npx playwright install &>> $REDIRECT_LOGFILE
# echo "Generating web interface certs..."
# cd $AMENT_WSDIR/src/stretch_web_teleop/certificates
# curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64" &>> $REDIRECT_LOGFILE
# chmod +x mkcert-v*-linux-amd64
# sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
# CAROOT=`pwd` mkcert --install &>> $REDIRECT_LOGFILE
# mkdir -p ~/.local/share/mkcert
# rm -rf ~/.local/share/mkcert/root*
# cp root* ~/.local/share/mkcert
# mkcert ${HELLO_FLEET_ID} ${HELLO_FLEET_ID}.local ${HELLO_FLEET_ID}.dev localhost 127.0.0.1 0.0.0.0 ::1 &>> $REDIRECT_LOGFILE
# rm mkcert-v*-linux-amd64
# cd $AMENT_WSDIR/src/stretch_web_teleop
# touch .env
# echo certfile=${HELLO_FLEET_ID}+6.pem >> .env
# echo keyfile=${HELLO_FLEET_ID}+6-key.pem >> .env
# cd $AMENT_WSDIR/

# echo "Install FUNMAP dependencies..."
# curl -LsSf https://astral.sh/uv/install.sh | sh &>> $REDIRECT_LOGFILE
# cd $AMENT_WSDIR/src/stretch_ros2/stretch_funmap
# uv venv --system-site-packages --allow-existing .venv &>> $REDIRECT_LOGFILE
# uv sync --frozen &>> $REDIRECT_LOGFILE
# echo "Compile cython modules..."
# pip3 install setuptools==59.6.0 &>> $REDIRECT_LOGFILE # must use <61 for Colcon to correctly build Stretch FUNMAP
# uv run cythonize stretch_funmap/cython_min_cost_path.pyx -3 -i &>> $REDIRECT_LOGFILE
# cd $AMENT_WSDIR/

echo "Compile the workspace (this might take a while)..."
# pip3 install setuptools==59.6.0 &>> $REDIRECT_LOGFILE # must use <61 for Colcon to correctly build Stretch FUNMAP
# pip3 uninstall -y setuptools-scm &>> $REDIRECT_LOGFILE
pip3 uninstall -y nose &>> $REDIRECT_LOGFILE
colcon build &>> $REDIRECT_LOGFILE
echo "Source setup.bash file..."
source $AMENT_WSDIR/install/setup.bash
echo "Updating port privledges..."
sudo sysctl -w net.ipv4.ip_unprivileged_port_start=80 &>> $REDIRECT_LOGFILE
echo net.ipv4.ip_unprivileged_port_start=80 | sudo tee --append /etc/sysctl.d/99-sysctl.conf &>> $REDIRECT_LOGFILE
echo "Update ~/.bashrc dotfile to source workspace..."
echo "source $AMENT_WSDIR/install/setup.bash" >> ~/.bashrc
echo "source /usr/share/colcon_cd/function/colcon_cd.sh" >> ~/.bashrc
echo "Updating meshes and xacros to ROS from stretch_urdf package."
/home/$USER/.local/bin/stretch_urdf_ros_update.py -y -v >> $REDIRECT_LOGFILE
echo "Setup uncalibrated robot URDF..."
ros2 run stretch_calibration update_uncalibrated_urdf >> $REDIRECT_LOGFILE
echo "Setup calibrated robot URDF..."
ros2 run stretch_calibration update_with_most_recent_calibration >> $REDIRECT_LOGFILE
colcon build &>> $REDIRECT_LOGFILE

# echo "Amend FUNMAP executables to use venv..."
# pip3 install -U hello-robot-stretch-factory &>> $REDIRECT_LOGFILE # Necessary for the below CLI
# REx_amend_venv_execs.py stretch_funmap &>> $REDIRECT_LOGFILE

echo "Downgrade to numpy 1.26.4..."
pip3 install numpy==1.26.4 &>> $REDIRECT_LOGFILE
Loading