当前位置:网站首页>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 :
边栏推荐
- PIP installation module, error
- [training Day1] spy dispatch
- 天翼云Web应用防火墙(边缘云版)支持检测和拦截Apache Spark shell命令注入漏洞
- 线性表的顺序存储结构——顺序表
- CentOS installs docker and MySQL and redis environments
- Pay attention to the traffic safety warning of tourism passenger transport issued by the Ministry of public security
- 一文详解吞吐量、QPS、TPS、并发数等高并发指标
- We were tossed all night by a Kong performance bug
- ACL实验演示(Huawei路由器设备配置)
- How to assemble a registry?
猜你喜欢

Heavy! The 2022 China open source development blue book was officially released

Diagram of seven connection modes of MySQL

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

【集训Day2】Sculpture

AI遮天传 ML-无监督学习

Come on developer! Not only for the 200000 bonus, try the best "building blocks" for a brainstorming

(25) top level menu of blender source code analysis blender menu

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

Centos安装docker以及mysql和redis环境
![Leetcode:1206. design jump table [jump table board]](/img/4f/2b6df8e2151b8bce70c8227c69d8bc.png)
Leetcode:1206. design jump table [jump table board]
随机推荐
COSCon'22城市/学校/机构出品人征集令
兆骑科创海外高层次人才引进平台,创业赛事活动路演
来吧开发者!不只为了 20 万奖金,试试用最好的“积木”来一场头脑风暴吧!...
Centos安装docker以及mysql和redis环境
深度学习实验:Softmax实现手写数字识别
The diagram of user login verification process is well written!
After vs code is formatted, the function name will be automatically followed by a space
[day3] reconstruction of roads
【机器学习】Mean Shift原理及代码
解决哈希冲突的几种方式
长征证券开户安全吗?
Pytest (mind map)
跨站点请求伪造(CSRF)
Gan (generative adversarial network, GaN) generative countermeasure network
On the growth of data technicians
AI遮天传 DL-回归与分类
Coscon'22 city / school / institution producer solicitation order
[template] segment tree 1
【云原生】 iVX 低代码开发 引入腾讯地图并在线预览
一文详解吞吐量、QPS、TPS、并发数等高并发指标