24小时热门版块排行榜    

Znn3bq.jpeg
查看: 499  |  回复: 0

yadan33

新虫 (初入文坛)

[交流] ROS基本node,massage

基本概念:
Nodes: A node is an executable that uses ROS to communicate with other nodes.
Messages: ROS data type used when subscribing or publishing to a topic.
Topics: Nodes can publish messages to a topic as well as subscribe to a topic to receive messages.
Master: Name service for ROS (i.e. helps nodes find each other)
rosout: ROS equivalent of stdout/stderr
roscore: Master + rosout + parameter server (parameter server will be introduced later)


Client Libraries
ROS client libraries allow nodes written in different programming languages to communicate:

rospy = python client library
roscpp = c++ client library

$ roscore
如果权限不够
$ sudo chown -R <your_username> ~/.ros

开一个新的终端
$ rosnode list

再开一个
$ rosrun [package_name] [node_name]

$ rosrun turtlesim turtlesim_node

$ rosnode
改node名字
$ rosrun turtlesim turtlesim_node __name:=my_turtle

可以ping一下
$ rosnode ping my_turtle

roscore = ros+core : master (provides name service for ROS) + rosout (stdout/stderr) + parameter server (parameter server will be introduced later)
rosnode = ros+node : ROS tool to get information about a node.
rosrun = ros+run : runs a node from a given package.
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 yadan33 的主题更新
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 调剂求收留 +27 果然有我 2026-04-10 28/1400 2026-04-12 15:32 by 89436494
[考研] 一志愿085802 323分求调剂 +9 drizzle_9 2026-04-12 10/500 2026-04-12 14:51 by drizzle_9
[考研] 271求调剂 +21 2261744733 2026-04-11 21/1050 2026-04-11 20:19 by Angchemist
[考研] 11408。358求调剂 +3 TMYzds 2026-04-07 3/150 2026-04-11 17:10 by 氮气气气
[考研] 366求调剂 +7 不知名的小卅 2026-04-11 7/350 2026-04-11 16:45 by PeggyPeng17
[考研] 本人女孩 +7 吼吼, 2026-04-10 9/450 2026-04-11 14:45 by ACS Nano——
[考研] 085410 273分调剂 +4 X1999 2026-04-09 4/200 2026-04-11 13:05 by pies112
[考研] 087100初试311求调剂 +4 任雅琴 2026-04-09 4/200 2026-04-11 10:33 by zhq0425
[考研] 283求调剂,工科! +12 苏打水7777 2026-04-08 12/600 2026-04-11 10:28 by 逆水乘风
[考研] 282,求调剂 +12 jggshjkkm 2026-04-09 14/700 2026-04-11 09:39 by 猪会飞
[考研] 085800 能源动力求调剂 +6 阿biu啊啊啊啊啊 2026-04-10 6/300 2026-04-10 15:03 by hemengdong
[考研] 调剂申请086000一志愿西北农林科技大学生物与医药320分-本科齐鲁工业大学 +3 美美女士 2026-04-09 3/150 2026-04-10 10:31 by liuhuiying09
[考研] 本科西工大 0856 324求调剂 +10 wysyjs25 2026-04-09 11/550 2026-04-10 08:37 by 5268321
[考研] 0703化学求调剂 +21 不知名的小卅 2026-04-08 21/1050 2026-04-09 18:55 by l_paradox
[考研] 求调剂希望还是希望在山河四省附近 +3 快乐的小白鸽 2026-04-05 3/150 2026-04-09 17:36 by wp06
[考研] 一志愿西南大学生物学学硕344 求生物学相关调剂/生物与医药 +7 超人不会飞@ 2026-04-08 7/350 2026-04-09 09:35 by gong120082
[考研] 296求调剂 +3 汪!?! 2026-04-08 3/150 2026-04-08 22:00 by zhouyuwinner
[考研] 327求调剂 +12 Xxjc1107. 2026-04-06 12/600 2026-04-08 16:46 by luoyongfeng
[考研] 338求调剂 +8 wxygxsaaaaa 2026-04-06 8/400 2026-04-08 06:58 by 无际的草原
[考研] 一志愿河北工业大学材料工程,初试344求专硕调剂 +6 15933906766 2026-04-05 6/300 2026-04-06 13:21 by 无际的草原
信息提示
请填处理意见