ROS1/2机器人多机网络通信配置-更新-2022
2016年ROS1:在多台PC上进行ROS通讯(在多台远程机器人或电脑上运行ROS)
2019年ROS2:ROS2网络多机通信DDS和安全加密SROS(多机器人系统)
ROS2配置非常简单,注意事项为:如果是局域网,只需确保ROS_DOMAIN_ID一致即可。
如果是单片机需要micro-ros:
micro-ROS之esp32与ros2资料(freertos)
本文补充内容:x86和ARM,树莓派通用,类似pc+pc模式的ROS1。
主机:
从机:
使用工具multimaster-fkie:
为了保证配置顺利,需要仔细阅读原英文文档!
功能包安装:
ros@ros:~$ sudo apt install ros-noetic-fkie-
ros-noetic-fkie-master-discovery
ros-noetic-fkie-master-sync
ros-noetic-fkie-message-filters
ros-noetic-fkie-message-filters-dbgsym
ros-noetic-fkie-multimaster
ros-noetic-fkie-multimaster-msgs
ros-noetic-fkie-node-manager
ros-noetic-fkie-node-manager-daemon
ros-noetic-fkie-potree-rviz-plugin
ros-noetic-fkie-potree-rviz-plugin-dbgsym
ros@ros:~$ sudo apt install ros-noetic-fkie-
ros@ros:~$ rosrun fkie_master_discovery master_discovery _robot_hosts:=[192.168.8.111]
[INFO] [1652091021.942514]: ROS Master URI: http://localhost:11311
[INFO] [1652091021.966031]: Check the ROS Master[Hz]: 1
[INFO] [1652091021.970818]: Heart beat [Hz]: 0.02
[INFO] [1652091021.974751]: Active request after [sec]: 60
[INFO] [1652091021.978513]: Remove after [sec]: 300
[INFO] [1652091021.980809]: Robot hosts: ['192.168.8.111']
[INFO] [1652091021.982873]: Approx. mininum avg. network load: 2.72 bytes/s
[INFO] [1652091021.994576]: Start RPC-XML Server at ('0.0.0.0', 11611)
[INFO] [1652091021.998362]: hide_nodes: []
[INFO] [1652091022.001659]: hide_topics: []
[INFO] [1652091022.005370]: hide_services: []
[INFO] [1652091022.007446]: Subscribe to parameter `/roslaunch/uris`
[INFO] [1652091022.134259]: Detected master discovery: http://192.168.8.100:11611
[INFO] [1652091022.242523]: Added master with ROS_MASTER_URI=http://192.168.8.100:11311/
需要配置正确,可以参考官方和相关博客!
常见问题:
github.com/fkie/multimaster_fkie/issues/144
文章来源: zhangrelay.blog.csdn.net,作者:zhangrelay,版权归原作者所有,如需转载,请联系作者。
原文链接:zhangrelay.blog.csdn.net/article/details/124669179
- 点赞
- 收藏
- 关注作者
评论(0)