本地發布ROS包

2021-10-01 07:12:19 字數 1719 閱讀 4689

需求:本地構建ros包,生成.deb檔案

$ sudo apt-get install python-bloom

$ cd path/to/your/catkin/package

$ bloom-generate rosdebian --os-name ubuntu --os-version xenial --ros-distro kinetic

$ fakeroot debian/rules binary

3.1 對於只依賴於ros的package,bloom-generate 命令一般不會出現問題。但是如果我們包 my_package

依賴於自己的另外乙個包,如 my_private_package1,此時bloom-generate構建my_package時,一般會

出現 rosdep 錯誤,解決方法:

新建檔案 private.yaml (位置隨意),內容如下:

my_private_package1:

ubuntu: ros-kinetic-my-private-package1

然後將private.yaml檔案路徑追加到 /etc/ros/rosdep/sources.list.d/20-default.list

# os-specific listings first

yaml osx

yaml file:///home/user/rosdep/private.yaml

執行 rosdep update 後再執行 bloom-generate 命令,可解決rosdep問題。

3.2 對於wsl系統,fakeroot 命令可能會出現 sysv ipc 錯誤,解決方法:

update-alternatives --set fakeroot /usr/bin/fakeroot-tcp

package本地生成的.deb檔案,安裝後即可使用,但要注意package下cmakelist.txt 的 install 部分,一般有如下部分:

# specifying installable targets

install(targets package_node

runtime destination $

)# installing header files

install(directory include/$/

destination $

pattern ".svn" exclude

)install(directory include/

destination $

pattern ".svn" exclude

)# check launch file

if(catkin_enabled_testing)

find_package(roslaunch required)

roslaunch_add_file_check(launch)

endif()

# installing roslaunch files or other resources

install(directory launch images

destination $

pattern ".svn" exclude

)

ROS 靜態TF發布

pkg tf type static transform publisher name link1 link2 broadcaster args x y z qx qy qz qx link1 link2 100 launch x y z 代表link2相對與link1的位置變換。qx qy qz ...

ros發布節點資訊python 初識ROS

ros是機械人作業系統,英文 robot operation system 的簡稱。ros自帶工具,為某些功能包安裝系統依賴,同時也是某些ros核心功能包所必須用到的工具。有時候安裝不成功,好像也沒啥影響 應用層 有乙個管理者 master,其它功能包內模組以節點為單位執行,以ros標準的輸入輸出為...

ROS 用catkin建立ROS包 編譯

安裝好ros後,預設已經安裝了catkin,接著執行以下步驟 用catkin建立ros包 每次都要進入這個目錄,也就是所有的包都要放在這個目錄下 cd catkin ws src catkin create pkg 建立包的命令 hello 包的名字 std msgs roscpp 依賴庫,如果不清...