蓝桥ROS机器人之ROS程序和普通程序以及APP/API等

本文探讨了ROS程序与普通程序的区别,解释了ROS应用及接口的概念,并通过一系列实验操作展示了如何利用ROS进行节点间的通信,包括发布者和订阅者的设置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

有个问题记录一下:

  • ROS程序和普通程序有什么区别?
  • 什么是ROS应用?什么是ROS接口?

第一个问题,本质上没有区别的。

使用上有一些区别罢了。

第二个问题,pub或sub都支持很多模式,自己写个聊天工具都不难的。

命令行接口查看

图形化接口查看 

当然直接写个sub也行的。

 

这里直接在云课中使用古月居21讲内容。

蓝桥ROS机器人之古月居ROS入门21讲

推荐学生阅读(2019年左右一篇文章):

互联网下半场:从超级入口到超级接口,从超级APP到超级API


shiyanlou:~/ $ history                                               [16:03:39]
    1  git clone https://github.com/rapiz1/DungeonRush.git
    2  apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev
    3  sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev
    4  w
    5  sudo apt update
    6  sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev
    7  ls
    8  cd DungeonRush
    9  ls
   10  cmake -B build && cmake --build build
   11  mkdir build
   12  cmake -B build && cmake --build build
   13  cd build
   14  cmake ..
   15  make 
   16  cd bin
   17  ls
   18  ./dungeon_rush
   19  cd ..
   20  make
   21  cd bin
   22  ./dungeon_rush
   23  cd ..
   24  make
   25  cd bin
   26  ./dungeon_rush
   27  git clone https://gitcode.net/ZhangRelay/ros_book.git
   28  unzip ros_21_tutorials-master.zip
   29  cd ros_ws
   30  catkin_make
   31  cal
   32  w
   33  source devel/setup.zsh
   34  rosrun learning_topic person_publisher
   35  roscore
   36  rostopic list
   37  rosnode list
   38  rostopic
   39  rostopic info /person_info
   40  source devel/setup.bash
   41  source devel/setup.zsh
   42  rosrun learning_topic person_subscriber
   43  rostopic info /person_info
   44  ./person_publisher
   45  rosrun learning_topic person_publisher
   46  ./person_subscriber
   47  rosrun learning_topic person_publisher
   48  ./person_subscriber
   49  ./person_publisher
   50  rostopic echo /person_info
   51  rqt
   52  ./person_subscriber
   53  rostopic list
   54  rostopic pub /person_info learning_topic/Person "name: 'csgl'\nage: 62\nsex: 0"
   55  rqt
shiyanlou:~/ $                                                       [16:03:44]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zhangrelay

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值