ROS指令

1、创建工作空间并编译

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws
$ catkin_make

2、使工作空间在当前Shell中完全生效

$ source devel/setup.bash

3、寻找包路径

$ rospack find [包名称]

4、切换到制定包的路径下

$ roscd [本地包名称[/子目录]]

5、列出制定位置下的文件以及目录

$ rosls [locationname[/subdir]]

6、创建包

$ roscreate-pkg [package_name] [depend1] [depend2] [depend3]
$ catkin_create_pkg <package_name> [depend1] [depend2] [depend3]

7、查看包依赖

$ rospack depends1 rospy

8、编译包

$ rosmake [package1] [package2] [package3]

9、列出当前运行的节点

$ rosnode list

10、查看指定节点的信息

$ rosnode info [node name]

11、运行一个包内的某个节点

$ rosrun [package_name] [node_name]

12、查看节点图

$ rosrun rqt_graph rqt_graph

13、查看对话题操作的相关指令

$ rostopic -h
Commands:
rostopic bw display bandwidth used by topic
rostopic delay display delay of topic from timestamp in header
rostopic echo print messages to screen
rostopic find find topics by type
rostopic hz display publishing rate of topic
rostopic info print information about active topic
rostopic list list active topics
rostopic pub publish data to topic
rostopic type print topic or field type

Type rostopic -h for more detailed usage, e.g. ‘rostopic echo -h’

14、查看话题列表相关指令

$ rostopic list -h
Usage: rostopic list [/namespace]

Options:
-h, --help show this help message and exit
-b BAGFILE, --bag=BAGFILE
list topics in .bag file
-v, --verbose list full details about each topic
-p list only publishers
-s list only subscribers
–host group by host name

15、查看话题所发布的消息类型

$ rostopic type [topic]

16、查看消息详细情况

$ rosmsg show [message type]

17、实时显示发布到某个话题上的数据变化图形

$ rosrun rqt_plot rqt_plot

18、查看服务相关的指令

$ rosservice -h
Commands:
rosservice args print service arguments
rosservice call call the service with the provided args
rosservice find find services by service type
rosservice info print information about service
rosservice list list active services
rosservice type print service type
rosservice uri print service ROSRPC uri

Type rosservice -h for more detailed usage, e.g. ‘rosservice call -h’

原文链接:https://blog.csdn.net/sinat_36502563/article/details/87736504

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值