ROS dictionary

Disclaimer: This article is a blogger original article, reproduced, please indicate the source:  http://www.cnblogs.com/liu-fa/p/5761448.html

The blog already have a certain ROS for the programming foundation of people, quickly see ROS related instructions.

This article is continuously updated, the hope concerns the collection, improve together ...

Create a ROS Workspace

Start ROS

$ roscore

Create a work environment

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

ROS compiled program

$ cd ~/catkin_ws
$ catkin_make

Add the package to the global path

$ echo"source catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc

Package related operations

Creating Package and compile

$ cd ~/catkin_ws/src
$ catkin_create_pkg <package_name> [depend1] [depend2] [depend3]
$ cd ~/catkin_ws
$ catkin_make

Find Package

$ rospack find [package name]

View Package dependence

$ rospack depends <package_name>
$ rospack depends1 <package_name>

Node -related operations

View all Node running

$ rosnode list

View a node information

$ rosnode info [node_name]

Run Node

$ rosrun [package_name] [node_name] [__name:=new_name]

Topic related operations

View rostopic all operations

$ Rostopic -h

View all Topic List

$ Rostopic list

Graphical display topic

$ Rosrun rqt_graph rqt_graph 
$ rosrun rqt_plot rqt_plot

View a Topic Information

$ Rostopic echo [topical]

View Topic Message Format

$ rostopic type [topic]
$ rosmsg show [msg_type]

To the topic announced

$ rostopic pub [-1] <topic> <msg_type> [-r 1] -- [args] [args]

Service -related operations

Check it service operations

$ rosservice -h

View service list

$ rosservice list

Call service

$ rosservice call [service] [args]

View service format and display data

$ rosservice type [service] | rossrv show

Set serviceparameter

$ rosparam set [parame_name] [args] + rosservice call clear

Get parameter

$ rosparam get [parame_name]

Load parameter

$ rosparam load [file_name] [namespace]

Delete parameter

$ rosparam delete

Bag -related operations

Record all topic changes

$ rosbag record -a

Record some topic

$ rosbag record -O subset <topic1> <topic2>

View bag information

$ rosbag info <bagfile_name>

Playback

$ rosbag play (-r 2) <bagfile_name>

 

Released six original articles · won praise 1 · views 9187

Guess you like

Origin blog.csdn.net/qq_39715243/article/details/80541378