【ROS2】虚拟机使用fishros脚本一键安装humble
视频讲解
:1.2.4 在Ubuntu中安装ROS2:https://www.bilibili.com/video/BV1Jz421B7Ey
一键安装包的源码: https://github.com/fishros/install
其他资料:ROS2机器人开发:从入门到实践
虚拟机安装参考
https://book.guyuehome.com/ROS2在windows虚拟机安装ubuntu
下载自动安装脚本
打开命令端 ,输入
sudo apt update
下载安装脚本并安装
wget http://fishros.com/install -O fishros && bash fishros
脚本内容,如果下载不下来,可以保存为任意文件名,直接执行
mkdir -p /tmp/fishinstall/tools/translation/assets
wget http://mirror.fishros.com/install/install.py -O /tmp/fishinstall/install.py 2>>/dev/null
source /etc/profile
if [ $UID -eq 0 ];thenapt-get install sudo
fi
sudo apt install python3-distro python3-yaml -y
sudo python3 /tmp/fishinstall/install.py
sudo rm -rf /tmp/fishinstall/if [ -f fishros ]; thensudo rm fishros
fi# 初始假设默认是 Bash
shell_name='bash'
if shopt -u lastpipe 2> /dev/null; then# 当前 shell 是 Bash:
else# 当前 shell 是 Zsh 或其他 shellif test -n "$ZSH_VERSION"; thenshell_name='zsh'else# 当前使用的 shell 不是 Bash 或 Zshshell_name=''fi
fi# 根据 shell 名称加载相应的配置文件
if [ "$shell_name" = "bash" ]; thenif [ -f ~/.bashrc ]; thensource ~/.bashrcfi
elif [ "$shell_name" = "zsh" ]; thenif [ -f ~/.zshrc ]; thensource ~/.zshrcfi
fi
输入数字安装(根据提示安装)
这个工具可以安装很多包,本次我们是选1, ROS
ROS版本选择,选humble (ubuntu22.04)
根据系统选择
桌面端,是指ubuntu图像界面的
安装好测试命令
ros2
查看安装位置
zengxingyu@zengxingyu-virtual-machine:~$ whereis ros2
ros2: /opt/ros/humble/bin/ros2
运行内置小海龟程序
ros2 run turtlesim turtlesim_node
附录
ROS2相关文章
ROS的安装:【ROS2】机器人操作系统安装到Ubuntu22.04简介(手动)