< >
Home » ROS2与Turtlebot4仿真 » ROS2与turtlebot4仿真入门教程-安装turtlebot4

ROS2与turtlebot4仿真入门教程-安装turtlebot4

ROS2与turtlebot4仿真入门教程-安装turtlebot4

说明:

  • 介绍如何安装turtlebot4仿真环境

依赖安装

  • 已经完成安装ROS2,如果没安装,参考上一篇文章的安装方式
  • 安装系统依赖
sudo apt install -y \
python3-colcon-common-extensions \
python3-rosdep \
python3-vcstool
  • 安装ignition
sudo apt-get update && sudo apt-get install wget
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get update && sudo apt-get install ignition-edifice

APT步骤:

  • 安装turtlebot4 simulator
sudo apt update
sudo apt install ros-galactic-turtlebot4-simulator ros-galactic-irobot-create-nodes

源码安装步骤:

  • 新建工作空间
cd ~/ros2_tb4_ws/src
git clone https://github.com/turtlebot/turtlebot4_simulator.git
  • 安装依赖
cd ~/ros2_tb4_ws
vcs import src < src/turtlebot4_simulator/dependencies.repos
rosdep install --from-path src -yi
  • 编译包
source /opt/ros/galactic/setup.bash
colcon build --symlink-install
  • 增加工作空间到bashrc
echo "source ~/ros2_tb4_ws/install/local_setup.bash" >> ~/.bashrc

运行:

  • 启动标准版
ros2 launch turtlebot4_ignition_bringup ignition.launch.py
  • 效果图:

请输入图片描述

  • 启动lite版
ros2 launch turtlebot4_ignition_bringup ignition.launch.py model:=lite
  • 效果图:

请输入图片描述

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: ros2与turtlebot4仿真入门教程