本文主要是介绍[ROS2]源码安装turtlebot3用于调试(简易版),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
[ROS2]源码安装turtlebot3用于调试(简易版)
下面的操作是基于galactic
turtlebot3的代码下载:
安装git和编译工具
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
sudo apt-get install python3-vcstool
在turtlebot3_ws目录下新建tmp.repos 。复制下面的内容到该文件并保存。
repositories:turtlebot3:type: giturl: https://ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3.gitversion: galactic-develturtlebot3_msgs:type: giturl: https://ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3_msgs.gitversion: galactic-develturtlebot3_simulations:type: giturl: https://ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3_simulations.gitversion: galactic-devel
turtlebot3_ws目录下运行
vcs import src < tmp.repos
解决依赖
rosdep updaterosdep install --from-paths src --ignore-src --rosdistro galactic -yr
sudo apt-get install ros-galactic-gazebo-*
编译
colcon build --symlink-install
在turtlebot3_ws目录下source编译好的程序
source install/setup.bash
关注公众号《首飞》回复“机器人”获取精心推荐的C/C++,Python,Docker,Qt,ROS1/2等机器人行业常用技术资料。
这篇关于[ROS2]源码安装turtlebot3用于调试(简易版)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!