ros2常用功能
创建包
ros2 pkg create --build-type ament_cmake --node-name my_node my_package --license Apache-2.0
colcon
命令使用tab补齐
echo "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" >> ~/.bashrc
常用便捷命令
-
--packages-up-to
builds the package you want, plus all its dependencies, but not the whole workspace (saves time) -
--symlink-install
saves you from having to rebuild every time you tweak python scripts -
--event-handlers console_direct+
shows console output while building (can otherwise be found in thelog
directory) -
--packages-select my_package
参数、launch文件修改后无需重新build
启用--symlink-install
后将不会把文拷贝到install目录,而是通过创建符号链接的方式。修改参数和launch文件后无需重新编译程序。
the option --symlink-i