4 Star 7 Fork 4

爱折腾智能机器人/commands

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
commands_completion
commands_docker
commands_extra
common
common_nvidia/shell
common_rpi/shell
common_wsl2/shell
ros1/shell
ros1_ailibot/shell
ros1_algorithm/shell
ros1_crazyflie/shell
ros1_gazebo/shell
ros1_sensor/shell
ros1_tb3
ros1_tb3_gazebo
ros2
ros2_ailibot2/shell
ros2_algorithm/shell
ros2_arm
ros2_autoware/shell
ros2_crazyflie/shell
ros2_gazebo/shell
ros2_gui/shell
ros2_ignition/shell
ros2_locobot
ros2_odrive/shell
ros2_rmf/shell
ros2_sensor/shell
ros2_stm32/shell
.description
install_STM32CubeProgrammer.sh
install_micro_ros.sh
install_micro_ros_agent.sh
install_micro_ros_agent_docker.sh
install_micro_ros_dds.sh
install_micro_ros_utils.sh
install_micro_xrce_dds_agent.sh
install_micro_xrce_dds_client.sh
install_micro_xrce_dds_gen.sh
install_stlink.sh
install_stm32flash.sh
ros2_tb3/shell
ros2_tb3_gazebo/shell
ros2_tb4/shell
ros2_tb4_ignition/shell
ros2_turbot4_arm/shell
ros2_turtlesim/shell
ros2_walking/shell
ros2_walking_application/shell
ros2_walking_gazebo/shell
ros2_webots/shell
ros_easy/shell
system
commands_repo.json
commands_resource.json
cs.sh
cs_utils.sh
cs_utils_gpu.sh
cs_utils_ros.sh
cs_variables.sh
commands_gui
commands_i18n
commands_web
images
test
.gitignore
CHANGELOG.rst
DOCUMENT.md
LICENSE
README-en.md
README.md
README_EXAMPLES.md
TODO.md
commands.desktop
commands.png
config_git.sh
desktop.sh
install.sh
install_completion.sh
install_desktop.sh
install_docker.sh
install_docker_extra.sh
install_docker_i18n.sh
install_extra.sh
install_gui.sh
install_i18n.sh
install_private.sh
install_shell.sh
install_simple.sh
install_web.sh
logo.png
online.sh
online_docker.sh
online_shell.sh
shell.sh
sync_doc.sh
sync_extra.sh
sync_gitee.sh
sync_private.sh
uninstall.sh
version.txt
克隆/下载
install_micro_ros.sh 2.28 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
################################################
# Function : Install ROS2 Micro ROS source
# Desc : 用于源码方式安装ROS2 Micro ROS的脚本
# Platform : ubuntu
# Version : 1.0
# Date : 2023-08-26
# 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 Micro ROS for ROS2 ${ROS_DISTRO} source")"
# echo "Tested ROS2 Version: galactic , humble"
# if installed ?
if [ -d ~/ros2_micro_ros_ws/src/micro_ros_setup ]; then
echo "Micro ROS have installed!!"
else
# install dep
sudo apt-get update
sudo apt-get install python3-pip
#install openocd
sudo apt install -y openocd
sudo apt install -y arm-none-eabi-gcc arm-none-eabi-gdb
#install micro ros dds
#cs -si install_micro_ros_dds
cs -si install_stlink
# 新建工作空间
mkdir -p ~/ros2_micro_ros_ws/src
# 进入工作空间
cd ~/ros2_micro_ros_ws/src
# 获取仓库列表
#replace https
# git config --global url."https://ghproxy.com/https://github.com".insteadof https://github.com
#run import
echo "this will take a while to download"
# 下载仓库
echo "Dowload micro_ros"
git clone -b $ROS_DISTRO https://github.com/micro-ROS/micro_ros_setup.git micro_ros_setup
# 编辑各个包
echo "build workspace..."
cd ~/ros2_micro_ros_ws
cs -si update_rosdep_tsinghua
rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y
colcon build --symlink-install
# 添加工作空间路径到bashrc文件
echo "Add workspace to bashrc"
if ! grep -Fq "ros2_micro_ros_ws" ~/.bashrc
then
echo 'source ~/ros2_micro_ros_ws/install/local_setup.bash' >> ~/.bashrc
fi
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
其他
1
https://gitee.com/ncnynl/commands.git
git@gitee.com:ncnynl/commands.git
ncnynl
commands
commands
master

搜索帮助