Creating a workspace — ROS 2 Documentation: Foxy documentation
ubuntu 通过debian安装后,
在工作目录下ws/src下
git clone https://github.com/ros/ros_tutorials.git -b foxy-devel
-b foxy-devel //指定分支名
下载工程到ws/src/下
sudo apt install python3-rosdep2
rosdep update
colcon build -h
查看编译选项
colcon build --packages-select my_package
--packages-up 《xxx》
to
builds the package you want, plus all its dependencies, but not the whole workspace (saves time)
注意这个是package名,不是文件夹名
在ws下:
. install/local_setup.bash ,引入你的环境变量,叠在系统上面。
保留了系统的同时,你的工作空间也可以工作。