1 Star 0 Fork 42

Jason.shen1984/originbot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install_prereq.sh 2.30 KB
一键复制 编辑 原始数据 按行查看 历史
yzhcat 提交于 2024-02-29 16:45 . 优化一键配置shell脚本
#!/bin/sh
# Install the prerequisites for the ROS exploring code
# 升级 tros和其他可升级软件
# 安装 ros2-foxy
# 安装 originbot 依赖包
echo -e "\e[32m 更新可升级的包(tros) \e[0m"
sudo apt update && sudo apt upgrade
echo -e "\e[32m 安装originbot 依赖包 \e[0m"
sudo apt -y install \
git \
ros-foxy-ros-base \
ros-foxy-demo-nodes-cpp \
python3-colcon-common-extensions \
python3-pip \
ros-foxy-slam-toolbox \
ros-foxy-cartographer-ros \
ros-foxy-teleop-twist-keyboard \
ros-foxy-robot-localization \
cloud-utils \
ros-foxy-rmw-cyclonedds-cpp \
ros-foxy-teleop-twist-joy \
ros-foxy-joy-linux \
ros-foxy-cv-bridge \
ros-foxy-xacro \
ros-foxy-robot-state-publisher \
ros-foxy-joint-state-publisher \
ros-foxy-joint-state-publisher-gui \
ros-foxy-nav2* \
libboost-python1.71.0
# 清理旧包
sudo apt autoremove -y
# 设置pip清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# 安装colcon-clean 工作区清理工具
pip install colcon-clean
# 安装opencv-contrib
pip install opencv-contrib-python==4.8.1.78
# 安装torch
pip install torch==2.2.0
# 安装pyclipper
pip install pyclipper==1.3.0.post5
# 从TogetheROS的安装路径中拷贝出运行示例需要的配置文件
echo -e "\e[32m 拷贝配置文件到工作空间 \e[0m"
cp -r /opt/tros/lib/mono2d_body_detection/config/ /userdata/dev_ws/
cp -r /opt/tros/lib/hand_lmk_detection/config/ /userdata/dev_ws/
cp -r /opt/tros/lib/hand_gesture_detection/config/ /userdata/dev_ws/
# 编译安装硬件驱动
echo -e "\e[32m 编译安装硬件驱动 \e[0m"
# 检查qpOASES目录是否存在
if [ -d "/userdata/dev_ws/src/originbot/originbot_driver/qpOASES/" ]; then
cd /userdata/dev_ws/src/originbot/originbot_driver/qpOASES/
mkdir build && cd build
cmake ..
sudo make && sudo make install
cd .. && sudo rm -r build/
else
echo "目录 /userdata/dev_ws/src/originbot/originbot_driver/qpOASES/ 不存在,跳过编译安装。"
fi
# 检查serial_ros2目录是否存在
if [ -d "/userdata/dev_ws/src/originbot/originbot_driver/serial_ros2/" ]; then
cd /userdata/dev_ws/src/originbot/originbot_driver/serial_ros2/
make && make install
make clean
else
echo "目录 /userdata/dev_ws/src/originbot/originbot_driver/serial_ros2/ 不存在,跳过编译安装。"
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jason-shen1984/originbot.git
git@gitee.com:jason-shen1984/originbot.git
jason-shen1984
originbot
originbot
master

搜索帮助