新建工作空间
新建目录
mkdir -p /home/abot/25/TeamName/src
复制功能包
cp -r /home/abot/25/yuanshibao/src/* /home/abot/25/TeamName/src/
进入TeamName/src目录
cd /home/abot/25/TeamName/src
删除CMakelists.txt文件
rm -r CMakelists.txt
初始化工作空间
catkin_init_workspace
进入TeamName目录
cd /home/abot/25/TeamName/
执行编译 注意:编译时确保$ROS_PACKAGE_PATH变量干净
catkin_make
添加工作空间到用户配置文件
cat << EOF >> ~/.bashrc
> source /home/abot/25/TeamName_ws/devel/setup.bash
> EOF
刷新配置文件
source ~/.bashrc
验证$ROS_PACKAGE_PATH变量
echo $ROS_PACKAGE_PATH输出中有且仅有一个冒号":",则视为成功
复制脚本文件
cp -r /home/abot/25/yuanshibao/2026_shoot.sh /home/abot/25/TeamName/
修改文件(琐碎,谨慎)
chmod a+x /home/abot/25/TeamName_ws/2026_shoot.sh
chmod a+x /home/abot/25/TeamName_ws/src/abot_base/abot_bringup/scripts/shoot.py
chmod a+x /home/abot/25/TeamName_wss/src/TTS_audio/scripts/TTS.py
chmod a+x /home/abot/25/TeamName_ws/src/robot_slam/scripts/2026_shoot_target.py
chmod a+x /home/abot/25/TeamName_ws/src/robot_slam/scripts/shoot_2025.py
sed -i 's#abot_ws#25/TeamName_ws#g' /home/abot/25/TeamName_ws/src/robot_slam/scripts/2026_shoot_demo.py
sed -i 's#shoot_object_2025#shoot_2025#g' /home/abot/25/TeamName_ws/src/robot_slam/launch/multi_goal_shoot_2025.launch
sed -i's#abot_ws#25/TeamName_ws#g' /home/abot/25/TeamName_ws/2026_shoot.sh
/home/abot/25/TeamName_ws/src/TTS_audio/scripts/TTS.py
注册火山引擎,会有赠送的TTS服务。获取应用ID,用户ID,访问令牌及你想要使用的语音类型,进入文件分别替换
运行脚本
/home/abot/25/TeamName_ws/2026_shoot.sh
