Unity-ROS 笔记

1.unity配置

  略

2.Ubuntu - wsl

  略

3.设置ROS

  略

4.设置 ROS Websocket

对于 ROS1

 

# Install rosbridge_suite
sudo apt-get install ros-noetic-rosbridge-suite

# Launch ROS 1 websocket
roslaunch rosbridge_server rosbridge_websocket.launch

如果报错:
RLException[rosbridge_websocket.launch] is neither a launch file in package [rosbridge_server]
切换到工作目录:
cd xxxx_ws
然后

 source install/setup.bash
再执行
roslaunch rosbridge_server rosbridge_websocket.launch

5.为 Unity 安装 ROS#(推荐使用packagemanager的 “Add package from git URL” 选项,因为这样可以方便加载官方的示例Sample)

 

6.Subscribing to a ROS Topic

rostopic pub /test std_msgs/String "data: 'Hello ROS#'"

7.Writing a Custom Publisher

rostopic echo /test2

 

 
posted @ 2024-12-19 11:41  zerozabuu  阅读(12)  评论(0编辑  收藏  举报