概述
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
最后
以上就是真实店员为你收集整理的ROS指令的全部内容,希望文章能够帮你解决ROS指令所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复