Skip to content

Commit 33409de

Browse files
authored
Merge pull request #87 from hello-robot/feature/uv_funmap
Build venv for Stretch FUNMAP
2 parents 990b464 + 6e1a4ee commit 33409de

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

factory/22.04/stretch_create_ament_workspace.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ if [[ -d $AMENT_WSDIR ]]; then
4646
prompt_yes_no
4747
fi
4848

49+
export PATH=${PATH}:~/.local/bin
4950
. /etc/hello-robot/hello-robot.conf
5051
export HELLO_FLEET_ID HELLO_FLEET_ID
5152
export HELLO_FLEET_PATH=${HOME}/stretch_user
@@ -65,6 +66,7 @@ cd $AMENT_WSDIR/
6566
rosdep install --rosdistro=humble -iy --skip-keys="librealsense2 realsense2_camera" --from-paths src &>> $REDIRECT_LOGFILE
6667
sudo apt remove -y ros-humble-librealsense2 ros-humble-realsense2-camera ros-humble-realsense2-camera-msgs &>> $REDIRECT_LOGFILE
6768
pip3 cache purge &>> $REDIRECT_LOGFILE
69+
6870
echo "Install web interface dependencies..."
6971
cd $AMENT_WSDIR/src/stretch_web_teleop
7072
pip3 install -r requirements.txt &>> $REDIRECT_LOGFILE
@@ -86,8 +88,17 @@ touch .env
8688
echo certfile=${HELLO_FLEET_ID}+6.pem >> .env
8789
echo keyfile=${HELLO_FLEET_ID}+6-key.pem >> .env
8890
cd $AMENT_WSDIR/
91+
92+
echo "Install FUNMAP dependencies..."
93+
cd $AMENT_WSDIR/src/stretch_ros2/stretch_funmap
94+
uv venv --system-site-packages --allow-existing .venv &>> $REDIRECT_LOGFILE
95+
uv sync --frozen &>> $REDIRECT_LOGFILE
96+
echo "Compile cython modules..."
97+
uv run cythonize stretch_funmap/cython_min_cost_path.pyx -3 -i &>> $REDIRECT_LOGFILE
98+
cd $AMENT_WSDIR/
99+
89100
echo "Compile the workspace (this might take a while)..."
90-
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release &>> $REDIRECT_LOGFILE
101+
colcon build --symlink-install &>> $REDIRECT_LOGFILE
91102
echo "Source setup.bash file..."
92103
source $AMENT_WSDIR/install/setup.bash
93104
echo "Updating port privledges..."
@@ -102,4 +113,8 @@ echo "Setup uncalibrated robot URDF..."
102113
ros2 run stretch_calibration update_uncalibrated_urdf >> $REDIRECT_LOGFILE
103114
echo "Setup calibrated robot URDF..."
104115
ros2 run stretch_calibration update_with_most_recent_calibration >> $REDIRECT_LOGFILE
105-
colcon build &>> $REDIRECT_LOGFILE
116+
colcon build --symlink-install &>> $REDIRECT_LOGFILE
117+
118+
echo "Amend FUNMAP executables to use venv..."
119+
REx_amend_venv_execs.py stretch_funmap &>> $REDIRECT_LOGFILE
120+

factory/22.04/stretch_install_system.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ install portaudio19-dev
4949
echo "Install lm-sensors & nvme-cli"
5050
install lm-sensors
5151
install nvme-cli
52-
echo "Install Cython for FUNMAP"
53-
install cython3
5452
echo "Install cheese for camera testing"
5553
install cheese
5654
echo "Install SSH Server"
@@ -67,6 +65,8 @@ echo "Install APT HTTPS"
6765
install apt-transport-https
6866
echo "Install Network Security Services libraries"
6967
install libnss3-tools
68+
echo "Install uv"
69+
curl -LsSf https://astral.sh/uv/install.sh | sh &>> $REDIRECT_LOGFILE
7070
echo ""
7171

7272
# https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html
@@ -140,7 +140,7 @@ echo "INSTALLATION OF WEB INTERFACE"
140140
echo "###########################################"
141141
echo "Register the nodesource APT server's public key"
142142
function register_nodesource_apt_server {
143-
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
143+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --batch --yes --dearmor -o /etc/apt/keyrings/nodesource.gpg
144144
}
145145
register_nodesource_apt_server &>> $REDIRECT_LOGFILE
146146
echo "Add the nodesource APT server to the list of APT respositories"

0 commit comments

Comments
 (0)