Toriyung

导航

ros2:手动编译包

首先需要colcon库支持
sudo apt install python3-colcon-common-extensions

 

github上拉个包(这里使用示例程序)

git clone https://github.com/ros2/examples src/examples -b foxy

其中-b foxy代表选择foxy版本分支

 

编译

colcon build

 

进入包所在目录

cd /src/examples

 

 执行 install/setup.bash 脚本文件,并将其中定义的环境变量、函数等应用到当前的 Shell 中

source install/setup.bash

 

然后就可以使用ros2指令执行包的功能了

 

posted on 2024-03-23 13:08  Toriyung  阅读(31)  评论(0编辑  收藏  举报