前往小程序,Get更优阅读体验!
立即前往
发布
社区首页 >专栏 >​[ROS2]源码安装turtlebot3用于调试(简易版)

​[ROS2]源码安装turtlebot3用于调试(简易版)

原创
作者头像
首飞
发布2022-04-13 19:59:37
发布2022-04-13 19:59:37
5450
举报
文章被收录于专栏:ROS2ROS2

ROS2源码安装turtlebot3用于调试(简易版)

下面的操作是基于ROS2 galactic

turtlebot3的代码下载:

安装git,编译工具和下载源代码

代码语言:shell
复制
sudo apt-get install git python3-vcstool build-essential python3-colcon-common-extensions
mkdir -p turtlebot3_ws/src
cd turtlebot3_ws/
git clone https://ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3.git src/turtlebot3 -b galactic-devel
git clone https://ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git src/turtlebot3_msgs -b galactic-devel
git clone https://ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git src/turtlebot3_simulations -b galactic-devel

注意:链接中的https://ghproxy.com/ 为使用代理下载github代码。

可选使用vcs工具下载源码:

安装vcs

代码语言:text
复制
sudo apt-get install python3-vcstool

在turtlebot3_ws目录下新建tmp.repos 。复制下面的内容到该文件并保存。

代码语言:YAML
复制
repositories:
  turtlebot3:
    type: git
    url: https://ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3.git
    version: galactic-devel
  turtlebot3_msgs:
    type: git
    url: https://ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
    version: galactic-devel
  turtlebot3_simulations:
    type: git
    url: https://ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
    version: galactic-devel

turtlebot3_ws目录下运行

代码语言:shell
复制
vcs import src < tmp.repos

解决依赖

代码语言:shell
复制
rosdep update

rosdep install --from-paths src --ignore-src --rosdistro galactic -yr
sudo apt-get install ros-galactic-gazebo-*

编译

代码语言:shell
复制
colcon build --symlink-install

在turtlebot3_ws目录下source编译好的程序

代码语言:shell
复制
source install/setup.bash

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • turtlebot3的代码下载:
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档