ROS1 kinetic+melodic+noetic,可以直接互通,c++程序全部通用的。
按:ROS1/2机器人多机网络通信配置-更新-2022
talker-listener
手机端发布,电脑端接收
电脑端发布,手机端接收。
python乱码:
rostopic pub -r 1 /chatter std_msgs/String "data: '做一个欢乐的机器人,很难吗^_^'"
乱码如下:
使用c++:
中文支持,哇卡卡!
当然如果源码编译肯定ok的。
发和收都是ok。
1815 sudo apt install remmina remmina-plugin-vnc
1816 ifconfig
1817 ping 192.168.8.111
1818 rostopic list
1819 sudo apt install ros-noetic-fkie-multimaster
1820 sudo apt install ros-noetic-fkie-node-manager
1821 sudo apt install ros-noetic-fkie-potree-rviz-plugin
1822 sudo apt install ros-noetic-fkie-master-sync
1823 hostname
1824 roscore
1825 rosrun turtlesim turtle_teleop_key
1826 sudo apt install ros-noetic-fkie-master-discovery
1827 roscore
1828 export ROS_IP=192.168.8.100
1829 roscore
1830 gedit .bashrc
1831 rosrun master_discovery_fkie master_discovery
1832 rosrun fkie_master_discovery master_discovery
1833 rosrun master_discovery_fkie master_discovery
1834 rosrun fkie_master_discovery master_discovery
1835 rosrun fkie_master_discovery master_discovery _robot_host=[192.168.8.111]
1836 rosrun fkie_master_discovery master_discovery _robot_host:=[192.168.8.111]
1837 rosrun fkie_master_discovery master_discovery _robot_hosts:=[192.168.8.111]
1838 rosrun fkie_node_manager_daemon node_manager_daemon
1839 rosrun fkie_node_manager node_manager
1840 sudo apt install python3-grpcio python3-grpc-tools
1841 rosrun fkie_node_manager node_manager
1842 rosrun fkie_node_manager_daemon node_manager_daemon
1843 rosrun fkie_master_sync master_sync
1844 ping 192.168.8.111
1845 rosrun fkie_node_manager remote_nm.py
1846 rostopic list
1847 rostopic echo /master_discovery/linkstats
1848 node_manager
1849 rosrun turtlesim turtlesim_node
1850 node_manager
1851 sudo apt install ros-noetic-fkie-multimaster
1852 sudo apt install python3-grpcio python3-grpc-tools
1853 gedit
1854 node_manager
1855 ifconfig
1856 sudo gedit /etc/hosts
1857 sudo gedit /etc/hostname
1858 sudo gedit /etc/hosts
1859 gedit
1860 roscore
1861 ping ubuntu-phablet
1862 roscore
1863 rosrun turtlesim turtlesim_node
1864 rostopic list
1865 rosrun fkie_master_discovery master_discovery _robot_hosts:=[192.168.8.111]
1866 rosrun usb_cam usb_cam_node
1867 roslaunch usb_cam usb_cam-test.launch
1868 rosrun roscpp_tutorials talker
1869 rosrun roscpp_tutorials listener
1870 rosrun roscpp_tutorials talker
1871 rostopic pub -r 1 /chatter std_msgs/String "data: '做一个欢乐的机器人,很难吗^_^'"
1872 rqt
1873 rostopic echo /chatter /
1874 rostopic echo /chatter
1875 rosrun roscpp_tutorials listener
本文摘自 :https://blog.51cto.com/u