赞
踩
说明:
相关设备
安装操作系统
TurtleBot4默认使用Ubuntu 20.04 LTS (Focal Fossa)操作系统
操作系统安装教程:Ubuntu系统入门教程-安装ubuntu20.04
安装ROS2 Galactic Desktop
方式一:使用ROS命令管理器
快速安装
首先安装ROS命令管理器
$ rm online.sh ; wget https://gitee.com/ncnynl/commands/raw/master/online.sh ; sudo chmod +x ./online.sh; ./online.sh
ROS命令管理器
$ commands
ros2
目录,导入install_ros2_galactic.json
和config_ros2_galatic_to_bashrc.json
文件 按照以上图片序号顺序依次运行对应的脚本,需要等待上一个脚本完成后再,再运行下一脚本
测试是否成功安装,新终端运行以下命令
- $ ros2 topic list
- /parameter_events
- /rosout
方式二:使用传统方式安装
安装Turtlebot4相关软件
方式一:使用命令管理器
快速安装
启动ROS命令管理器
$ commands
ros2
目录,导入install_ros2_tb4.json
、install_ros2_tb4_source
和config_ros2_to_CycloneDDS.json
文件按照以上图片序号顺序依次运行对应的脚本,需要等待上一个脚本完成后再,再运行下一脚本
方式二:使用传统方式安装
安装相关依赖
- $ sudo apt update && sudo apt install -y \
- build-essential \
- cmake \
- git \
- python3-colcon-common-extensions \
- python3-flake8 \
- python3-pip \
- python3-pytest-cov \
- python3-rosdep \
- python3-setuptools \
- python3-vcstool \
- wget
CycloneDDS
配置$ echo "export CYCLONEDDS_URI='<CycloneDDS><Domain><General><DontRoute>true</></></></>'" >> ~/.bashrc
- $ sudo apt update
- $ sudo apt install ros-galactic-turtlebot4-description \
- ros-galactic-turtlebot4-msgs \
- ros-galactic-turtlebot4-navigation \
- ros-galactic-turtlebot4-node \
- ros-galactic-turtlebot4-robot \
- ros-galactic-turtlebot4-desktop \
- ros-galactic-turtlebot4-simulator \
- ros-galactic-irobot-create-nodes
- $ mkdir -p ~/ros2_tb4_ws/src
- $ cd ~/ros2_tb4_ws/src
- $ git clone -b galactic https://ghproxy.com/https://github.com/turtlebot/turtlebot4.git
- $ git clone -b galactic https://ghproxy.com/https://github.com/iRobotEducation/create3_sim.git
- $ git clone -b galactic https://ghproxy.com/https://github.com/iRobotEducation/irobot_create_msgs.git
- $ git clone -b galactic https://ghproxy.com/https://github.com/turtlebot/turtlebot4_robot.git
- $ git clone -b main https://ghproxy.com/https://github.com/luxonis/depthai-ros
- $ git clone -b main https://ghproxy.com/https://github.com/luxonis/depthai-ros-examples.git
- $ git clone -b galactic https://ghproxy.com/https://github.com/turtlebot/turtlebot4_desktop.git
- $ git clone -b galactic https://ghproxy.com/https://github.com/turtlebot/turtlebot4_simulator.git
- $ cd ~/ros2_tb4_ws
- $ rosdep install --from-path src -yi
- $ source /opt/ros/galactic/setup.bash
- $ colcon build --symlink-install
- $ echo "source ~/ros2_tb4_ws/install/local_setup.bash" >> ~/.bashrc
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。