代码拉取完成,页面将自动刷新
#!/bin/bash
################################################
# Function : Install ROS2 humble RMF-web 22.04 source version
# Desc : 用于源码方式安装RMF-WEB 22.04/humble版的脚本
# Website : https://www.ncnynl.com/archives/202212/5775.html
# Platform : ubuntu
# Version : 1.0
# Date : 2022-07-06 18:22:04
# Author : ncnynl
# Contact : 1043931@qq.com
# URL: https://ncnynl.com
# Licnese: MIT
# QQ Qun: 创客智造B群:926779095
# QQ Qun: 创客智造C群:937347681
# QQ Qun: 创客智造D群:562093920
################################################
export TEXTDOMAINDIR=/usr/share/locale
export TEXTDOMAIN=commands
echo "$(gettext "Install ROS2 humble RMF-web 22.04 source version")"
# echo "Not Yet Supported!"
# exit 0
#基于ubuntu22.04 humble版本安装需要指的版本
#安装nvm和nodejs
#install nodejs and npm
if [ ! -d /usr/share/nodejs ];then
sh -c "~/commands/common/shell/install_nvm.sh"
sh -c "~/commands/common/shell/install_nodejs.sh"
fi
# #设置国内源
# npm config set registry https://registry.npm.taobao.org
# #安装pnpm
if [ ! -f $HOME/.local/share/pnpm/pnpm ]; then
sh -c "~/commands/common/shell/install_pnpm.sh"
fi
# #Install dependencies
sudo apt install -y python3-venv
sudo apt install -y libpango1.0-dev
python3 -m pip install tortoise
# #Install PostgreSQL
sudo apt install postgresql postgresql-contrib -y
# Set a default password
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
sudo systemctl restart postgresql
# interactive prompt
# sudo -i -u postgres
#To manually reset the database:
# sudo -u postgres bash -c "dropdb postgres; createdb postgres"
#downlaod
#commit dbdfb532b653642bb91ea3ed553c399d60220c0c
cd ~/ros2_rmf_ws/
git clone -b main https://github.com/open-rmf/rmf-web
#安装,需要花一定时间安装
cd ~/ros2_rmf_ws/rmf-web
# pnpm
export PNPM_HOME="~/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
# pnpm end
pnpm env use --global 18
pnpm install
# launch
# cd packages/dashboard
# export NODE_OPTIONS='--openssl-legacy-provider'
# pnpm start
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。