没有合适的资源?快使用搜索试试~ 我知道了~
首页ROS cheatsheet ROS命令大全
ROS cheatsheet ROS命令大全
需积分: 14 188 浏览量
更新于2023-05-26
评论 1
收藏 1.29MB PDF 举报
ROS cheatsheet ROS命令大全,记住ROS 命令参考指南。
资源详情
资源评论
资源推荐

ROS Indigo Cheatsheet
Filesystem Management Tools
rospack A tool for inspecting packages.
rospack profile Fixes path and pluginlib problems.
roscd Change directory to a package.
rospd/rosd Pushd equivalent for ROS.
rosls Lists package or stack information.
rosed Open requested ROS file in a text editor.
roscp Copy a file from one place to another.
rosdep Installs package system dependencies.
roswtf Displays a errors and warnings about a
running ROS system or launch file.
catkin create pkg Creates a new ROS stack.
wstool Manage many repos in workspace.
catkin make Builds a ROS catkin workspace.
rqt dep Displays package structure and depen-
dencies.
Usage:
$ rospack find [package]
$ roscd [package[/subdir]]
$ rospd [package[/subdir] | +N | -N]
$ rosd
$ rosls [package[/subdir]]
$ rosed [package] [file]
$ roscp [package] [file] [destination]
$ rosdep install [package]
$ roswtf or roswtf [file]
$ catkin create pkg [package name] [depend1]..[dependN]
$ wstool [init | set | update]
$ catkin make
$ rqt dep [options]
Start-up and Process Launch Tools
roscore
The basis nodes and programs for ROS-based systems. A
roscore must be running for ROS nodes to communicate.
Usage:
$ roscore
rosrun
Runs a ROS package’s executable with minimal typing.
Usage:
$ rosrun package name executable name
Example (runs turtlesim):
$ rosrun turtlesim turtlesim node
roslaunch
Starts a roscore (if needed), local nodes, remote nodes via
SSH, and sets parameter server parameters.
Examples:
Launch a file in a package:
$ roslaunch package name file name.launch
Launch on a different port:
$ roslaunch -p 1234 package name file name.launch
Launch on the local nodes:
$ roslaunch --local package name file name.launch
Introspection and Command Tools
rosnode
Displays debugging information about ROS nodes, including
publications, subscriptions and connections.
Commands:
rosnode ping Test connectivity to node.
rosnode list List active nodes.
rosnode info Print information about a node.
rosnode machine List nodes running on a machine.
rosnode kill Kill a running node.
Examples:
Kill all nodes:
$ rosnode kill -a
List nodes on a machine:
$ rosnode machine aqy.local
Ping all nodes:
$ rosnode ping --all
rostopic
A tool for displaying information about ROS topics, including
publishers, subscribers, publishing rate, and messages.
Commands:
rostopic bw Display bandwidth used by topic.
rostopic echo Print messages to screen.
rostopic find Find topics by type.
rostopic hz Display publishing rate of topic.
rostopic info Print information about an active topic.
rostopic list List all published topics.
rostopic pub Publish data to topic.
rostopic type Print topic type.
Examples:
Publish hello at 10 Hz:
$ rostopic pub -r 10 /topic name std msgs/String hello
Clear the screen after each message is published:
$ rostopic echo -c /topic name
Display messages that match a given Python expression:
$ rostopic echo --filter "m.data==’foo’" /topic name
Pipe the output of rostopic to rosmsg to view the msg type:
$ rostopic type /topic name | rosmsg show
rosservice
A tool for listing and querying ROS services.
Commands:
rosservice list Print information about active services.
rosservice node Print name of node providing a service.
rosservice call Call the service with the given args.
rosservice args List the arguments of a service.
rosservice type Print the service type.
rosservice uri Print the service ROSRPC uri.
rosservice find Find services by service type.
Examples:
Call a service from the command-line:
$ rosservice call /add two ints 1 2
Pipe the output of rosservice to rossrv to view the srv type:
$ rosservice type add two ints | rossrv show
Display all services of a particular type:
$ rosservice find rospy tutorials/AddTwoInts
rosparam
A tool for getting and setting ROS parameters on the
parameter server using YAML-encoded files.
Commands:
rosparam set Set a parameter.
rosparam get Get a parameter.
rosparam load Load parameters from a file.
rosparam dump Dump parameters to a file.
rosparam delete Delete a parameter.
rosparam list List parameter names.
Examples:
List all the parameters in a namespace:
$ rosparam list /namespace
Setting a list with one as a string, integer, and float:
$ rosparam set /foo "[’1’, 1, 1.0]"
Dump only the parameters in a specific namespace to file:
$ rosparam dump dump.yaml /namespace
rosmsg/rossrv
Displays Message/Service (msg/srv) data structure definitions.
Commands:
rosmsg show Display the fields in the msg/srv.
rosmsg list Display names of all msg/srv.
rosmsg md5 Display the msg/srv md5 sum.
rosmsg package List all the msg/srv in a package.
rosmsg packages List all packages containing the msg/srv.
Examples:
Display the Pose msg:
$ rosmsg show Pose
List the messages in the nav msgs package:
$ rosmsg package nav msgs
List the packages using sensor msgs/CameraInfo:
$ rosmsg packages sensor msgs/CameraInfo
Logging Tools
rosbag
A set of tools for recording and playing back of ROS topics.
Commands:
rosbag record Record a bag file with specified topics.
rosbag play Play content of one or more bag files.
rosbag compress Compress one or more bag files.
rosbag decompress Decompress one or more bag files.
rosbag filter Filter the contents of the bag.
Examples:
Record select topics:
$ rosbag record topic1 topic2
Replay all messages without waiting:
$ rosbag play -a demo log.bag
Replay several bag files at once:
$ rosbag play demo1.bag demo2.bag
tf echo
A tool that prints the information about a particular
transformation between a source frame and a target frame.
Usage:
$ rosrun tf tf echo <source frame> <target frame>
Examples:
To echo the transform between /map and /odom:
$ rosrun tf tf echo /map /odom



















silema1
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
最新资源
- ARM Cortex-A(armV7)编程手册V4.0.pdf
- ABB机器人保养总结解析.ppt
- 【超详细图解】菜鸡如何理解双向链表的python代码实现
- 常用网络命令的使用 ipconfig ping ARP FTP Netstat Route Tftp Tracert Telnet nslookup
- 基于单片机控制的DC-DC变换电路
- RS-232接口电路的ESD保护.pdf
- linux下用time(NULL)函数和localtime()获取当前时间的方法
- Openstack用户使用手册.docx
- KUKA KR 30 hA,KR 60 hA机器人产品手册.pdf
- Java programming with JNI
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论0