当前位置:网站首页>6、 Common commands of ROS (I): rosnode, rostopic, rosmsg
6、 Common commands of ROS (I): rosnode, rostopic, rosmsg
2022-07-26 17:54:00 【Rock magnon】
List of articles
1、rosnode: Node query , Operation command
1. rosnode ping talker( The node name )
- Test the connectivity to the node
- Return results :
rosnode ping talker rosnode: node is [/talker] pinging /talker with a timeout of 3.0s xmlrpc reply from http://d102-W65KJ1-KK1:35707/ time=0.540018ms xmlrpc reply from http://d102-W65KJ1-KK1:35707/ time=1.176357ms
2. rosnode list
- List active nodes
- Return results :
rosnode list /listener /rosout /talker
3. rosnode info talker( The node name )
- Query node information
- Return results :
rosnode info talker -------------------------------------------------------------------------------- Node [/talker] Publications: * /chatter [std_msgs/String] * /rosout [rosgraph_msgs/Log] Subscriptions: None Services: * /talker/get_loggers * /talker/set_logger_level contacting node http://d102-W65KJ1-KK1:35707/ ... Pid: 7033 Connections: * topic: /rosout * to: /rosout * direction: outbound (39331 - 127.0.0.1:57890) [11] * transport: TCPROS * topic: /chatter * to: /listener * direction: outbound (39331 - 127.0.0.1:59130) [12] * transport: TCPROS
4. rosnode machin d102-W65KJ1-KK1( Device name )
- Lists the nodes on the specified device :ros Distributed control , Different nodes may be running on each device
- Return results :
rosnode machine d102-W65KJ1-KK1 /rosout
5. rosnode kill listener( The node name )
- Kill a node
- Return results :
rosnode kill listener killing /listener killed
6. rosnode cleanup
- Kill zombie nodes
- Return results : nothing
2、rostopic: Topic inquiry , Operation command
1. rostopic list (-v)
- Print the topic name in the current running state ,-v Get topic details
- Return results :
rostopic list /chatter /rosout /rosout_aggrostopic list -v Published topics: * /rosout_agg [rosgraph_msgs/Log] 1 publisher * /rosout [rosgraph_msgs/Log] 2 publishers * /chatter [public_massage/Person] 1 publisher Subscribed topics: * /rosout [rosgraph_msgs/Log] 1 subscriber * /chatter [public_massage/Person] 1 subscriber
2. rostopic pub Topic name Message type The message content
- Publish messages to subscribers through commands Remember source Next path , among , The topic name needs to be written by yourself , Message type and message content , Can pass TAB Key completion
- Return results :
Set the release frequency :rostopic pub chatter public_massage/Person "name: 'xiaomage' age: 13 height: 10.0" publishing and latching message. Press ctrl-C to terminaterostopic pub -r 10 chatter public_massage/Person "name: 'sd' age: 5 height: 0.30"
3. rostopic echo Topic name
- Get the message posted on the specified topic , Be sure to agree to the workspace , Other orders are required
- Return results :
rostopic echo chatter name: "xiaomage" age: 37 height: 1.78 --- name: "xiaomage" age: 38 height: 1.78 --- name: "xiaomage" age: 39 height: 1.78 ---
4. rostopic info Topic name
- Get information about the current topic
- Return results :
rostopic info chatter Type: public_massage/Person Publishers: * /talker (http://d102-W65KJ1-KK1:37521/) Subscribers: * /listener (http://d102-W65KJ1-KK1:44919/)
5. rostopic type Topic name
- Get the message type of the topic
- Return results :
rostopic type chatter public_massage/Person
6. rostopic find Message type
- Find topics according to the message type
- Return results :
rostopic find public_massage/Person /chatter
7. rostopic hz Topic name
- List the frequency of news release
- Return results :
rostopic hz chatter subscribed to [/chatter] no new messages average rate: 1.000 min: 1.000s max: 1.000s std dev: 0.00000s window: 2
8. rostopic bw Topic name
- List the message publishing bandwidth
- Return results :
rostopic bw chatter subscribed to [/chatter] average: 27.14B/s mean: 22.00B min: 22.00B max: 22.00B window: 2
3、rosmsg: Show message types , Information
1. rosmsg list
- List current ros All of the msg
- Return results : Package name / Data format name
visualization_msgs/Marker visualization_msgs/MarkerArray visualization_msgs/MenuEntry
2. rosmsg packages
- List all packages that contain messages
- Return results :
actionlib actionlib_msgs actionlib_tutorials bond control_msgs controller_manager_msgs diagnostic_msgs
3. rosmsg package Package name
- List all under a package msg
- Return results :
rosmsg package public_massage public_massage/Person
4. rosmsg show Package name / Data name
- Displays the message description
- Return results :
rosmsg show public_massage/Person string name uint16 age float64 height
5. rosmsg info Package name / Data name
- Displays the message description
- Return results :
osmsg info public_massage/Person string name uint16 age float64 height
6. rosmsg md5
- Unknown
- Return results :
边栏推荐
- Familiarize you with the "phone book" of cloud network: DNS
- [virtual machine data recovery] data recovery cases in which XenServer virtual machine is unavailable due to accidental power failure and virtual disk files are lost
- [300 opencv routines] 240. Shi Tomas corner detection in opencv
- A detailed explanation of throughput, QPS, TPS, concurrency and other high concurrency indicators
- 236. The nearest common ancestor of a binary tree
- On the growth of data technicians
- ACL实验演示(Huawei路由器设备配置)
- After vs code is formatted, the function name will be automatically followed by a space
- 【集训Day3】section
- Pay attention to the traffic safety warning of tourism passenger transport issued by the Ministry of public security
猜你喜欢

AI zhetianchuan ml integrated learning

【机器学习】Mean Shift原理及代码

得不偿失!博士骗领210万元、硕士骗领3万元人才补贴,全被判刑了!

Tianyi cloud web application firewall (edge cloud version) supports the detection and interception of Apache spark shell command injection vulnerabilities

RedisDesktopManager去除升级提示

Analysis of interface testing

Overview of the agenda of the keynote speech of apachecon Asia, an international celebrity vs a local open source star

ASEMI整流桥KBPC3510,KBPC3510封装,KBPC3510应用
![[training day3] delete](/img/7b/40bfb7710427696a27796428d849ba.png)
[training day3] delete

ACL experiment demonstration (Huawei router device configuration)
随机推荐
来吧开发者!不只为了 20 万奖金,试试用最好的“积木”来一场头脑风暴吧!...
图扑 3D 可视化国风设计 | 科技与文化碰撞炫酷”火花“
JS 递归 斐波那契数列 深克隆
Pay attention to the traffic safety warning of tourism passenger transport issued by the Ministry of public security
6-19 vulnerability exploitation -nsf to obtain the target password file
Performance tuning bugs emerge in endlessly? These three documents can easily handle JVM tuning
解决哈希冲突的几种方式
[300 opencv routines] 240. Shi Tomas corner detection in opencv
硬件开发与市场产业
如何组装一个注册中心?
AI zhetianchuan DL regression and classification
2.1.2 synchronization always fails
Open source kaggle cat and dog data set -- used in classic CNN classification practice
Spark data format unsafe row
(24) the top menu of blender source code analysis shows code analysis
SQL中去去重的三种方式
【云原生】 iVX 低代码开发 引入腾讯地图并在线预览
6-19漏洞利用-nsf获取目标密码文件
【集训Day2】Sculpture
常用超好用正则表达式!